How can find the cartesian coordinates of circle in a image
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti

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
0 Commenti
Risposte (1)
Jon
il 6 Ago 2015
Modificato: Jon
il 6 Ago 2015
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.
0 Commenti
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!