gpc.h
Go to the documentation of this file.
1 /*
2 // GPC: A library for the solution of General Point Correspondence problems.
3 // Copyright (C) 2006 Andrea Censi (andrea at censi dot org)
4 
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 2
8 // of the License, or (at your option) any later version.
9 
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 */
19 
20 #ifndef H_GENERAL_POINT_CORRESPONDENCE
21 #define H_GENERAL_POINT_CORRESPONDENCE
22 
23 struct gpc_corr {
24  double p[2];
25  double q[2];
26 
27  double C[2][2];
28 
29  int valid;
30 };
31 
42 #define TRACE_ALGO 0
43 
44 /* Set to 1 to force a check that C is positive semidef.
45  Note that you will have some numerical errors! */
46 #define GPC_CHECK_SEMIDEF 0
47 
49 int gpc_solve(int K, const struct gpc_corr*,
50  const double*x0, const double *cov_x0,
51  double *x);
52 
53 /* Some utilities functions */
54 
56  double gpc_error(const struct gpc_corr*co, const double*x);
57 
58  double gpc_total_error(const struct gpc_corr*co, int n, const double*x);
59 #endif
60 
double C[2][2]
Definition: gpc.h:27
double gpc_total_error(const struct gpc_corr *co, int n, const double *x)
Definition: gpc.c:301
double p[2]
Definition: gpc.h:24
Definition: gpc.h:23
int gpc_solve(int K, const struct gpc_corr *, const double *x0, const double *cov_x0, double *x)
Definition: gpc.c:29
int valid
Definition: gpc.h:29
double q[2]
Definition: gpc.h:25
double gpc_error(const struct gpc_corr *co, const double *x)
Definition: gpc.c:285


csm
Author(s): Andrea Censi
autogenerated on Tue May 11 2021 02:18:23