getting error in matlab file of not enough input argument?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Walter Roberson
el 21 de Abr. de 2016
You need to run demo rather than graphcuts1 itself.
0 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!