This has been one of the most exciting projects I have started. The initial start has been using the Raspberry Pi computer and camera which has exceeded my expectations. I also was selected to Road Test the Intel Joule for Computer Vision. I am waiting for delivery on that computer. But the Raspberry Pi is an awesome low cost setup for a camera trap. I am using the Raspberry Pi 3 for You Tube Live Streaming and the Raspberry Pi 2 for Opencv. My preliminary testing of Node-Red Watson Visual Recognition has been very promising. That space in my Dashboard is for real time counting of the animal seen by the camera with a time stamp.
The Real Sense Camera for Intel Joule promises 3D photography and a robust library for computer vision. The comparison should be interesting.
Before the camera arrived I noticed the board getting warm, So I installed the Heat Sink that came with the kit. To get the Intel Joule ready for the camera SDK there were a number of steps I had to take over a couple of days.
Update the BIOS
The steps can be found here. The pictures and screen shots were helpful in completing the upgrade.
Create a Ubuntu SSO account and generate a SSH key
After I created the account , I then looked at the instructions to generate the SSH key. As I am using a Windows 10 laptop, I downloaded Git for Windows to run the commands. Below is the result:
Open up the id_rsa file in NotePad and copy the file to this screen. If you don't do this then the install of Ubuntu will not work.
I selected the second method. The first method did not work for me. The above link also contains a checklist of software and hardware you need. You need a USB hub because you will be using a wireless mouse and keyboard dongle, USB flash drive and also the camera. I spent time trying to get the second method to work. The system spit out messages ranging from there was a internal error to the hard drive was corrupted. I also noticed even with the heat sink installed , the unit was getting warm. To get back on track I flashed the BIOS with a newer version and booted from the USB dongle. VOILA - now its stable and working.
This video was important to get Ubuntu installed. Instead of using Win32Disklmager you need to install Rufus which can be found here. The video is here.
Below are my settings for Rufus:
I have installed the Realsense SDK and examples. Next log will be running samples on the camera.
I changed the Node Red flow to automate the image taking process. I added a node called tableify that translates the array of tags and arrange it in a nice table in Freeboard. I am going to modify the python script to not only save the file with a unique name but also save the new image as Bubbles.jpg. Every time a new image is uploaded to DropBox the dashboard should be updated and "soon to be coming" a database with the tags and time stamp.
The Live Streaming from YouTube works beautifully on the Raspberry Pi 3. You need to get a streaming key and if you follow this guide it should work ! You can share your live streaming to all world citizens. This guide is the best one I have found and had me up and running in a short period of time. As you can see you have to wait for the video stream to kick in but when it does it is amazing.
I only had short periods of time to get the camera outside over the weekend. This was mainly due to rain. The Starlings were in the field but when I left some bird feed only the crows came. So I decided to start setting up the Intel Joule. The power supply arrived but the RealSense camera will not arrive until June 14th.
I had added my own USB B cable and decided to use Putty as the console. The first step was to connect the Intel Joule to my laptop and make note of the COM port. I already had the FTDI drivers and Putty installed from a different project.
I am using Blue Mix Node Red so I can use the Visual Recognition node. This needs to be automated so when OpenCV uploads an image to DropBox the tags are processed and sent to Dweet.io. The tags then should show in Freeboard as a text widget. Below is my Node Red Flow:
The file inject node is for testing. I can pick up picture from DropBox on my laptop and send the picture to dweetio. I am so pleased about the ability of the node to determine the breed of the animal. Very impressive.
Below is a test of Bubbles the cat on my work bench not letting me work !
Adrian Rosebrook writes code and blogs about OpenCV. His blogs are clear and informative. He is highly regarded as an expert. His website can be found here and if you are interested in installing OpenCV I would highly recommend you take a look. I have included the links to his code and tutorials. Yes I must change the "room status occupied" in the frame. As you can see...Ozzy loves playing catch.
Be prepared to spend some time with your console. Compiling the code took more than 2 hours but I have to use WiFi. Do not skip a step because the install will fail. Make sure you test your installation as the last step ! I did not use my Raspberry Pi 3 because it performs well for Live Streaming to You Tube.
The code he uses may be downloaded at the bottom of the page. You can transfer the code to your Pi using Filezilla. Although I have used the camera on other projects , I went through the tutorial and found it very useful.
Again the code may be downloaded at the bottom of the page.
My biggest challenge was to get the Dropbox integration to work. Dropbox authentication website would not display and I knew Dropbox had changed since 2015. This was a Go or No Go to complete the project. I needed Dropbox to process the image. The access token for Wild Eye is available in Dropbox so the solution was to hard code this in. I left the original code and commented the lines out.
# checkto see if the Dropbox should be used
if conf["use_dropbox"]:
# connectto dropbox andstart the sessionauthorization process
flow = DropboxOAuth2FlowNoRedirect(conf["dropbox_key"], conf["dropbox_secret"])
#print "[INFO] Authorize this application: {}".format(flow.start())
#authCode = raw_input("Enter auth code here: ").strip()
# finish the authorizationand grab the Dropbox client
#(accessToken, userID) = flow.finish(authCode)
accessToken = ("Your Access Token Goes here")
client = DropboxClient(accessToken)
print "[SUCCESS] dropbox account linked"
I'll have more in pictures and videos soon. I'm hoping to catch some birds , cats or foxes with the camera.
Thanks for the link ! Very cool project.