High level functions for geometric transformations

Functions

cpl_image ** hawki_geom_img_offset_saa (const cpl_imagelist *ilist, const cpl_bivector *offs, cpl_kernel kernel, int rejmin, int rejmax, cpl_geom_combine union_flag, double *ppos_x, double *ppos_y)
 Shift and add an images list to a single image.

Detailed Description

This module contains functions to compute the shift-and-add operation on an image list.

Synopsis:
   #include "hawki_geom_img.h"

Function Documentation

cpl_image** hawki_geom_img_offset_saa ( const cpl_imagelist *  ilist,
const cpl_bivector *  offs,
cpl_kernel  kernel,
int  rejmin,
int  rejmax,
cpl_geom_combine  union_flag,
double *  ppos_x,
double *  ppos_y 
)

Shift and add an images list to a single image.

Parameters:
ilist Input image list
offs List of offsets in x and y
kernel Interpolation kernel to use for resampling
rejmin Number of minimum value pixels to reject in stacking
rejmax Number of maximum value pixels to reject in stacking
union_flag Combination mode (CPL_GEOM_UNION or CPL_GEOM_INTERSECT)
ppos_x If non-NULL, *ppos_x is the X-position of the first image in the combined image
ppos_y If non-NULL, *ppos_y is the Y- position of the first image in the combined image
Returns:
Pointer to newly allocated images array, or NULL on error.

The supported types are CPL_TYPE_DOUBLE, CPL_TYPE_FLOAT.

The number of provided offsets shall be equal to the number of inputs images. The ith offset (offs_x, offs_y) is the offset that has to be used to shift the ith image to align it on the first one.

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

  • CPL_KERNEL_DEFAULT: default kernel, currently CPL_KERNEL_TANH
  • CPL_KERNEL_TANH: Hyperbolic tangent
  • CPL_KERNEL_SINC: Sinus cardinal
  • CPL_KERNEL_SINC2: Square sinus cardinal
  • CPL_KERNEL_LANCZOS: Lanczos2 kernel
  • CPL_KERNEL_HAMMING: Hamming kernel
  • CPL_KERNEL_HANN: Hann kernel

If the number of input images is lower or equal to 3, the rejection parameters are ignored. If the number of input images is lower or equal to 2*(rejmin+rejmax), the rejection parameters are ignored.

The bad pixel map of the input images list is ignored, and the bad pixel map of the output image is empty.

If not NULL, the returned cpl_image array arr must be deallocated like:

  if (arr[0] != NULL) cpl_image_delete(arr[0]);
  if (arr[1] != NULL) cpl_image_delete(arr[1]);
  cpl_free(arr);

Possible _cpl_error_code_ set in this function:

  • CPL_ERROR_NULL_INPUT if (one of) the input pointer(s) is NULL
  • CPL_ERROR_ILLEGAL_INPUT if ilist is invalid or if rejmin or rejmax is negative
  • CPL_ERROR_ILLEGAL_OUTPUT if no valid correlation points are found
  • CPL_ERROR_INVALID_TYPE if the passed image list type is not supported
  • CPL_ERROR_UNSUPPORTED_MODE if the union_flag is not one of the supported combination modes, which are CPL_GEOM_INTERSECT, CPL_GEOM_UNION, CPL_GEOM_FIRST.

Definition at line 185 of file hawki_geom_img.c.


Generated on 10 Jun 2010 for HAWKI Pipeline Reference Manual by  doxygen 1.6.1