image thumbnail

Canny Edge Detector

by

 

The code computes the edge map for a grayscale image using canny detector

[Ie1]=gradingedges(Ie,Tl,Th)
function [Ie1]=gradingedges(Ie,Tl,Th)

[a b]=size(Ie);
Ie1=zeros([a b]);
for i=1:a
    for j=1:b
        if(Ie(i,j)>Th)
             Ie1(i,j)=Ie(i,j);
        elseif (Tl<Ie(i,j))&&(Ie(i,j)<Th)
                Ie1(i,j)=Ie(i,j);
        end
    end
end

Contact us