Keeping image display constant while updating spy ontop

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

Antworten (0)

Kategorien

Mehr zu Images finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 12 Jun. 2013

Community Treasure Hunt

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

Start Hunting!

Translated by