1 function [W,imageEdges] = ICgraph(I,dataW,dataEdgemap);
\r
2 % [W,imageEdges] = ICgraph(I,dataW,dataEdgemap);
\r
4 % I = gray-level image
\r
5 % optional parameters:
\r
6 % dataW.sampleRadius=10;
\r
7 % dataW.sample_rate=0.3;
\r
8 % dataW.edgeVariance = 0.1;
\r
10 % dataEdgemap.parametres=[4,3, 21,3];%[number of filter orientations, number of scales, filter size, elongation]
\r
11 % dataEdgemap.threshold=0.02;
\r
14 % W: npixels x npixels similarity matrix based on Intervening Contours
\r
15 % imageEdges: image showing edges extracted in the image
\r
17 % Timothee Cour, Stella Yu, Jianbo Shi, 2004.
\r
23 if (nargin< 2) | isempty(dataW),
\r
24 dataW.sampleRadius=10;
\r
25 dataW.sample_rate=0.3;
\r
26 dataW.edgeVariance = 0.1;
\r
29 if (nargin<3) | isempty(dataEdgemap),
\r
30 dataEdgemap.parametres=[4,3, 21,3];%[number of filter orientations, number of scales, filter size, elongation]
\r
31 dataEdgemap.threshold=0.02;
\r
35 edgemap = computeEdges(I,dataEdgemap.parametres,dataEdgemap.threshold);
\r
36 imageEdges = edgemap.imageEdges;
\r
37 W = computeW(I,dataW,edgemap.emag,edgemap.ephase);
\r