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

Private GIT Repository
19 oct
[these_gilles.git] / THESE / codes / graphe / Ncut_9 / doog1.m
1 function H=doog1(sig,r,th,N);
2 % H=doog1(sig,r,th,N);
3 % Serge Belongie
4
5 no_pts=N;  % no. of points in x,y grid
6
7 [x,y]=meshgrid(-(N/2)+1/2:(N/2)-1/2,-(N/2)+1/2:(N/2)-1/2);
8
9 phi=pi*th/180;
10 sigy=sig;
11 sigx=r*sig;
12 R=[cos(phi) -sin(phi); sin(phi) cos(phi)];
13 C=R*diag([sigx,sigy])*R';
14
15 X=[x(:) y(:)];
16
17 Gb=gaussian(X,[0 0]',C);
18 Gb=reshape(Gb,N,N);
19
20 m=R*[0 sig]';
21
22 a=1;
23 b=-1;
24
25 % make odd-symmetric filter
26 Ga=gaussian(X,m/2,C);
27 Ga=reshape(Ga,N,N);
28 Gb=rot90(Ga,2);
29 H=a*Ga+b*Gb; 
30