How can I calculate all the distances between the centroid and every white pixel in the shape of ellipse?
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
In my image called shape I have an ellipse with a white shape(all image is black, only the shape is white), I try to calculate the distances between the centroid and every white pixel in the shape, after that, will calculat the histogram by this distances. I tried with this code (of course after geting the centroid): shape.Centroid(x,y); [a,b]=find(shape==1); (know I need a for) for a=?:? for b=?:? distance=sqrt((x-ai)^2+(y-bi)^2); end end
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Image Filtering and Enhancement dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!