Erroe message ..... " not assigned during call to "
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Shivang Patel
il 18 Feb 2015
Commentato: Shivang Patel
il 18 Feb 2015
I can't understand, Why this error ? not assigned during call to
Anyone can explain !
My main file.....
for i = 1:d
im = imgData(:,:,i);
bw = binary(im);
im = segmentation(bw);
imtool(im,[]);
end
segmentation.m fucntion code.....
function char = segmentation( bwIMG )
bwImg = bwareaopen(bwIMG,550); %%Remove all object containing fewer than 1 pixels
[label, n]=bwlabel(bwImg); %%Label connected components
if (n == 1)
[r,c] = find(label==n);
n1=bwImg(min(r):max(r),min(c):max(c));
char = imresize(n1,[40 30]);
end
end
Error message in command prompt...
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/147192/image.png)
2 Commenti
Stephen23
il 18 Feb 2015
Please give us the complete error message, as our mind-reading ability is not so well developed.
Risposta accettata
Michael Haderlein
il 18 Feb 2015
Whenever n is not 1, char will not be assigned. What's the purpose of the (n == 1) condition? Possibly it's supposed to be a loop instead so it will assign values to char for every object in your image?
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Environment and Settings in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!