Error using size Not enough input arguments.
조회 수: 2 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
채택된 답변
Rick Rosson
2014년 10월 27일
편집: Rick Rosson
2014년 10월 27일
size is the name of a built-in function. It is not a good idea to name a variable the same thing. Please try sz instead.
Also, try:
dout=sizefilter(din1,size(din1))
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Dialog Boxes에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!