How to calculate distance between center of white pixels in an image?
Mostra commenti meno recenti
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.

Risposta accettata
Più risposte (1)
Teja Muppirala
il 22 Lug 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.
Categorie
Scopri di più su Image Arithmetic in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!