How to calculate distance between center of white pixels in an image?
Ältere Kommentare anzeigen
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.

Akzeptierte Antwort
Weitere Antworten (1)
Teja Muppirala
am 22 Jul. 2019
1 Stimme
You can find the center (centroid) of each white region using REGIONPROPS, and then just calculate the distance between the centers that regionprops returns.
Kategorien
Mehr zu Image Arithmetic finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!