How to detect the center of a cercle in an RGB image.
    6 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
Hello, i am trying to find an algorithm to detect a circle in an image, i used the imfindcircles function with the proper radius paramter but it won't find the circles. I am working on the the attached picture. i want to detect the inner the circle of the piece located in the bottom of the image, or the big circle that contain the small one.
3 comentarios
Respuestas (1)
  Jayanti
 el 26 de Mzo. de 2025
        Hi Theodor,
I have used “imfindcircles” function to detect the circle in the provided image. 
Please refer to the below code for more details:
A= imread('WebcamImg-1.jpg');
imshow(A)
[centers, radii] = imfindcircles(A,[50 200],'ObjectPolarity','dark','Sensitivity',0.9);
hold on;
imshow(A);
viscircles(centers, radii, 'EdgeColor', 'b');
hold off;
I have set the object polarity to “dark” as the circular object is darker compared to the background of the image and increased the sensitivity from 0.85(default) to 0.9.
Below is the output image I am getting:

To get more information on the name value arguments of this function please refer to the below link:
0 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


