3

Does anybody know of a way to shift data by a fraction of a sample by using sinc interpolation? For example, shift an image to the right by 0.1 pixels.

I'm struggling to find a formula or reference that explains how to generate such a kernel, and I already know how to do it in the frequency domain....

I'm thinking something like:

function kernel=subpixelshifter(shift)
trange=[-1,0,1]-shift;
kernel=lanczos3(trange);
end
function x=lanczos3(x)
bad= x>3;
x=sinc(x).*sinc(x/3);
x(bad)=0;
end
Mikhail
  • 528
  • 4
  • 13
  • 1
    it's the Nyquist/Shannon/Whitaker sampling and reconstruction theorem. – robert bristow-johnson Mar 27 '15 at 15:15
  • 7
    This is also called a fractional delay filter. Generate a sinc(n-fraction) function, multiply it by a window (truncation causes artifacts), and convolve your signal with it. The longer the tails of the sinc function you include, the better the quality will be. – endolith Mar 27 '15 at 16:37

0 Answers0