How to get a uniform circle?
Ältere Kommentare anzeigen
Hi I have the following Image of a circle I want to make its edges uniform can any body help ??

Akzeptierte Antwort
Weitere Antworten (1)
Image Analyst
am 25 Dez. 2013
Bearbeitet: Image Analyst
am 25 Dez. 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 Kommentar
Christine Ak
am 26 Dez. 2013
Kategorien
Mehr zu Image Arithmetic finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!