How to find the "true" perimeter of objects in a binary image?
Ältere Kommentare anzeigen
Say, there is an object consisting of 3 pixels next to each other (■■■). If I calculate the perimeter using
sum(sum(bwperim(image)))
I get 3. But the actual perimeter (considering all sides of the object) is 8. How do I find this? Thanks.
4 Kommentare
Image Analyst
am 12 Okt. 2015
That's a matter of definition. You could also say the perimeter is 2 or 4 or 0. What's the length of that object? 3 or 2? It's a matter of definition.
Xen
am 12 Okt. 2015
Image Analyst
am 12 Okt. 2015
That's too bad. Maybe some day you'll realize and understand the other ways of considering the pixels.
Optically speaking, the pixel center-to-pixel center definition is probably the most accurate, so an image of [0,1,1,1,0] would have a length of 2 rather than 3.
Xen
am 13 Okt. 2015
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Region and Image Properties finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!