find the center of the circle in image
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello,
I am trying to find the center of the circle by just clicking inside of the circle.
I learned how to get the position where I clicked with
[x, y] = ginput
and how to find the center of circle with
[centers, radii] = imfindcircles(image,[Rmin Rmax])
But, what I want to do is to find the center of a circle by clicking anywhere inside a circle when I have many circles in the image.
Please let me know if you have any advice.
Thank you
0 comentarios
Respuestas (1)
Image Analyst
el 22 de Feb. de 2015
It depends on what information you have. Do you have a list of each circle that exists? Like an N by 3 array of x,y,radius? If so, just see which x,y in the array is closest to where you clicked. Do you have an image of circles? You might need to segment the image until you get an array of x,y,radius locations of every circle in the image. See my Image Segmentation Tutorial in my File Exchange: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862. What kind of data are you starting with? Please read this and then attach a screenshot.
2 comentarios
Image Analyst
el 22 de Feb. de 2015
That's EXACTLY what my tutorial does that I referred you to. Did you look at the link and see the tutorial? Here is a link to the one,specific tutorial that you need: http://www.mathworks.com/matlabcentral/fileexchange/25157-image-segmentation-tutorial---blobsdemo-- Just replace the image with your image and you should be ready to go.

See the numbers? I put those at the centroids.
Ver también
Categorías
Más información sobre Data Exploration en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
