Create a Lanczos filter.
Create a Lanczos filter.
Window width, default value is 2.
Linear scaling of input image size to output image size, default value is 2.
Create a Lanczos filter as a matrix.
Create a Lanczos filter as a matrix.
Window width, default value is 2.
Linear scaling of input image size to output image size, default value is 2.
The LanczosFilter is used for resampling discrete images, especially upsampling, to interpolate missing values. This implementation is used mainly for 2X upsampling, meaning that an M x N image is interpolated to a 2M x 2N image. To use this kernel, convert the M x N image to 2M x 2N by inserting zeroes in the unsampled points, then convolving that with this kernel. Higher upsampling is also possible (below).
The filter has a parameter, a, which implicitly defines the size of the filter. In practice, only two values of a are used:
a kernel size ------------------ 2 7 x 7 3 11 x 11
The default value for a is 2 since it is the "best compromise in terms of reduction of aliasing, sharpness, and minimal ringing." See http://en.wikipedia.org/wiki/Lanczos_resampling for a discussion of this.
The second parameter, upsampleFactor, defines how much interpolation is to be done. The default value is 2. For a larger value, say K, convert the M x N image to a KM x KN image by inserting zeros and convolving with this kernel.