V4L2 Video Capture
R2026bCapture video from USB camera using V4L2
Libraries:
Simulink Coder Support Package for BeagleBone Blue Hardware /
Video
Raspberry Pi Blockset /
Audio and Video
Description
Add-On Required: This feature requires the Simulink Coder Support Package for BeagleBone Blue Hardware add-on.
Capture live video from a USB video camera, using the V4L2 (Video for Linux Two API) driver framework. The output is in row major format. During simulation, the model outputs a moving colorbar image.
The Ubuntu® Linux® image used on the target hardware supports video capture from USB cameras listed as Universal Video Class (UVC). In addition to being a UVC class camera, the camera itself must support data acquisition in YUYV mode.
The following cameras have been tested:
Logitech QuickCam Pro 9000
Logitech QuickCam Pro 3000
Logitech Webcam C600
Logitech HD Webcam C310
Ports
Output
Parameters
Programmatic Use: Add Block
To add the block programmatically, use the add_block function with one of these library block paths as the source.
"bbbluevideolib/V4L2 Video Capture"
"raspberrypiAVlib/V4L2 Video Capture"
Example: add_block("bbbluevideolib/V4L2 Video Capture","myModel/myBlock",MakeNameUnique="on")
Version History
Introduced in R2018b