Adapt my circlular hough transform code for unknown radius
Afficher commentaires plus anciens
Hi I am currently working on a project for iris recognition. I need to use hough transform to find the outer boundry of an iris. I have a working set of code to find circles with a known radius but I don't know how I can adapt it for unknown radii
function HTC (edge, r) %edge being the input image
[rows, columns]=size(edge);
acc=zeros(rows, columns);
for x=1:rows
for y=1:columns
if(edge(x,y)==1)
for ang=0:360
t=(ang*pi)/180;
x0=round(x-r*cos(t));
y0=round(y-r*sin(t));
if(x0<rows & x0>0 & y0<columns & y0>0)
acc(x0,y0) =acc(x0,y0)+1;
end
end
end
end
end
imtool(acc,[])
Réponses (0)
Catégories
En savoir plus sur Hough Transform dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!