MATLAB: Can the From Multimedia File block output the current frame number and/or the dimensions of the video in the Video and Image Processing Blockset

Computer Vision Toolboxdimensionframefromimagemultimediaprocessingvideo

The From Multimedia File block does not output the current frame number and/or the dimensions of the video.

Best Answer

The ability for the From Multimedia File block to output the frame number and dimensions of a video stored in an AVI file is not available in the Video and Image Processing Blockset.
To work around this issue, you can do the following:
1. If the frame rate of the input AVI file is known a priori, you can use a Counter Limited block in the Simulink Sources library to simulate the frame number. You must set the sample time of the Counter Limited block to match the frame rate of the AVI file.
2. To obtain the dimensions of the input AVI file, you can use the Probe block to output the signal dimensions of the output from the From Multimedia File block.
Related Question