From 76654f70039f7098a21264ba848a1e6d3d811536 Mon Sep 17 00:00:00 2001 From: Ivano Ras Date: Thu, 11 May 2017 19:06:59 +0100 Subject: [PATCH] added minor change to make it compatible with matlab R2017a. --- textureSynthesis.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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'));