Video acquisition: Software driver
In Chapter 5, Digital I/O and Serial Communication, we discussed how to implement drivers for external devices. Similarly, the camera requires a driver as well. Nonetheless, the driver for a digital camera is usually much more complex than what we have done until now, and it may be worth another book to discuss how to implement such a driver. Thanks to the open-source community and MATLAB, the Video for Linux 2 (V4L2) API driver has been implemented for the BeagleBoard and is ready to use. Detailed information about V4L2 can be found at http://linuxtv.org/downloads/v4l-dvb-apis.
In this chapter we call the V4L2 driver directly to acquire the video stream from the Logitech C310 digital camera. As a benefit, we can focus on how to implement a motion detection algorithm based on existing video input.
To obtain the video stream from the Logitech C310 camera, simply open the Simulink library and add a V4L2 Video Capture block (as shown in the previous screenshot...