code for segmentation of image using grabcut algorithm
I=imread(‘Lenna.jpg’);
pad=3;
MAXVAL=255;
[Ncut] = graphcuts(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
error :
Error using graph cuts
Not enough input arguments.I=imread(‘Lenna.jpg’);
pad=3;
MAXVAL=255;
[Ncut] = graphcuts(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
error :
Error using graph cuts
Not enough input arguments. I=imread(‘Lenna.jpg’);
pad=3;
MAXVAL=255;
[Ncut] = graphcuts(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
error :
Error using graph cuts
Not enough input arguments. grabcuts/ graphcuts MATLAB Answers — New Questions