ARX  1.0
The next-generation open source augmented reality toolkit.
Loading...
Searching...
No Matches
icpCore.h
Go to the documentation of this file.
1/*
2 * icpCore.h
3 * artoolkitX
4 *
5 * This file is part of artoolkitX.
6 *
7 * artoolkitX is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * artoolkitX is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with artoolkitX. If not, see <http://www.gnu.org/licenses/>.
19 *
20 * As a special exception, the copyright holders of this library give you
21 * permission to link this library with independent modules to produce an
22 * executable, regardless of the license terms of these independent modules, and to
23 * copy and distribute the resulting executable under terms of your choice,
24 * provided that you also meet, for each linked independent module, the terms and
25 * conditions of the license of that module. An independent module is a module
26 * which is neither derived from nor based on this library. If you modify this
27 * library, you may extend this exception to your version of the library, but you
28 * are not obligated to do so. If you do not wish to do so, delete this exception
29 * statement from your version.
30 *
31 * Copyright 2018 Realmax, Inc.
32 * Copyright 2015 Daqri, LLC.
33 * Copyright 2004-2015 ARToolworks, Inc.
34 *
35 * Author(s): Hirokazu Kato
36 *
37 */
38
39#ifndef ICP_CORE_H
40#define ICP_CORE_H
41
42#ifdef __cplusplus
43extern "C" {
44#endif
45
46#ifdef _WIN32
47# ifdef AR_STATIC
48# define ICP_EXTERN
49# else
50# ifdef ARX_EXPORTS
51# define ICP_EXTERN __declspec(dllexport)
52# else
53# define ICP_EXTERN __declspec(dllimport)
54# endif
55# endif
56#else
57# define ICP_EXTERN
58#endif
59
60#ifndef M_PI
61#define M_PI 3.14159265358979323846F
62#endif
63
64#define ICP_DEBUG 0
65#define ICP_MAX_LOOP 10
66#define ICP_BREAK_LOOP_ERROR_THRESH 0.1F
67#define ICP_BREAK_LOOP_ERROR_RATIO_THRESH 0.99F
68#define ICP_BREAK_LOOP_ERROR_THRESH2 4.0F
69#define ICP_INLIER_PROBABILITY 0.50F
70
71typedef struct {
75
76typedef struct {
81
82typedef struct {
87
88typedef struct {
92
93typedef struct {
97
98
99int icpGetXc_from_Xw_by_MatXw2Xc( ICP3DCoordT *Xc, ARdouble matXw2Xc[3][4], ICP3DCoordT *Xw );
100int icpGetU_from_X_by_MatX2U( ICP2DCoordT *u, ARdouble matX2U[3][4], ICP3DCoordT *coord3d );
101int icpGetJ_U_S( ARdouble J_U_S[2][6], ARdouble matXc2U[3][4], ARdouble matXw2Xc[3][4], ICP3DCoordT *worldCoord );
102int icpGetDeltaS( ARdouble S[6], ARdouble dU[], ARdouble J_U_S[][6], int n );
103int icpUpdateMat( ARdouble matXw2Xc[3][4], ARdouble dS[6] );
104
105#if ICP_DEBUG
106void icpDispMat( char *title, ARdouble *mat, int row, int clm );
107#endif
108
109#ifdef __cplusplus
110}
111#endif
112#endif
double ARdouble
Definition: ar.h:99
int icpGetDeltaS(ARdouble S[6], ARdouble dU[], ARdouble J_U_S[][6], int n)
Definition: icpCore.c:130
int icpUpdateMat(ARdouble matXw2Xc[3][4], ARdouble dS[6])
Definition: icpCore.c:201
int icpGetXc_from_Xw_by_MatXw2Xc(ICP3DCoordT *Xc, ARdouble matXw2Xc[3][4], ICP3DCoordT *Xw)
Definition: icpCore.c:64
int icpGetJ_U_S(ARdouble J_U_S[2][6], ARdouble matXc2U[3][4], ARdouble matXw2Xc[3][4], ICP3DCoordT *worldCoord)
Definition: icpCore.c:92
int icpGetU_from_X_by_MatX2U(ICP2DCoordT *u, ARdouble matX2U[3][4], ICP3DCoordT *coord3d)
Definition: icpCore.c:73
Definition: icpCore.h:71
ARdouble x
Definition: icpCore.h:72
ARdouble y
Definition: icpCore.h:73
Definition: icpCore.h:88
ICP2DCoordT p2
Definition: icpCore.h:90
ICP2DCoordT p1
Definition: icpCore.h:89
Definition: icpCore.h:82
ARdouble c
Definition: icpCore.h:85
ARdouble a
Definition: icpCore.h:83
ARdouble b
Definition: icpCore.h:84
Definition: icpCore.h:76
ARdouble x
Definition: icpCore.h:77
ARdouble z
Definition: icpCore.h:79
ARdouble y
Definition: icpCore.h:78
Definition: icpCore.h:93
ICP3DCoordT p1
Definition: icpCore.h:94
ICP3DCoordT p2
Definition: icpCore.h:95