Functions | |
cpl_image ** | cpl_geom_img_offset_combine (cpl_imagelist *ilist, const cpl_bivector *offs, int refine, const cpl_bivector *aperts, const cpl_vector *sigmas, int *pisigma, int s_hx, int s_hy, int m_hx, int m_hy, int min_rej, int max_rej, cpl_geom_combine union_flag) |
Images list recombination. | |
cpl_bivector * | cpl_geom_img_offset_fine (const cpl_imagelist *ilist, const cpl_bivector *estimates, const cpl_bivector *anchors, int s_hx, int s_hy, int m_hx, int m_hy, cpl_vector *correl) |
Get the offsets by correlating the images. | |
cpl_image ** | cpl_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. |
#include "cpl_geom_img.h"
cpl_image** cpl_geom_img_offset_combine | ( | cpl_imagelist * | ilist, | |
const cpl_bivector * | offs, | |||
int | refine, | |||
const cpl_bivector * | aperts, | |||
const cpl_vector * | sigmas, | |||
int * | pisigma, | |||
int | s_hx, | |||
int | s_hy, | |||
int | m_hx, | |||
int | m_hy, | |||
int | min_rej, | |||
int | max_rej, | |||
cpl_geom_combine | union_flag | |||
) |
Images list recombination.
ilist | Input imagelist - may be empty on return | |
offs | List of offsets estimates in x and y or NULL if unknown | |
refine | Flag to refine the estimated offsets or not | |
aperts | List of correlation apertures or NULL if unknown | |
sigmas | Positive, decreasing sigmas to apply | |
pisigma | Index of the sigma that was used or undefined on error | |
s_hx | Search area half-width. | |
s_hy | Search area half-height. | |
m_hx | Measurement area half-width. | |
m_hy | Measurement area half-height. | |
min_rej | number of low values to reject in stacking | |
max_rej | number of high values to reject in stacking | |
union_flag | Combination mode (CPL_GEOM_UNION or CPL_GEOM_INTERSECT) |
The input image list is purged from bad correlating frames.
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.
The bad pixel map of the input images list is ignored, and the bad pixel map of the output image is empty.
The returned image array contains 2 images:
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_bivector* cpl_geom_img_offset_fine | ( | const cpl_imagelist * | ilist, | |
const cpl_bivector * | estimates, | |||
const cpl_bivector * | anchors, | |||
int | s_hx, | |||
int | s_hy, | |||
int | m_hx, | |||
int | m_hy, | |||
cpl_vector * | correl | |||
) |
Get the offsets by correlating the images.
ilist | Input image list | |
estimates | First-guess estimation of the offsets | |
anchors | List of anchor points | |
s_hx | Half-width of search area | |
s_hy | Half-height of search area | |
m_hx | Half-width of measurement area | |
m_hy | Half-height of measurement area | |
correl | List of cross-correlation quality factors |
The images in the input list must only differ from a shift. In order from the correlation to work, they must have the same level (check the average values of your input images if the correlation does not work).
The supported types are CPL_TYPE_DOUBLE and CPL_TYPE_FLOAT. The bad pixel maps are ignored by this function.
The ith offset (offsx, offsy) in the returned offsets is the one that have to be used to shift the ith image to align it on the reference image (the first one).
If not NULL, the returned cpl_bivector must be deallocated with cpl_bivector_delete().
Possible _cpl_error_code_ set in this function:
cpl_image** cpl_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.
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 |
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:
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: