kernelgauss2Dsteerable

PURPOSE ^

Computes the Kernel matrix

SYNOPSIS ^

function K=kernelgauss2Dsteerable(L,a,b,alfa)

DESCRIPTION ^

 Computes the Kernel matrix

 K = kernelgauss2Dsteerable(L,a,b,alfa)

  Example:

    L = 16;% block size
    a = 2; % width
    b = 1; % height
    alfa = 70; % orientation (horizontal = 0; vertical = 90);

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % Computes the Kernel matrix
0002 %
0003 % K = kernelgauss2Dsteerable(L,a,b,alfa)
0004 %
0005 %  Example:
0006 %
0007 %    L = 16;% block size
0008 %    a = 2; % width
0009 %    b = 1; % height
0010 %    alfa = 70; % orientation (horizontal = 0; vertical = 90);
0011 %
0012 function K=kernelgauss2Dsteerable(L,a,b,alfa)
0013 [x,y]=meshgrid([1:L],[1:L]);
0014 s=sin(-alfa*pi/180);
0015 c=cos(-alfa*pi/180);
0016 cc=c^2;ss=s^2;aa=a^2;bb=b^2;
0017 i=1;
0018 for xm=1:L
0019     for ym=1:L
0020         g=exp(-pi*(2*(bb-aa)*c*s*(x-xm).*(y-ym)+(bb*cc+aa*ss)*(x-xm).^2+(aa*cc+bb*ss)*(y-ym).^2)/(aa*bb));
0021         g=g/max(max(g));
0022         K(i,:)=g(:)';
0023         i=i+1;
0024     end
0025 end

Generated on Fri 07-Mar-2014 13:28:33 by m2html © 2005