VisionCams utilise a set of open-source libraries to extract and process images from the Raspberry Pi's Camera Module. The default program takes time-lapse pictures depending on how much movement is detected in the scene and is activated by swivelling the lens cover open.
Installing the VisionCam Software
We have bundled up all of VisionCam's software into an SD card image, otherwise known as an ISO file. It contains the camera's operating system, as well as the default time-lapse program. You'll need a computer with an SD card reader, a 16GB (or larger) microSD card, and about 10GB of free space on your computer. Here's what to do to install the image onto an SD card:
- Download the VisionCam ISO file here.
- Once the download finishes, unzip the file.
- Use Etcher to burn the file to a 16GB (or larger) SD card.
- Place the SD card in the Raspberry Pi and power it up.
Developers and tinkerers can utilise the VisionCam's open-source libraries to make their own programs from scratch. Most VisionCam programs are coded in Python. Images are read from the Raspberry Pi Camera with the picamera module. Image processing and computer vision is done with OpenCV. VisionCam programs sit within the Raspberry Pi operating system and are launched automatically with a utility called NODM. The program to launch is specified in the .xsession file, located within the home directory.
If all of this sounds like crazy jargon, don't worry. If you've done a little bit of programming before, you'll be able to get started without setting up complicated toolchains. Python is an accessible, forgiving programming language; that's why we've chosen it. We have created a few tools and examples to help you along. Here are a few starting points:
When you're developing programs for the VisionCam, it's really handy to connect to it via WiFi. If you are an experienced command line user, you can SSH straight into it. If not, you can connect to VisionCam's file system via netatalk. On a Mac, if the VisionCam is connected to the same network, it will show up in Finder under the Shared section. You can connect to it with the username pi and the password raspberry.
Start with a BlankExample
You can find the simplest program you could ever run on a VisionCam here. It reads frames from the camera's video port, displays them on the screen, and saves them if a button is pressed. This is a great starting point for you. In fact, when we develop a new VisionCam program, we always start with this one to get up and running quickly.