ifw-odp 5.0.0
Loading...
Searching...
No Matches
Macros | Functions | Variables
clipm_align.c File Reference
#include "ifw/odp/clipm/clipm_align.h"
#include "ifw/odp/clipm/clipm_centroiding.h"
#include "ifw/odp/clipm/clipm_compatibility_replacements.h"
#include "ifw/odp/clipm/clipm_math.h"
#include "ifw/odp/clipm/clipm_math_correlation.h"
#include "ifw/odp/clipm/clipm_math_regression.h"
#include "ifw/odp/clipm/clipm_priv_array.h"
#include "ifw/odp/clipm/clipm_priv_checks.h"
#include "ifw/odp/clipm/clipm_priv_error.h"
#include "ifw/odp/clipm/clipm_priv_matrix.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

Macros

#define CLIPM_ALIGN_OPTDESC_MAXLEN   6
 
#define CLIPM_ALIGN_OPT_MAXSTRLEN
 
#define _clipm_align_TRY_CHECK_NPOINTS(npoints, ndims)
 
#define _clipm_align_TRY_EXIT_BADMODE(void)
 

Functions

void clipm_align_opt_sprint_literal (char *str, clipm_align_opt opt)
 Print alignment option in human-readable form into a string.
 
cpl_error_code clipm_align_points (const cpl_matrix *ref_points, const cpl_matrix *in_points, const cpl_matrix *ref_variances, const cpl_matrix *in_variances, clipm_align_opt align_mode_bitmask, cpl_matrix **transform_matrix, cpl_matrix **shift, cpl_matrix **residuals)
 The linear transformation between two sets of point coordinates is determined.
 
cpl_error_code clipm_align_correlate (const cpl_image *ref_img, const cpl_image *test_img, const cpl_matrix *ref_locations, const cpl_matrix *test_locations, unsigned int area_size, double max_distance, clipm_align_opt align_mode_bitmask, cpl_matrix **pixel_transform_matrix, cpl_matrix **pixel_transshiftvector, cpl_matrix **all_pixelshifts, cpl_matrix **all_locationshifts, cpl_matrix **all_uncertainties, cpl_array **all_error_codes)
 Align two images by correlation of sub-regions.
 

Variables

const clipm_align_opt CLIPM_ALIGN_SHIFT = ((unsigned) 1 << 1)
 Shifting allowed.
 
const clipm_align_opt CLIPM_ALIGN_SCALE = ((unsigned) 1 << 2)
 Scaling allowed.
 
const clipm_align_opt CLIPM_ALIGN_ROTATE = ((unsigned) 1 << 3)
 Rotation allowed.
 
const clipm_align_opt CLIPM_ALIGN_FREE = ((unsigned) 1 << 4)
 All parameters are free.
 
const clipm_align_opt CLIPM_ALIGN_ROBUST = ((unsigned) 1 << 5)
 Robust computation, ignore outliers.
 

Macro Definition Documentation

◆ _clipm_align_TRY_CHECK_NPOINTS

#define _clipm_align_TRY_CHECK_NPOINTS ( npoints,
ndims )
Value:
do { \
if (npoints <= ndims) \
{ \
char modestr[CLIPM_ALIGN_OPT_MAXSTRLEN], \
errstr[256]; \
clipm_align_opt_sprint_literal( modestr, \
align_mode_bitmask); \
sprintf( errstr, \
"!((npoints=%"CPL_SIZE_FORMAT \
") > (ndims=%"CPL_SIZE_FORMAT \
")) in " \
"align mode", \
npoints, \
ndims); \
CLIPM_TRY_EXIT_WITH_ERROR_MSG( CPL_ERROR_ILLEGAL_INPUT, \
errstr, \
modestr); \
} \
} while (0)
#define CLIPM_ALIGN_OPT_MAXSTRLEN

◆ _clipm_align_TRY_EXIT_BADMODE

#define _clipm_align_TRY_EXIT_BADMODE ( void)
Value:
do { \
char modestr[CLIPM_ALIGN_OPT_MAXSTRLEN]; \
clipm_align_opt_sprint_literal( modestr, \
align_mode_bitmask); \
CLIPM_TRY_EXIT_WITH_ERROR_MSG( CPL_ERROR_UNSUPPORTED_MODE, \
modestr, \
""); \
} while (0)

◆ CLIPM_ALIGN_OPT_MAXSTRLEN

#define CLIPM_ALIGN_OPT_MAXSTRLEN
Value:
(5+1) * \
#define CLIPM_ALIGN_OPTDESC_MAXLEN

◆ CLIPM_ALIGN_OPTDESC_MAXLEN

#define CLIPM_ALIGN_OPTDESC_MAXLEN   6