How to get a uniform circle?
Mostrar comentarios más antiguos
Hi I have the following Image of a circle I want to make its edges uniform can any body help ??

Respuesta aceptada
Más respuestas (1)
Image Analyst
el 25 de Dic. de 2013
Editada: Image Analyst
el 25 de Dic. de 2013
Get the area and the Equivalent Circular Diameter of the black spot with regionprops. Then use the FAQ or rectangle() to draw a perfect circle.
binaryImage = grayImage < 128;
measurements = regionprops(binaryImage, 'Centroid', 'EquivDiameter');
centroid = [measurements.Centroid]
diameter = measurements.EquivDiameter
% Draw circle in the overlay.
rectangle('Position',[centroid(1)-diameter/2,centroid(2)-diameter/2,diameter, diameter],...
'Curvature',[1,1],'LineWIdth', 2, 'EdgeColor', 'r');
Attached is the full blown demo. Let me know of any difficulties.
1 comentario
Christine Ak
el 26 de Dic. de 2013
Categorías
Más información sobre Image Arithmetic en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!