Image resampling

sinfo_new_generate_interpolation_kernel

Generate an interpolation kernel to use in this module.

Parameters:
kernel_type Type of interpolation kernel.
Returns:
1 newly allocated array of doubles.

Provide the name of the kernel you want to generate. Supported kernel types are:

{tabular}{ll} NULL & default kernel, currently "tanh" \ "default" & default kernel, currently "tanh" \ "tanh" & Hyperbolic tangent \ "sinc2" & Square sinfo_new_sinc \ "lanczos" & Lanczos2 kernel \ "hamming" & Hamming kernel \ "hann" & Hann kernel {tabular}

The returned array of doubles is ready of use in the various re-sampling functions in this module. It must be deallocated using cpl_free().



double * sinfo_new_generate_interpolation_kernel (const char *kernel_type)

sinfo_new_warp_image_generic

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.



cpl_image * sinfo_new_warp_image_generic (cpl_image *image_in, char *kernel_type, cpl_polynomial *poly_u, cpl_polynomial *poly_v)

sinfo_new_generate_tanh_kernel

Generate a hyperbolic tangent kernel.

Parameters:
steep Steepness of the hyperbolic tangent parts.
Returns:
1 pointer to a newly allocated array of doubles.

The following function builds up a good approximation of a box filter. It is built from a product of hyperbolic tangents. It has the following properties:

{itemize} It converges very quickly towards +/- 1. The converging transition is very sharp. It is infinitely differentiable everywhere (i.e. smooth). The transition sharpness is scalable. {itemize}

The returned array must be deallocated using cpl_free().



double * sinfo_new_generate_tanh_kernel (double steep)
#define hk_gen(x, s)   (((tanh(s*(x+0.5))+1)/2)*((tanh(s*(-x+0.5))+1)/2))

new_reverse_tanh_kernel

Bring a hyperbolic tangent kernel from Fourier to normal space.

Parameters:
data Kernel samples in Fourier space.
nn Number of samples in the input kernel.
Returns:
void

Bring back a hyperbolic tangent kernel from Fourier to normal space. Do not try to understand the implementation and DO NOT MODIFY THIS FUNCTION.



#define KERNEL_SW(a, b)   tempr=(a);(a)=(b);(b)=tempr

sinfo_new_show_interpolation_kernel

Print out an interpolation kernel values on stdout.

Parameters:
kernel_name Name of the kernel to print out.
Returns:
void

Takes in input a kernel name, generates the corresponding kernel and prints it out on stdout, then discards the generated kernel.

For debugging purposes mostly.



void sinfo_new_show_interpolation_kernel (char *kernel_name)

Detailed Description

TBD


Generated on 8 Mar 2011 for SINFONI Pipeline Reference Manual by  doxygen 1.6.1