function map = integrateImage(sl_x,sl_y,method)

if (~exist('method','var'))
    method=0;
end
switch method
    case 0
        Fsl_x = fft2(sl_x);
        Fsl_y = fft2(sl_y);

        fx = 0.1;
        fy = 0.1;

        map = ifft2(1i*(fx*Fsl_x+fy*Fsl_y)/(-2*pi*(fx^2+fy^2)));
    case 1
        sz = size(sl_x);
        zx = zeros(size(sl_x));
        zy = zeros(size(sl_y));

        for i=1:sz(1)
           zx(i,1)=0;
           for j=2:sz(2)
               zx(i,j) = zx(i,j-1)+sl_x(i,j);
           end
        end

        for j=1:sz(2)
           zy(1,j)=0;
           for i=2:sz(1)
               zy(i,j) = zy(i-1,j)+sl_y(i,j);
           end
        end

        map=sqrt(zx.^2+zy.^2);
    case 2
        
        
end

return