How To Find Distance Between Centroids ????
6 views (last 30 days)
Show older comments
Ibraheem Salim
on 24 Apr 2015
Commented: Ibraheem Salim
on 13 May 2015
Hey Guyz,
I am working on the project Titled as "Text Detection and Recognition". I have a question about finding the distance between two centriods. How to find it ????? What is the possible approach of finding it ??
Regards and Thanks in advance Cheers !
0 Comments
Accepted Answer
Image Analyst
on 24 Apr 2015
You can use the Pythagorean theorem, or the functions sqrt() or hypot(). If you don't even have the centroid locations yet, then see my Image Segmentation Tutorial: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862
0 Comments
More Answers (1)
Joseph Cheng
on 24 Apr 2015
Edited: Joseph Cheng
on 24 Apr 2015
So you already have two centroids with coordinates (x1,y1) and (x2,y2) then the distance formula would work right?
distance = sqrt((x2-x1)^2+(y2-y1)^2);
See Also
Categories
Find more on Feature Detection and Extraction in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!