ARX
1.2.0
The next-generation open source augmented reality toolkit.
Toggle main menu visibility
Loading...
Searching...
No Matches
Source
ARX
AR
include
ARX
AR
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
43
extern
"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
71
typedef
struct
{
72
ARdouble
x
;
73
ARdouble
y
;
74
}
ICP2DCoordT
;
75
76
typedef
struct
{
77
ARdouble
x
;
78
ARdouble
y
;
79
ARdouble
z
;
80
}
ICP3DCoordT
;
81
82
typedef
struct
{
83
ARdouble
a
;
84
ARdouble
b
;
85
ARdouble
c
;
86
}
ICP2DLineT
;
87
88
typedef
struct
{
89
ICP2DCoordT
p1
;
90
ICP2DCoordT
p2
;
91
}
ICP2DLineSegT
;
92
93
typedef
struct
{
94
ICP3DCoordT
p1
;
95
ICP3DCoordT
p2
;
96
}
ICP3DLineSegT
;
97
98
99
int
icpGetXc_from_Xw_by_MatXw2Xc
(
ICP3DCoordT
*Xc,
ARdouble
matXw2Xc[3][4],
ICP3DCoordT
*Xw );
100
int
icpGetU_from_X_by_MatX2U
(
ICP2DCoordT
*u,
ARdouble
matX2U[3][4],
ICP3DCoordT
*coord3d );
101
int
icpGetJ_U_S
(
ARdouble
J_U_S[2][6],
ARdouble
matXc2U[3][4],
ARdouble
matXw2Xc[3][4],
ICP3DCoordT
*worldCoord );
102
int
icpGetDeltaS
(
ARdouble
S[6],
ARdouble
dU[],
ARdouble
J_U_S[][6],
int
n );
103
int
icpUpdateMat
(
ARdouble
matXw2Xc[3][4],
ARdouble
dS[6] );
104
105
#if ICP_DEBUG
106
void
icpDispMat(
char
*title,
ARdouble
*mat,
int
row,
int
clm );
107
#endif
108
109
#ifdef __cplusplus
110
}
111
#endif
112
#endif
ARdouble
double ARdouble
Definition
ar.h:99
icpGetDeltaS
int icpGetDeltaS(ARdouble S[6], ARdouble dU[], ARdouble J_U_S[][6], int n)
Definition
icpCore.c:130
icpUpdateMat
int icpUpdateMat(ARdouble matXw2Xc[3][4], ARdouble dS[6])
Definition
icpCore.c:201
icpGetXc_from_Xw_by_MatXw2Xc
int icpGetXc_from_Xw_by_MatXw2Xc(ICP3DCoordT *Xc, ARdouble matXw2Xc[3][4], ICP3DCoordT *Xw)
Definition
icpCore.c:64
icpGetJ_U_S
int icpGetJ_U_S(ARdouble J_U_S[2][6], ARdouble matXc2U[3][4], ARdouble matXw2Xc[3][4], ICP3DCoordT *worldCoord)
Definition
icpCore.c:92
icpGetU_from_X_by_MatX2U
int icpGetU_from_X_by_MatX2U(ICP2DCoordT *u, ARdouble matX2U[3][4], ICP3DCoordT *coord3d)
Definition
icpCore.c:73
ICP2DCoordT
Definition
icpCore.h:71
ICP2DCoordT::x
ARdouble x
Definition
icpCore.h:72
ICP2DCoordT::y
ARdouble y
Definition
icpCore.h:73
ICP2DLineSegT
Definition
icpCore.h:88
ICP2DLineSegT::p2
ICP2DCoordT p2
Definition
icpCore.h:90
ICP2DLineSegT::p1
ICP2DCoordT p1
Definition
icpCore.h:89
ICP2DLineT
Definition
icpCore.h:82
ICP2DLineT::c
ARdouble c
Definition
icpCore.h:85
ICP2DLineT::a
ARdouble a
Definition
icpCore.h:83
ICP2DLineT::b
ARdouble b
Definition
icpCore.h:84
ICP3DCoordT
Definition
icpCore.h:76
ICP3DCoordT::x
ARdouble x
Definition
icpCore.h:77
ICP3DCoordT::z
ARdouble z
Definition
icpCore.h:79
ICP3DCoordT::y
ARdouble y
Definition
icpCore.h:78
ICP3DLineSegT
Definition
icpCore.h:93
ICP3DLineSegT::p1
ICP3DCoordT p1
Definition
icpCore.h:94
ICP3DLineSegT::p2
ICP3DCoordT p2
Definition
icpCore.h:95
Generated on
for ARX by
1.18.0