Capture video from input video device and send to algorithm
SoC Blockset / Peripherals
The Video Capture block simulates behavior of the driver code that captures images from a video device, such as a camera, on your hardware board. The input of this block must be connected to an Video Capture Interface block that simulates a physical video source device on the hardware board. Place this block inside a task and connect it to an algorithm to process an image each time the task executes. For more information on tasks, see Timer-Driven Task and Event-Driven Tasks.
msg— Data message from video capture interface
— Color component of image
This port outputs a height-by-width matrix
Color component, where the dimensions are the size
of the image. The Image size parameter specifies the
height and width dimensions.
The Pixel format parameter sets the color component format
Image size— Image size
Specify the height and width dimensions of the
image matrix emitted by the color channel ports of this block. Specify
custom to set custom image dimensions.
Image size ([width, height])— Image size
[320, 240](default) |
2-element vector of positive integers
Specify custom height-by-width dimensions of the image matrix emitted by the color channel ports.
To enable this parameter, set the Image size parameter to
Pixel format— Format of the pixel data
Specify the image data encoding as
YCbCr 4:2:2 triplets.
Sample time— Sample time in seconds
-1(default) | positive scalar
If used in a timer-driven task, enter the sample time of the task defined in the
block. If used in the event-driven task, enter
To automatically generate C code for your design, and execute on an SoC device, use the SoC Builder tool. To generate and execute C code for your SoC models, Embedded Coder® features are required. For more information on generating code for SoC designs, see Generate SoC Design.
When deployed to a supported hardware board, this block uses the V4L2 driver framework to capture images from video capture devices, such as a camera. To specify the video capture device, use the Peripheral Configuration tool. Similarly, to specify the event that triggers the task, use the Task Mapping tool. For more information on the V4L2 driver framework, see Video4Linux.