Keeping image display constant while updating spy ontop
Show older comments
Dear MatlabCentral
I am currently running some picture analysis, where I am iterating for many times to compute a matrix that updates every iteration. I would like to display the sparsity pattern (spy) ontop of the image (imagesc) and update this figure every run.
What i am currently doing:
for i=1:1000000
MyMatrix=MyMatrix + Update(i)
imagesc('picture')
hold on
spy(MyMatrix,'ro')
drawnow
end
This is obviously very slow, as "drawnow" takes a lot of time to display the large (800x1280 pixel) image. What i would like to have is to draw the image once outside the loop and than only update the "spy" every iteration.
I searched but couldnt find many helpful answers.
Any hint would be very much appreciated regards BjoernBeyer
Answers (0)
Categories
Find more on Images 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!