Warp an image according to a polynomial transformation.
- Parameters:
-
| image_in | Image to warp. |
| kernel_type | Interpolation kernel to use. |
| poly_u | Polynomial transform in U. |
| poly_v | Polynomial transform in V. |
- Returns:
- 1 newly allocated image.
Warp an image according to a polynomial transform. Provide two polynomials (see poly2d.h for polynomials in this library) Pu and Pv such as:
{verbatim} x = sinfo_poly2d_compute(Pu, u, v) y = sinfo_poly2d_compute(Pv, u, v) {verbatim}
Attention! The polynomials define a reverse transform. (u,v) are coordinates in the warped image and (x,y) are coordinates in the original image. The transform you provide is used to compute from the warped image, which pixels contributed in the original image.
The output image will have strictly the same size as in the input image. Beware that for extreme transformations, this might lead to blank images as result.
See the function sinfo_generate_interpolation_kernel() for possible kernel types. If you want to use a default kernel, provide NULL for kernel type.
The returned image is a newly allocated objet, use cpl_image_delete() to deallocate it.
|