If I am given a image of black circle with white background, how can I find the exact center of that circle?

 Réponse acceptée

You use regionprops and ask for the centroid. That's pretty much what I do in my Image Segmentation Tutorial http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862 except that I do it on the coins (standard demo image that ships with the Image Processing Toolbox) so it has several circles (coins), not just one.

Plus de réponses (1)

Evan
Evan le 15 Juil 2013
Modifié(e) : Evan le 15 Juil 2013
Is this a binary image? If not, you'll need to do some thresholding. Once you do that, you can use regionprops (if you have the image processing toolbox installed).
spotC = regionprops(image_mask,'Centroid');
For more:
help regionprops

Catégories

Community Treasure Hunt

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

Start Hunting!

Translated by