How to get a uniform circle?
Afficher commentaires plus anciens
Hi I have the following Image of a circle I want to make its edges uniform can any body help ??

Réponse acceptée
Plus de réponses (1)
Image Analyst
le 25 Déc 2013
Modifié(e) : Image Analyst
le 25 Déc 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 commentaire
Christine Ak
le 26 Déc 2013
Catégories
En savoir plus sur Image Arithmetic 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!