1

To do a low-pass filter, I have used a Gaussian kernel, then do a convolution with this kernel to have the smoothed version of my image. Since the spline basis function tend to give a sharper cut-off, I would like to build a spline 2d kernel. Does anyone have an idea about this? Thank you in advance!


Thank you for your response. In fact I have a look on butterworth filter, but I suppose it is in frequency domain and require infinite support. My problem is very specific. I want to find the coefficients matrix that apply the filtering directly on the image.

I have use Gaussian as following:

Build the kernel

Gau2D=@(x,y) 1/(sigma*2*pi)*exp(-(x.^2+y.^2)/sigma^2/2); 
[x,y] = meshgrid(-(k)/2:(k)/2);
ker = Gau2D(x,y);
ker = ker./sum(ker(:));

BLUR = convmtx2(ker,[M N]);

Apply on an image

img_filtered=BLUR*img(:);

I am thinking, for example, instead of using Gaussian kernel, I can use something like cardinal spline kernel, to increase the sharpness of the filter. But still, I can find the way to deal with it. Please help!

Andrew Barber
  • 39,603
  • 20
  • 94
  • 123
  • 1
    Splines are not a very standard way to do smoothing/filtering. There is a plethora of classic smoothing functions--and their spectral counterparts--that you can play with to tune sharpness and other effects. Just have a look at Butterworth or Chebyshev filters on Wikipedia for example, you'll find all the relevant formulas (almost) ready to use. – Emerald Weapon Oct 30 '14 at 10:15
  • Thank you very much, please see my response in the post! – nguyen van linh Oct 30 '14 at 14:04

0 Answers0