I've divided my image into various regions. Now i need to find centroid of each region so that i can calculate RGB components of the centroid i've found. Im unable to find the cenroid of each region. I divided my image 'b' into regions and wrote the following to find the centroid of the first region.

This is what i wrote and got as result.

` stats=regionprops(b(:,:,1),'centroid')stats = 182x1 struct array with fields: Centroid`

I am unable to understand how to identify the centroid so that i can further work with it. I am new to matlab.Please help

## Best Answer