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

1 回表示 (過去 30 日間)
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.

採用された回答

Image Analyst
Image Analyst 2016 年 4 月 17 日
Try calling it like this from a separate script:
grayImage = imread('cameraman.tif');
Ncut = graphcuts(grayImage, 1, 255);

その他の回答 (1 件)

Walter Roberson
Walter Roberson 2016 年 4 月 16 日
That code cannot be run by simply clicking on a button or menu item. You must run it from the command line,passing in at least the image array.
  1 件のコメント
Prerna Surbhi
Prerna Surbhi 2016 年 4 月 17 日
hello , can u please guide me how to pass image array in command line

サインインしてコメントする。

Community Treasure Hunt

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

Start Hunting!

Translated by