Circular Hough Transform.
function call:
[out_img1]=vsg('CircHough',in_img1,num1,num2,num3);
Arguments:
in_img1
input image, 3 channel
num1
– an integer representing the smallest circle to look for in the input
image.
num2
– an integer representing the largest circle to look for in the input
image.
num3
– an integer representing the size of the radius increment between num1
and num2.
Description:
The CircHough
function applies the generalized Hough Transform (HT) to detect circles
from a binary image.
out_img1
– An image displaying the Circular Hough transform of the input image.
The dimensions are the same as the input image dimension in the x and y
direction, and will have one slice for each size of circle to be found,
i.e. (num2-num1)/num3;
Example:
in_img1=openimage('circle.jpg');
in_img1=255*(in_img1>128);
h=figure, image(uint8(in_img1)); set(h,'Name','Input
image');
tic;[out_img1]=vsg('CircHough',in_img1,10,100,5);toc
[out_img2]=vsg('Threshold',out_img1,0.90*max(max(max(out_img1))));
[out_img3]=vsg('InvCircHough',out_img2,10,100,5);
[out_img4]=vsg('Add',in_img1,out_img3);
h=figure, image(uint8(out_img3)); set(h,'Name','Inv
circle hough image');
h=figure, image(uint8(out_img4));set(h,'Name','Combined
image');
Notes:
For