The Rescale algorithm is used to scale the input image by means of resampling its content to make it conform to the output image dimensions.
No pre-filtering is applied, it's expected that the input content doesn't have frequencies higher than the Nyquist limit to avoid aliasing artifacts when downsampling.
Several interpolation methods are available, allowing trade-offs between quality and performance.
For every output pixel, calculate the corresponding input pixel using the formula:
\[ \mathit{out}[x,y] = P(f_x x, f_y y) \]
where P depends on the interpolation method used.
Sampling operation considers that whole coordinates fall on pixel center.
Usage
Language:
Import VPI module
import vpi
Rescale the VPI image input so that output has 66% of the original width and height is increased 50%, all using the CUDA backend. It's using the linear interpolation.
Daniel Ruijters, Bart M. ter Romeny, Paul Suetens (2008) "Efficient GPU-Based Texture Interpolation using Uniform B-Spline"
Journal of Graphics Tools, 13:4 61-69.
Generated by NVIDIA | Fri Aug 13 2021 09:32:55 | 55ed17af2960f24b00e35a7301c232591a977d1a