What formula MATLAB uses to find centroid of image?

I know, we can get centroid by writing following:
stat = regionprops(BW, 'Centroid') ;
c = stat.Centroid
But how can I find centroid of image using mathematical expressions?
I want to know what expression MATLAB uses to find centroid.

Tags

Asked:

on 24 Feb 2014

Answered:

on 24 Feb 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!