How to calculate distance between center of white pixels in an image?
Mostrar comentarios más antiguos
In this iamge, I want to measure the distance between the center of area of white pixels marked below.
As these are not definite shapes, how do I find the center of these and then measure the distance in pixels between their centers.

Respuesta aceptada
Más respuestas (1)
Teja Muppirala
el 22 de Jul. de 2019
1 voto
You can find the center (centroid) of each white region using REGIONPROPS, and then just calculate the distance between the centers that regionprops returns.
Categorías
Más información sobre Image Arithmetic en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!