Clear Filters
Clear Filters

Display images on video viewer in simulink in for loop

2 views (last 30 days)
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)

Accepted Answer

Bharath Venkataraman
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.

More Answers (0)




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!