Want to find the circular regions
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
MD RESHAD UL HOQUE
am 3 Mär. 2019
Bearbeitet: MD RESHAD UL HOQUE
am 4 Mär. 2019
I want to detect circles and remove extra parts with zeros. I tried to detect it using matlab builin function hough transform but it could not detect any cirles. Can anyone suggest me how to detect those circles and remove the others parts (not circles)?
[centers, radii, metric] = imfindcircles(im,[1000 1100]);
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/206642/image.jpeg)
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 4 Mär. 2019
Compute the circularities and determine the circularity that is the dividing line between a circle and non-circle
labeledImage = bwlabel(binaryImage);
props = regionprops(labeledImage, 'Area', 'Perimeter');
allAreas = [props.Area];
allPerimeters = [props.Perimeter];
circularities = allPerimeters .^ 2 ./ (4 * pi * allAreas);
acceptableCircs = circularities < 4; % Or whatever works
indexes = find(acceptableCircs);
circBlobsOnly = ismember(labeledImage, indexes);
imshow(circBlobsOnly);
0 Kommentare
Weitere Antworten (0)
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!