frame_to_pixel and pixel_to_frame blocks blocks
24 views (last 30 days)
Show older comments
hello, i want to build a stereo vision system on simulink using HDL coder for hardware implementation later on. the problem is: how to use the frame_to_pixel and pixel_to_frame blocks (vision hdl toolbox) with images(jpeg; png;...). do they support images an input? or only video data type (*.avi;...), because i can not use my pair of images as an input. Any explanation, example or suggestion. THANK YOU...
0 Comments
Answers (2)
Bharath Venkataraman
on 28 Nov 2016
Please take a look at the example in Vision HDL Toolbox to see how you can import images or videos using Frame To Pixels and Pixels To Frame blocks For stereo systems, you can use two of the blocks to import the left/right input or combine the data into one data stream.
0 Comments
Walter Roberson
on 28 Nov 2016
"frame: Full image specified as a Active pixels per line-by-Active video lines-by-N matrix. Height and width are the dimensions of the active image specified in Video format. N is the Number of components used to express a single pixel."
That could be an arbitrary data matrix from some source, including from a file you have read in.
"Video format"
You can use Custom to give an arbitrary size equal to your image size. Active pixels per line is your image with. Active lines is your image height. For the front porch and back porch, calculate according to the guidelines given there:
"Also, set the horizontal blanking interval, or Back porch + Front porch, according to these guidelines.
- The total of Back porch + Front porch must be at least 2 times the largest kernel size of the algorithm in the blocks following the Frame To Pixel block. If the kernel size is < 4, the total porch must be at least 8 pixels.
- The Back porch must be at least 6 pixels. This parameter is the number of inactive pixels before the first valid pixel in a frame."
This does not require that you modify the image at all.
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!