]> AND Private Git Repository - these_gilles.git/blob - THESE/codes/graphe/Ncut_9/ICgraph.m
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
final rapporteurs ?
[these_gilles.git] / THESE / codes / graphe / Ncut_9 / ICgraph.m
1 function [W,imageEdges] = ICgraph(I,dataW,dataEdgemap);\r
2 % [W,imageEdges] = ICgraph(I,dataW,dataEdgemap);\r
3 % Input:\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
9\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
12\r
13 % Output: \r
14 % W: npixels x npixels similarity matrix based on Intervening Contours\r
15 % imageEdges: image showing edges extracted in the image\r
16 %\r
17 % Timothee Cour, Stella Yu, Jianbo Shi, 2004.\r
18 \r
19 \r
20 \r
21 [p,q] = size(I);\r
22 \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
27 end\r
28 \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
32 end\r
33 \r
34 \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