MATLAB: How to find different features of objects

image processing

in this binary image there are some objects in x-y coordinate, I want to find the biggest object and its centroid (x,y). how can I do that?

Best Answer

See my Image Segmentation Tutorial: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862 It finds the centroids of a bunch of circles.
Then, see my attached demo that will find the largest or smallest N blobs in a binary image.