MATLAB: How to find out center of in the foreground region of a binary image

image analysisImage Processing Toolboximage segmentation

I have an binary image, (1 for white, 0 for black pixel value), all are black except a circular like pure white object in the image.
How to find out the center of the white region (it is foreground region), not the center of the image. Finally how to segment the white region only?

Best Answer

Please attach the original image here, not as a .mat file, and not on some third party site.
You can look at my Image Segmentation Tutorial http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862 and see how finding the centroid(s) is done.