Algorithm used to find centroids in regionprops.
Show older comments
I used regionprops to find centroids in image processing. But now I have to put algorithm to show how code works to find these centroids. Someone please tell me the algorithm used for the same.
1 Comment
Veena Chatti
on 8 Jul 2020
I am also looking for further information on the algorithms underlying the regionprops function's outputs. Did you manage to find further information from MATLAB? Thanks!
Accepted Answer
More Answers (1)
Walter Roberson
on 31 May 2016
0 votes
1 Comment
Walter Roberson
on 31 May 2016
For images with a single region:
[R, C] = find(YourImage);
Y_centroid = mean(R);
X_centroid = mean(C);
Categories
Find more on Region and Image Properties 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!