Recognize centroids and radii of many circle
조회 수: 2 (최근 30일)
이전 댓글 표시

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
Image Analyst
2013년 10월 4일
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?
답변 (2개)
Image Analyst
2013년 10월 4일
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
Image Analyst
2013년 10월 23일
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.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


