title: Octave/Matlab High Boost filtering
body: <p>I have to use a Gaussian lowpass filter for the blurring step and then I have to improve the sharpness of the result using high-boost filtering.
  Here is what I have so far: </p>
  
  <pre><code>I=imread('blurry-moon.tif');
  
  A = fft2(double(I));
  Ashift=fftshift(A);
  
  [m n]=size(A); 
  R=10; 
  X=0:n-1;
  Y=0:m-1;
  [X Y]=meshgrid(X,Y);
  Cx=0.5*n;
  Cy=0.5*m;
  LoF=exp(-((X-Cx).^2+(Y-Cy).^2)./(2*R).^2);
  
  Gauss=Ashift.*LoF;
  GaussShift=ifftshift(Gauss);
  InverseGauss=ifft2(GaussShift);
  
  %High boost
  f = double(InverseGauss);
  [m n]=size(f);
  J0 = f;
  for i=3:m-2
      for j=3:n-2
          J0(i,j) = (-8*f(i,j))+(1*f(i-1,j))+(1*f(i+1,j))+(1*f(i,j-1))+(1*f(i,j+1))...
      +(1*f(i-1,j-1))+(1*f(i+1,j+1))+(1*f(i-1,j+1))+(1*f(i+1,j-1)); 
      end
  end
  
  %----visualizing the results----------------------------------------------
  
  figure(1)
  imshow(I);colormap gray
  title('original image','fontsize',14)
  
  figure(2)
  imshow(abs(Ashift),[-12 300000]), colormap gray
  title('fft of original image','fontsize',14)
  
  
  figure(3)
  imshow(abs(InverseGauss),[12 290]), colormap gray
  title('low pass filtered image','fontsize',14)
  
  figure(4)
  imshow(abs(J0),[12 290]), colormap gray
  title('final image','fontsize',14)
  </code></pre>
  
  <p>I think I do something wrong in the high boost. But I think I am doing the gaussian filter right?
  Can someone help out with the high boost filter?</p>
  
  <p>Best regards!</p>