How to find the "true" perimeter of objects in a binary image?
Mostra commenti meno recenti
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 Commenti
Image Analyst
il 12 Ott 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
il 12 Ott 2015
Image Analyst
il 12 Ott 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
il 13 Ott 2015
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Region and Image Properties in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!