필터 지우기
필터 지우기

why active contour always produce an error?

조회 수: 4 (최근 30일)
Walaa
Walaa 2022년 9월 14일
편집: Walter Roberson 2022년 9월 14일
I am using this code to segement a grayscale image and produces an error in activecontour([A, mask, N, method, smoothfactor,contractionbias] = parse_inputs(args{:});
that is the code i use;
I = imread('after opening.jpg');
imshow(I)
r = drawrectangle;
mask = createMask(r);
bw = activecontour(I,mask,200,'edge',1,.3);
hold on;
visboundaries(bw,'Color','r');
figure
imshow(labeloverlay(I,bw));
How could this be solved?

채택된 답변

Walter Roberson
Walter Roberson 2022년 9월 14일
편집: Walter Roberson 2022년 9월 14일
bw = activecontour(I,mask,200,'edge',1,.3);
'edge' is a positional keyword, not a name-value pair. There are no positional values expected after 'edge'. The 1,.3 is unexpected.
It is not clear to me what you were trying to do at that point, but my guess is that you want either
'SmoothFactor', 1, 'ContractionBias', 0.3
or possibly
'SmoothFactor', 1.3

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Read, Write, and Modify Image에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by