1 function edgemap = computeEdges(imageX,parametres,threshold)
\r
2 % edgemap = computeEdges(imageX,parametres,threshold)
\r
4 % computes the edge in imageX with parameters parametres and threshold
\r
5 % Timothee Cour, Stella Yu, Jianbo Shi, 2004.
\r
7 [ex,ey,egx,egy,eg_par,eg_th,emag,ephase , g ] = quadedgep(imageX,parametres,threshold);
\r
8 % example : [ex,ey,egx,egy,eg_par,eg_th,emag,ephase] = quadedgep(imageX,[4,3,30,3],0.05);
\r
10 % [emagTrie,eindex] = sort(emag);
\r
12 %edges3 = sparse(floor(ex),floor(ey),(egx.^2+egy.^2).^(1/2),size(imageX,2),size(imageX,1))';
\r
15 edges2 = emag .* edge(imageX,'canny') ;
\r
16 %edges2 = emag .* edge(imageX,'sobel') ;
\r
21 edges2 = edges2 .* (edges2 > threshold);
\r
24 eindex = find(edges2);
\r
25 [ey,ex,values] = find(edges2);
\r
30 edgemap.eindex = eindex;
\r
31 edgemap.values = values;
\r
36 edgemap.emag = emag;
\r
37 edgemap.ephase = ephase;
\r
38 edgemap.imageEdges = edges2;
\r