This inexpensive camera connects directly to the Raspberry Pi as explained at raspberrypi.org and also at raspberrypi-spy.co.uk. It can take stills up to 2592x1944 in size with a 24-degree width and videos up to 1920x1080 at 30 fps. Its small size, however, leads to pixels so small that the signal-to-noise ratio degrades quickly at low light levels.
I am particularly interested in using it to monitor the critters around our ranch. By chance we occasionally see bobcats, badgers, and coyotes in the daytime as well as interesting birds like a road-runner, hawks, vultures, and eagles. Using the camera to take 1920x1080 videos at 2 frames per second which are played back at 25 or 30 frames per second allows a rapid assessment of hours of monitoring.
The camera produces h264 files that lack some frame information useful when using mplayer to backup after you see something interesting. This problem is solved by installing the MP4Box program by doing sudo apt-get install gpac and then doing
MP4Box -add yourVideo.h264 yourVideo.mp4
You can then view yourVideo.mp4 with mplayer and used the keyboard to stop and move forward and backward as explained in the mplayer manual found by doing man mplayer.
Usually one does an update of the Raspberry Pi software as follows:
sudo apt-get update sudo apt-get upgrade
However, I wanted some newer software for the camera that should solve a gradually-deteriation exposure problem I had with time lapse pictures. In order to get the latest Raspberry Pi software, I did the following as well:
sudo rpi-update
That took a long time and required a reboot afterward. This indeed changed my raspistill program version from 1.1 to 1.2 as I was hoping. Since it updated everything, however, this approach might bring less fully tested software changes throughout the system. I took my chances and the exposure problem was fixed.
When looking for creature activity, the Raspberry Pi and its camera offer a variety of choices:
Sequences of still pictures that are 2592x1944 pixels in size and can be taken at a rate of up to 1 per second. These stills can have thumbnail images attached that are up to 512x384 pixels in size so in principle one could quickly review the thumbnails to look for interesting sequences. The thumbnails or even the full images can be made into a video using the mencoder program. Playing such a video at 25 frames per second would allow a speed up of 25x, but I have found that it is too easy to miss something interesting at such a high rate. Each image requires about 1.2 MB of storage.
Videos can be taken with a resolution of up to 1920x1080 pixels at frame rates of 2 to 30 frames per second. At present, these videos do not use the full width of the sensor, so the field of view is reduced by about 25% horizontally and 45% vertically. Taking these videos at 5 frames per second and playing back at 25 frames per second allows 1 hour of video to be reviewed in 12 minutes. If something interesting appears, one can extract individual pictures every 0.2 seconds which is adequate to interpret most animal action. One hour at this rate requires about 1.2 GB of storage.
Videos can be taken at a full HD resolution of 1920x1080 pixels at a frame rate of 25 frames per second which looks quite smooth upon replay, but requires 5x as much storage space. The review time on the best of my old computers, unfortunately, cannot be speeded up without performing an enormous amount of post-processing first. It turned out to be impractical to do this option unless I am quite sure when the interesting action will appear.
Lately, I have elected to take videos with a resolution of 960x540 at a frame rate of 10 frames per second. This allows smoother motion when there is something interesting, but still retains a managable file size. At this resolution, my desktop computer can play it back at about 60 frames per second for a speed-up of a factor of 6. The file sizes are generally about 1.6 GB for each hour segment, but can grow to over 2 GB when there is significant action. If it exceeds a 2147483648-byte limit currently imposed by some of the raspivid software. (Interestingly, 1280x720 frames did not seem to result in a significantly smaller file size than full 1920x1080 frames.)
The Python program used to take videos through the day includes an algorithm to predict sunrise and sunset times and then starts videos 17 minutes before than sunrise and ends them 17 minutes after sunset. Care must be taken to edit the program regularly to be sure that the mid-day action ends before the pm action must begin. Many improvements are possible, but this program is adequate for now. (On November 3, 2013, when daylight savings time ended, the 1/2 day difference between Julien day changes and local time day changes caused that day to have sunrise and sunset off by 1 hour.)
Videos at 1920x1080x5fps for 1 hour are compressed to about 1.3 GB so about 16 hours can fit on my 32 GB SD card and still allow plenty of room for the system software. Normally, a red LED near the camera lens signals that the camera is active, but after a week, I disabled this (using raspi-config) so that it would not distract the visiting critters. Those videos can be reviewed at 5x normal speed by playing back at 25 fps. With a 5x speed-up, I can still catch most interesting activity and be able to immediately discern shadows and other uninteresting activity without the necessity of backing up for a second look. My desktop computer is not sufficiently fast to play back at greater than 25 fps or to quickly reformat. It seems to also be too slow to conveniently use motion detection software.
Here is a clip of a roadrunner which was extracted from several hours of 5 fps videos monitoring a coyote path. It turns out that our two roadrunners seem to cover the entire 40 acres each day. They make an appearance in each video session except where I was specifically trying to get them to appear.
In bright light, the camera automatic exposure becomes fast enough to catch a Hummingbird that was checking out the red light on of the camera sensor.
When taking pictures where there are major lighting differences, it lacks intensity dynamic range. A curious raptor (hawk or immature eagle) made two passes by the camera and then stopped in a shadow and took a good look at the camera which I had in a wooden box on a old milk can. No doubt the red light of the camera sensor attracted its interest. I adjusted the gamma of the video to lighten up its portrait, but doing so with the highly-compressed video tends to reveal blocking artifacts.
Here is a very well-fed bobcat that passed by my camera at about 7 am on October 13, 2013. The original video was taken at 1920x1080 resolution at 5 frames per second. I then processed it with the open-source program openshot to select out a portion at 1280x720 resolution and filled in to 25 frames per second so the action would not be speeded up.
Note: Clicking on the images will bring up large versions.
This roadrunner is very interested in the camera. He has been a regular visitor and appears to cover our 40 acres every day looking for snakes and lizards. He makes me think about the Velociraptor in the movie Jurassic Park.
Until he posed like this in front of the camera, I had not realized that he had this interesting coloration on the skin behind his eye when he raises his head feathers.
This redtail hawk flew past the camera and a moment later reappeared with a gopher. After making sure it was dead and emitting a success cry to its mate, it took off with its prize.
Nearly every day a healthy-looking coyote (presumably the same one) has passed in front of the camera. When set to look down a valley, he can be seen criss-crossing the valley, stopping to occasionally pounce on what I assume is a gopher clearing out an air hole. I think the coyote knows that he can't catch the roadrunner.
This very muscular bobcat is about 80 cm long from head to rump and 44 cm high. This was taken just after sunrise and the lighting was not ideal for a good picture.
Last updated: July 15, 2018
Contact Craig Van Degrift if you have problems or questions with this web site.