My code is,
*Function 1: name.m*
din1=imread('name.jpg'); imshow(din1);
[m,n]=size(din1);
dout=sizefilter(din1,size)
*Function 2: sizefilter.m*
function [ dout ] = sizefilter( din1,size ) %Determine the connected components:
CC = bwconncomp(din1); %Compute the area of each component:
S = regionprops(CC, 'Area'); %Remove small objects: L = labelmatrix(CC);
dout = ismember(L, find([S.Area] >= size)); image(dout);figure(gcf);
end
I am getting an error as,
Error using size Not enough input arguments.
Error in name (line 12) dout=sizefilter(din1,size)
Thanks in advance
Best Answer