Displaying frames in GUIDE
3 ビュー (過去 30 日間)
古いコメントを表示
I have a necessity to display frames of a video in an axes object (or some other suitable alternative) with the requirement that the various frames can be rendered while maintaining the zoom in level of the axes object. Assume the frames are grayscale and have been stored into a 3 dimensional matrix, the index into the third dimension being used to index frames.
Calling imshow with the parent attribute set to the axes object of my choosing will display the frame. At this point I can use the zoom in controls to zoom into the image data. to display the next frame, my current code calls imshow again with the parent as the same axes object and the image data referenced from the aforementioned 3D array. HOWEVER, the call to imshow resets the zoom, which I believe is set through the XLim and YLim properties of the axes object.
Assuming you have such a 3D array with the frame data for the video, how would you display subsequent frames while maintaining the zoom of the Axes object before the call to imshow?
Something tells me I should keep XLim and YLim of the Axes object untouched and just replace the CData with the data for the new frame. Is this the most effective way to do this?
0 件のコメント
採用された回答
Image Analyst
2014 年 8 月 29 日
You should be able to set "hold on". However that may "pile up" all the images and you could eventually run out of memory. So you might have to call getimage() and delete any existing image object in the axes before calling imshow() to display the next frame. Don't call "cla reset" as it will reset the zoom. You can check whether "cla" by itself will reset the zoom - I don't know.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Specifying Target for Graphics Output についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!