Errors with imcrop or roipoly

조회 수: 1 (최근 30일)
David Perrais
David Perrais 2015년 3월 31일
편집: Alex Taylor 2015년 4월 1일
I have written programs where I use command lines like these: [Xback,Yback,Back,rect] = imcrop;
or
[ROI,x,y] = roipoly;
in Figures with an image and uicontrol buttons. These programs work fine with version up to Matlab2011b at least, but not with my new version Matlab2014b. What could be the reason for that? Thanks
See below the error message
Error in getimage>getInfoOnImage (line 191) range = getrangefromclass(A);
Error in getimage (line 103) [x,y,A,state] = getInfoOnImage(him);
Error in imcrop>validateTargetHandle (line 325) [x,y,a,flag] = getimage(h);
Error in imcrop>parseInputs (line 210) [x,y,a,~,cm] = validateTargetHandle(hIm);
Error in imcrop (line 93) [x,y,a,cm,spatial_rect,h_image,placement_cancelled] = parseInputs(varargin{:});

답변 (2개)

Image Analyst
Image Analyst 2015년 3월 31일
Do those error messages come as soon as you try to call the function, or after you double click inside the polygon to accept it? Alternatively, try calling roipolyold() instead.

Alex Taylor
Alex Taylor 2015년 4월 1일
편집: Alex Taylor 2015년 4월 1일
Could you please email me code that reproduces this bug? Also, do you know the datatype of the images that you are working with? I have a hunch maybe a larger integer type? This sounds like it may be a bug.

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by