"vislabels" detecting background as an object
Afficher commentaires plus anciens
I want to detect number of lines in the image below:

However, I am getting following output:

Why it is picking background as object count. Can someone advise me what I am missing?.
"bwconncomp" outcome is shown below.
cc =
struct with fields:
Connectivity: 8
ImageSize: [5023 5036]
NumObjects: 9
PixelIdxList: {1×9 cell}
I am using following simple code:
a = imread ('Image.png');
b = rgb2gray(a);
d=im2bw(b);
vislabels(d);
cc=bwconncomp(d)
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Display and Exploration dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!