why active contour always produce an error?
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Walaa
il 14 Set 2022
Modificato: Walter Roberson
il 14 Set 2022
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));
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1124275/image.jpeg)
How could this be solved?
0 Commenti
Risposta accettata
Walter Roberson
il 14 Set 2022
Modificato: Walter Roberson
il 14 Set 2022
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 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Image Processing Toolbox in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!