1 function W = computeW(imageX,dataW,emag,ephase)
\r
2 % W = computeW(imageX,dataW,emag,ephase)
\r
3 % Timothee Cour, Stella Yu, Jianbo Shi, 2004.
\r
4 [p,q] = size(imageX);
\r
6 [w_i,w_j] = cimgnbmap([p,q],dataW.sampleRadius,dataW.sample_rate);
\r
8 W = affinityic(emag,ephase,w_i,w_j,max(emag(:)) * dataW.edgeVariance);
\r