Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

How do I run the version of GrowCut in FileExchange in Matlab 2012a?

Asked by Antonio on 5 Jan 2013

I want to run this image segmentation program.

http://www.mathworks.in/matlabcentral/fileexchange/19091-growcut-image-segmentation

When attempting to run growcut_test I get the following error:

>> growcut_test
Subscript indices must either be real positive integers or logicals.
Error in growcut_test (line 7)
subplot(2,2,1), imshow(img);

This is line 7 and what is around it:

%-- Load image and seeds
img = imread('lotus.png');
labels = double(imread('labels.png'))-1;
subplot(2,2,1), imshow(img);
subplot(2,2,2), imshow(labels,[]);
subplot(2,2,3), imshow(img);

Any ideas?

0 Comments

Antonio

1 Answer

Answer by Walter Roberson on 5 Jan 2013
Accepted answer

You appear to have a variable named "imshow" that is interfering with use of the Image Processing Toolbox routine imshow()

0 Comments

Walter Roberson

Contact us