MATLAB: How can we set the time for deired sample time in HDL Coder (Simulink)

Computer Vision Toolboxdigital image processingFilter Design HDL CoderfpgaHDL CoderHDL VerifierImage Processing Toolbox

This is the inbuilt matlab example of visionhdlsoble. In this example the rhinos.avi video is used and for this video the desired sample time is set to 402*324. How can we set this desired sample time on basis of our requirement? what is the procedure for that?

Best Answer

The sample time is set so that the pixel sample time is 1. For the 240p stream, the total number of pixels per line is 402 and the total number of lines is 324, so the sample time is set to 402*324. Note that total implies inclusion of both active and inactive pixels.
You can refer to the table in the Frame To Pixels documentation to see the appropriate size for other frame sizes.