| Image Acquisition Toolbox™ | ![]() |
Image Acquisition Toolbox

The From Video Device block lets you acquire image and video data streams from image acquisition devices, such as cameras and frame grabbers, in order to bring the image data into a Simulink® model. The block also lets you configure and preview the acquisition directly from Simulink.
The From Video Device block opens, initializes, configures, and controls an acquisition device. The opening, initializing, and configuring occur once, at the start of the model's execution. During the model's run time, the block buffers image data, delivering one image frame for each simulation time step.
The block has no input ports. You can configure the block to have either one output port, or three output ports corresponding to the uncompressed color bands, such as red, green, and blue, or Y, Cb, Cr. The above figure shows both configurations.
The From Video Device block supports the use of Simulink Accelerator mode. This feature speeds up the execution of Simulink models.
The From Video Device block supports the use of model referencing. This feature lets your model include other Simulink models as modular components.
For more information on these features, see the Simulink documentation.
Note For an in-depth example of using this block, see Using the From Video Device Block in Simulink. To see a demo of using this block, go to the Demos tab in the Help browser, under Toolboxes > Image Acquisition. |
In the Source Block Parameters dialog box, the options that show up are dependent on the device you are using. The first diagram illustrates the fields that may appear if your device supports camera files and hardware triggering.

The second diagram illustrates the options that may appear if your device supports using either one output port or multiple output ports for the color bands (the Ports mode option). Ports mode is visible if the selected device and format settings can output color data.

The following fields appear in the Source Block Parameters dialog box. Some fields may not appear, as they are device dependent. If your selected device does not support a feature, it may not appear in the dialog box.
The image acquisition device to which you want to connect. The items in the list vary, depending on which devices you have connected to your system. All video capture devices supported by the Image Acquisition Toolbox™ software are supported by the block.
Shows the video formats supported by the selected device. This list varies with each device. If your device supports the use of camera files, From camera file will be one of the choices in the list.
This option only appears if you select a device that supports camera files. You can select From camera file from the Video format field, and enter the path and file name, or use the Browse button to locate the file.
The available input sources for the specified device and format. You can use the Edit properties button to edit the source properties. That will open the Property Inspector.
Edits video source device-specific properties, such as brightness and contrast. It opens the Property Inspector. The properties that are listed vary be device. Properties that can be edited are indicated by a pencil icon or a drop-down list in the table. Properties that are grayed out cannot be edited. When you close the Property Inspector, your edits are saved.
This option only appears if the selected device supports hardware triggering. Select the check box to enable hardware triggering. Once enabled, you can select the Trigger configuration.
This option only appears if the selected device supports hardware triggering. Check the Enable hardware triggering box to enable it. Once enabled, you can select the Trigger configuration. The configuration choices are listed by trigger source/trigger condition. For example, TTL/fallingEdge means that TTL is the trigger source and the falling edge of the signal is the condition that triggers the hardware.
Use this field to input a row vector that specifies the region of acquisition in the video image. The format is [row, column, height, width]. The default values for row and column are 0. The default values for height and width are set to the maximum allowable value, indicated by the video format's resolution. Therefore you only need to change the values in this field if you do not want to capture the full image size.
Preview the video image. It opens the Video Preview window that is part of the Image Acquisition Toolbox software. If you change something in the Source Block Parameters dialog box while the preview is running, the image will adjust accordingly. This lets you set up your image acquisition to the way you want it to be acquired by the block when you run the model.
Specify the sample time of the block during the simulation. This is the rate at which the block is executed during simulation. The default is 1/30.
Note The block sample time does not set the frame rate on the device that is used in simulation. Frame rate is determined by the video format specified (standard format or from a camera file). Some devices even list frame rate as a device-specific source property. Frame rate is not related to the Block sample time option in the dialog. Block sample time defines the rate at which the block executes during simulation time. |
Used to specify either a single output port for all color spaces, or one port for each band (for example, R, G, B). When you select One multidimensional signal, the output signal will be combined into one line consisting of signal information for all color signals. Select Separate color signals if you want to use three ports corresponding to the uncompressed red, green, and blue color bands. Note that some devices will use YCbCr for the separate color signals.
Note The block acquires data in the default ReturnedColorSpace setting for the specified device and format. |
The image data type when the block outputs frames. This data type indicates how image frames are output from the block to Simulink. It supports all MATLAB® data types and single is the default.
![]() | Block Reference | Video Input (Obsolete) | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |