N = 58;
[yy,xx]=ndgrid([-N/2:N/2-1]);
ang = pi/6;
sz = sqrt(2).*sin(ang);
xr = xx.*cos(ang) + yy.*sin(ang);
yr = -xx.*sin(ang) + yy.*cos(ang);
rks = sinc(xr.*sz).*sinc(yr.*sz);
rsqr = real(fftshift(fft(fftshift(rks))));  % the image

h = [ 0  -1 -1 -1  0;
      -1 -1 -1 -1 -1;
       3  5  5  5  3;
      -1 -1 -1 -1 -1;
       0 -1 -1 -1  0];  % the filter
   
