ifw  0.0.1-dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
clipm_math_correlation.h
Go to the documentation of this file.
1 
2 /*********************************************************************
3  * E.S.O. - VLT project
4  *
5  * "@(#) $Id: clipm_math_correlation.h 262698 2014-12-08 19:15:42Z cgarcia $"
6  *
7  * Functions for signal correlations
8  *
9  * who when what
10  * -------- ---------- ----------------------------------------------
11  * hlorch 2007-03-05 created
12  */
13 
14 #ifndef CLIPM_MATH_CORRELATION_H
15 #define CLIPM_MATH_CORRELATION_H
16 
17 /*-----------------------------------------------------------------------------
18  Includes
19  -----------------------------------------------------------------------------*/
20 
21 #include <cpl.h>
22 
23 /*-----------------------------------------------------------------------------
24  Declaration Block
25  -----------------------------------------------------------------------------*/
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
31 /*-----------------------------------------------------------------------------
32  Types
33  -----------------------------------------------------------------------------*/
34 
49 typedef unsigned int clipm_coverage_mode;
50 
53 extern const clipm_coverage_mode CLIPM_COVERAGE_VALID;
56 extern const clipm_coverage_mode CLIPM_COVERAGE_SAME;
58 extern const clipm_coverage_mode CLIPM_COVERAGE_FULL;
60 extern const clipm_coverage_mode CLIPM_COVERAGE_CUSTOM;
61 
64 /*-----------------------------------------------------------------------------
65  Prototypes
66  -----------------------------------------------------------------------------*/
67 
69  cpl_size size1,
70  cpl_size size2,
71  cpl_size custom_xy_outsize,
72  clipm_coverage_mode cov);
73 
74 cpl_error_code clipm_math_get_coverage_size(
75  const cpl_size *size1,
76  const cpl_size *size2,
77  const cpl_size *custom_xy_outsize,
78  cpl_size *out_size,
79  int ndims,
80  clipm_coverage_mode cov);
81 
82 cpl_matrix *clipm_math_xcorr_image( const cpl_image *image1,
83  const cpl_image *image2,
84  const cpl_size *window1,
85  const cpl_size *window2,
86  clipm_coverage_mode cov,
87  const cpl_size *custom_xy_outsize,
88  cpl_matrix **overlap_map);
89 
90 cpl_matrix *clipm_math_xcorr_matrix( const cpl_matrix *m1,
91  const cpl_matrix *m2,
92  clipm_coverage_mode cov,
93  const cpl_size *custom_xy_outsize,
94  cpl_matrix **overlap_map);
95 
96 cpl_matrix *clipm_math_normxcorr_image(const cpl_image *image1,
97  const cpl_image *image2,
98  const cpl_size *window1,
99  const cpl_size *window2,
100  clipm_coverage_mode cov,
101  const cpl_size *custom_xy_outsize);
102 
103 cpl_matrix *clipm_math_normxcorr_matrix(
104  const cpl_matrix *m1,
105  const cpl_matrix *m2,
106  clipm_coverage_mode cov,
107  const cpl_size *custom_xy_outsize);
108 
110  const cpl_image *image,
111  const cpl_matrix *kernelmat,
112  const cpl_size *im_window,
113  clipm_coverage_mode cov,
114  const cpl_size *custom_xy_outsize,
115  int norm_to_kernel,
116  cpl_matrix **overlap_map);
117 
118 /*----------------------------------------------------------------------------*/
119 
120 #ifdef __cplusplus
121 } /* extern "C" */
122 #endif
123 
124 #endif /* CLIPM_MATH_CORRELATION_H */
cpl_matrix * clipm_math_xcorr_image(const cpl_image *image1, const cpl_image *image2, const cpl_size *window1, const cpl_size *window2, clipm_coverage_mode cov, const cpl_size *custom_xy_outsize, cpl_matrix **overlap_map)
Cross-correlate 2 images or image windows.
Definition: clipm_math_correlation.c:526
const clipm_coverage_mode CLIPM_COVERAGE_SAME
Returns the central part of the result that is the same size as the first input signal.
Definition: clipm_math_correlation.c:49
const clipm_coverage_mode CLIPM_COVERAGE_FULL
Compute the full result.
Definition: clipm_math_correlation.c:50
cpl_matrix * clipm_math_xcorr_matrix(const cpl_matrix *m1, const cpl_matrix *m2, clipm_coverage_mode cov, const cpl_size *custom_xy_outsize, cpl_matrix **overlap_map)
Cross-correlate 2 matrices.
Definition: clipm_math_correlation.c:714
cpl_matrix * clipm_math_normxcorr_matrix(const cpl_matrix *m1, const cpl_matrix *m2, clipm_coverage_mode cov, const cpl_size *custom_xy_outsize)
Normalized cross-correlation of 2 matrices.
Definition: clipm_math_correlation.c:1228
cpl_matrix * clipm_math_normxcorr_image(const cpl_image *image1, const cpl_image *image2, const cpl_size *window1, const cpl_size *window2, clipm_coverage_mode cov, const cpl_size *custom_xy_outsize)
Normalized cross-correlation of 2 images or image windows.
Definition: clipm_math_correlation.c:1101
unsigned int clipm_coverage_mode
Interpolation option type.
Definition: clipm_math_correlation.h:49
cpl_error_code clipm_math_get_coverage_size(const cpl_size *size1, const cpl_size *size2, const cpl_size *custom_xy_outsize, cpl_size *out_size, int ndims, clipm_coverage_mode cov)
Predict the output size of a multi-dimensional signal-cross-operation using a certain coverage mode...
Definition: clipm_math_correlation.c:183
const clipm_coverage_mode CLIPM_COVERAGE_VALID
Return the portion of the cross-operation that is computed without the zero-padded edges...
Definition: clipm_math_correlation.c:48
cpl_size clipm_math_get_coverage_size_1d(cpl_size size1, cpl_size size2, cpl_size custom_xy_outsize, clipm_coverage_mode cov)
Predict the output size of a signal-cross-operation using a certain coverage mode.
Definition: clipm_math_correlation.c:99
const clipm_coverage_mode CLIPM_COVERAGE_CUSTOM
Use user-defined output size.
Definition: clipm_math_correlation.c:51
cpl_image * clipm_math_conv_image_matrix(const cpl_image *image, const cpl_matrix *kernelmat, const cpl_size *im_window, clipm_coverage_mode cov, const cpl_size *custom_xy_outsize, int norm_to_kernel, cpl_matrix **overlap_map)
Convolve an image with a matrix kernel.
Definition: clipm_math_correlation.c:1344