getting error in matlab file of not enough input argument?
2 次查看(过去 30 天)
显示 更早的评论
While using the graph cut method ,getting error of not enough input argument in line 8:I1=double(I); [H,W]=size(I1);
CODE
function [Ncut] = graphcuts1(I,pad,MAXVAL)
% function [Ncut] = graphcuts(I)
% Input: I image
% pad: spatial connectivity; eg. 3
% MAXVAL: maximum image value
% Output: Ncut: Binary map 0 or 1 corresponding to image segmentation
% I = double(I);
I1=double(I);
[H,W]=size(I1);
please help me to solve this?
demo.m CODE
clc;clear all;close all;
I=imread('RGB.jpg');
I=double(I);
I=rgb2gray(I);
I=imresize(I,[128 128]);
pad=3;
MAXVAL=max(I(:));
[Ncut] = graphcuts1(I,pad,MAXVAL);
Ncut=double(Ncut);
figure,imshow(Ncut);
0 个评论
回答(1 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!