Recognize centroids and radii of many circle
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen

I have an image that contains many broken/slightly deformed circles because it is a cross section of an object. I need to be able to recognize the centroids and radii of them. I have attached the picture below. I have the image processing toolbox and have tried the method in the link below but it returns no radii or centroids. I have estimated the radius to be between 25 and 75. I also attached my code and picture I used.
img = imread('img.png'); %Reads image from directory
red = img(:,:,2); %Use first (red) color plane
red = adapthisteq(red); %Use adaptive histogram equalization
tic
[accum,circen,cirrad] = CircularHough_Grd(red,[15 75],20,13,1);
toc
if any(cirrad <= 0) %Eliminate zero radii
inds = find(cirrad>0);
cirrad = cirrad(inds);
circen = circen(inds,:);
end
imshow(red);
hold on;
plot(circen(:,1), circen(:,2), 'r+');
for ii = 1 : size(circen, 1)
rectangle('Position',[circen(ii,1) - cirrad(ii), circen(ii,2) - cirrad(ii), 2*cirrad(ii), 2*cirrad(ii)],...
'Curvature', [1,1], 'edgecolor', 'b', 'linewidth', 1.5);
end
hold off;
1 Kommentar
Image Analyst
am 4 Okt. 2013
I don't see the img.png that you attached. Are you sure you attached it? Did you use the image icon or the paper clip icon?
Antworten (2)
Image Analyst
am 4 Okt. 2013
I don't see your image. Can you use a method like in my Image Segmentation Tutorial : http://www.mathworks.com/matlabcentral/fileexchange/25157-image-segmentation-tutorial-blobsdemo?
11 Kommentare
Image Analyst
am 23 Okt. 2013
No - I just haven't had time, and I'm about to leave town again in a few hours for a few days so I may not get to it soon, if ever. Sorry.
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


