Display images on video viewer in simulink in for loop
1 view (last 30 days)
Show older comments
Rajesh Acharya
on 7 Sep 2022
Answered: Bharath Venkataraman
on 8 Sep 2022
I have a test simulink model which creates radon transform of phantom and then in a for loop circularly shifts the columns in sinogram (radon transform) one by one everytime reconstructing the image using iradon. I expect to visualise CT image (phantom) turning by 1 degree everytime in an animated way.
My Problem: I am not able to visualise the image getting reconstrcted one by one as they get built in the for loop on my video viewer screen. Instead i see a black image while simulation runs and only see the last image.
I am new to simulink and do not know much about the sampling time or frame rate settings that i think is causing this issue. It may be something equivalen to 'drawnow' that is used in matlab code that is missing somewher in the model. My ultimate objective is to be able to have FPGA implementation wherein CT data acquired at high frame rate from a hardware is fed as input and reconstrcted images are available at the output for real time visualisation. (Electrical CT- electrical impedance tomography)
0 Comments
Accepted Answer
Bharath Venkataraman
on 8 Sep 2022
It would help to have a sample model (a simple one showing the problem will suffice).
If you wish to view the intermediate results, you will likely need to send out all the intermediate results or unroll the for-loop in Simulink.
Here are two examples that use the Video Viewer - as you can see, every frame needs to be passed in to the Video Viewer to be able to be seen.
0 Comments
More Answers (0)
See Also
Categories
Find more on Computer Vision with Simulink in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!