MATLAB: While implementing the code (I = double(I); [H,W] = size(I);) getting the Error using graph cuts (line 7) Not enough input arguments.

computer visionimage segmentation

I am implementing the Graph cut for image segmentation code provided by by Amarjot
07 Mar 2013 (Updated 04 Dec 2014) The code segments the gray scale image using graph cuts. while implementing the code i am getting error at line 7(I = double(I); [H,W] = size(I);) Error using graph cuts (line 7) Not enough input arguments. so plese help me to resolve the error? please also guide what changes I have to do for attching this code on image.

Best Answer

Try calling it like this from a separate script:
grayImage = imread('cameraman.tif');
Ncut = graphcuts(grayImage, 1, 255);
Related Question