diff --git a/textureSynthesis.m b/textureSynthesis.m index 378fbfe..f04c8be 100644 --- a/textureSynthesis.m +++ b/textureSynthesis.m @@ -117,14 +117,16 @@ end end -imf = max(1,gcf-1); snrf = imf+1; +gcf_copy = gcf; +imf = max(1, gcf_copy.Number-1); snrf = imf+1; figure(imf); clf subplot(1,2,1); grayRange = showIm(im,'auto',1); title('Starting image'); drawnow prev_im=im; -imf = max(1,gcf-1); +gcf_copy = gcf; +imf = max(1,gcf_copy.Number-1); figure(imf); clf;showIm(im,'auto',1); title(sprintf('iteration 0'));