matlab - Circle detection via Hough Transform -
i writing matlab code takes in photo , detects circular object. after using filters, got below image.
to detect circular object(it not perfect circle), tried apply hough transform passing different values of radius , threshold, couldn't detect properly. why happens? shape of object or background of image?
also possible detect same object @ following image using hough transform?
edge of circular object seems human eye, not sure background can eliminated image via hough transform.
you can use imfindcircles in image processing toolbox. using morphology fill in circle , cranking sensitivity may help:
im = imread('pattern.jpg'); im2 = rgb2gray(im(100:end-100, 100:end-100, :)); im3 = im2bw(im2, 0.1); im4 = imclose(im3, strel('disk', 4, 4)); im5 = imfill(im4, 'holes'); imshow(im5); [centers, radii] = imfindcircles(im5, [180, 200], 'sensitivity', .99); viscircles(centers, radii);
Comments
Post a Comment