"vislabels" detecting background as an object
Show older comments
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)
Accepted Answer
More Answers (0)
Categories
Find more on Display and Exploration in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!