matlab - Circle Detection Image Processing boolean output -
i working on implementing hough transform circle detection in image in camera preview. image going follows after thresholding.
i introduced hough transform , using following code.
[rows,columns] = size(circle); acc = zeros(rows,columns); r=9; x=1:columns y=1:rows if(circle(y,x)==0) ang=0:360 t=(ang*pi)/180; x0=round(x-r*cos(t)); y0=round(y-r*sin(t)); if(x0<columns && x0>0 && y0<rows && y0>0) acc(y0,x0)=acc(y0,x0)+1; end end end end end
how use accumulator return boolean value(e.g true if there circle else false).
please let me know if there simpler ways can using hough transform. thank you.
there matlab function problem use http://de.mathworks.com/help/images/ref/imfindcircles.html
or want write hough-transform yourself?
Comments
Post a Comment