ifw-odp  2.0.0-alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Macros | Functions | Variables
clipm_align.c File Reference
#include "clipm_align.h"
#include "clipm_centroiding.h"
#include "clipm_compatibility_replacements.h"
#include "clipm_math.h"
#include "clipm_math_correlation.h"
#include "clipm_math_regression.h"
#include "clipm_priv_array.h"
#include "clipm_priv_checks.h"
#include "clipm_priv_error.h"
#include "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. More...
 
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. More...
 
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. More...
 

Variables

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

Macro Definition Documentation

#define _clipm_align_TRY_CHECK_NPOINTS (   npoints,
  ndims 
)
Value:
do { \
if (npoints <= ndims) \
{ \
char modestr[CLIPM_ALIGN_OPT_MAXSTRLEN], \
errstr[256]; \
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
void clipm_align_opt_sprint_literal(char *str, clipm_align_opt opt)
Print alignment option in human-readable form into a string.
Definition: clipm_align.c:483
#define CLIPM_TRY_EXIT_WITH_ERROR_MSG(code, object, msg)
Set a new CPL error together with a custom error message, and exit the try-block. ...
Definition: clipm_priv_error.h:440
#define _clipm_align_TRY_EXIT_BADMODE (   void)
Value:
do { \
align_mode_bitmask); \
CLIPM_TRY_EXIT_WITH_ERROR_MSG( CPL_ERROR_UNSUPPORTED_MODE, \
modestr, \
""); \
} while (0)
#define CLIPM_ALIGN_OPT_MAXSTRLEN
void clipm_align_opt_sprint_literal(char *str, clipm_align_opt opt)
Print alignment option in human-readable form into a string.
Definition: clipm_align.c:483
#define CLIPM_TRY_EXIT_WITH_ERROR_MSG(code, object, msg)
Set a new CPL error together with a custom error message, and exit the try-block. ...
Definition: clipm_priv_error.h:440
#define CLIPM_ALIGN_OPT_MAXSTRLEN
Value:
(5+1) * \
#define CLIPM_ALIGN_OPTDESC_MAXLEN
#define CLIPM_ALIGN_OPTDESC_MAXLEN   6