How can find the cartesian coordinates of circle in a image
Afficher commentaires plus anciens

Hello guys..
I have this image (attached in the post) that has two red circles... How can I find the cartesian coordinates of each circle ? Thanks
Réponses (1)
First, convert the image to binary using im2bw. Then use bwboundaries to return each object boundary. The result of bwboundaries should be a 2-element cell (one for each blob). Each cell has two columns; the first is the y-coordinates, the second is the x-coordinates.
If you'll be doing any more image processing, you should really go through this very nice tutorial by Image Analyst: https://www.mathworks.com/matlabcentral/fileexchange/25157-image-segmentation-tutorial
EDIT: if you want ALL the x,y coordinates, not just the boundaries, after converting to binary just use
allcoords = find(BW);
Remember that y-coordinates are returned in the first column, x in the second.
Catégories
En savoir plus sur Image Segmentation dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!