gpc.h
Go to the documentation of this file.
00001 /*
00002 // GPC: A library for the solution of General Point Correspondence problems.
00003 // Copyright (C) 2006 Andrea Censi (andrea at censi dot org)
00004 
00005 // This program is free software; you can redistribute it and/or
00006 // modify it under the terms of the GNU General Public License
00007 // as published by the Free Software Foundation; either version 2
00008 // of the License, or (at your option) any later version.
00009 
00010 // This program is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 // GNU General Public License for more details.
00014 
00015 // You should have received a copy of the GNU General Public License
00016 // along with this program; if not, write to the Free Software
00017 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00018 */
00019 
00020 #ifndef H_GENERAL_POINT_CORRESPONDENCE
00021 #define H_GENERAL_POINT_CORRESPONDENCE
00022 
00023 struct gpc_corr {
00024         double p[2];
00025         double q[2];
00026 
00027         double C[2][2];
00028         
00029         int valid;
00030 };
00031 
00042 #define TRACE_ALGO 0
00043 
00044 /* Set to 1 to force a check that C is positive semidef.
00045    Note that you will have some numerical errors! */
00046 #define GPC_CHECK_SEMIDEF 0
00047 
00049 int gpc_solve(int K, const struct gpc_corr*, 
00050         const double*x0, const double *cov_x0,
00051         double *x);
00052 
00053 /* Some utilities functions */
00054 
00056         double gpc_error(const struct gpc_corr*co, const double*x);
00057 
00058         double gpc_total_error(const struct gpc_corr*co, int n, const double*x);
00059 #endif
00060 


csm
Author(s): Andrea Censi
autogenerated on Mon Jan 16 2017 03:48:29