CycloPos
Header version 1.0.0
ToolTech Software · C++ library reference
ToolTech
Class reference
Change history
CorTeX ↗
Toggle main menu visibility
Loading...
Searching...
No Matches
include
cyBase.h
Go to the documentation of this file.
1
//*****************************************************************************
2
// File : cyBase.h
3
// Module : CycloPos
4
// Description : Generic settings of the CycloPos library
5
// Author : Anders Modén
6
// Product : CycloPos 1.0.0
7
//
8
// Copyright © 2011- ToolTech Software, Sweden
9
//
10
// NOTE: CycloPos is a generic VR and Tool positioning library for a mono camera
11
//
12
//
13
// Revision History...
14
//
15
// Who Date Description
16
//
17
// AMO 110901 Created file
18
//
19
//******************************************************************************
20
#ifndef __CY_BASE_H__
21
#define __CY_BASE_H__
22
31
32
#include "gzBaseLibrary.h"
// GizmoBase generic include
33
#include "
cyVersion.h
"
// Version info
34
35
// ------------------- Generic platform settings -------------------------------------------------------------------------
36
37
#ifdef GZ_WINDOWS
38
#ifndef GZ_STATIC
// Default to use all Gizmo dlls
39
#define CY_DLL
// Define GZ_STATIC to use static libs
40
#endif
41
#endif
// GZ_WINDOWS
42
43
#ifdef CY_DLL
//cyclopos.dll
44
#ifdef CY_EXPORTS
45
#define CY_EXPORT __declspec(dllexport)
46
#else
47
#define CY_EXPORT __declspec(dllimport)
48
#endif
49
#else
50
#define CY_EXPORT
51
#endif
52
53
// ------------------- Some settings and constants ----------------
54
55
// Precompiled configurations
56
57
//#define FEATURE_LEVEL_MIN //!< Minumum (FAST) level of feature extraction details
58
//#define FEATURE_LEVEL_MID //!< Medium level of feature extraction details
59
#define FEATURE_LEVEL_MAX
60
61
#if defined FEATURE_LEVEL_MIN
62
63
// 2x2 x 4 desc samples = 16
64
65
#define FEATURE_COUNT 16
66
67
#define MAXDIM 4
68
#define LEVEL_DEPTH 3
69
70
#elif defined FEATURE_LEVEL_MID
71
72
// 3x3 x 4 desc samples = 36
73
74
#define FEATURE_COUNT 36
75
76
#define MAXDIM 4
77
#define LEVEL_DEPTH 3
78
79
#elif defined FEATURE_LEVEL_MAX
80
81
// 4x4 x 4 desc samples = 64
82
83
#define FEATURE_COUNT 64
84
85
#define MAXDIM 8
86
#define LEVEL_DEPTH 3
87
88
#endif
89
90
// ----------------------- Generic settings --------------------
91
92
#define CY_DEFAULT_MAX_OUTLIER_DIST 10.0f
93
#define CY_DEFAULT_RANSAC_MAX_ITERATIONS 1000
94
#define CY_DEFAULT_MIN_PIXEL_DIST 2.0f
95
96
#define CY_REQUIRED_INLIERS_FOR_RANSAC 16
97
98
99
// --------------------- Some custom types ---------------------
100
101
typedef
struct
{
102
gzInt32
x
,
y
;
103
104
}
XY
;
105
106
typedef
struct
{
107
gzFloat
x
,
y
;
108
109
}
XY_f
;
110
111
class
cyDescriptor
112
{
113
public
:
114
115
gzFloat
scale
;
116
gzFloat
orientation
;
117
gzArray<gzFloat>
descriptor
;
118
gzUInt32
bits
;
119
gzUInt32
xy_index
;
120
gzUInt32
compare
;
121
122
};
123
124
class
KVals
125
{
126
public
:
127
128
KVals
(gzFloat _k1=0,gzFloat _k2=0,gzFloat _k3=0,gzFloat _k4=0,gzFloat _k5=0,gzFloat _k6=1,gzFloat _k7=0)
129
{
130
k1
=_k1;
131
k2
=_k2;
132
k3
=_k3;
133
k4
=_k4;
134
k5
=_k5;
135
k6
=_k6;
136
k7
=_k7;
137
}
138
139
gzFloat &
operator[]
(gzUInt32 index)
140
{
141
if
(index>=7)
142
gzThrowFatal(
"Index out of bounds"
);
143
144
return
*(&
k1
+index);
145
}
146
147
gzFloat
k1
,
k2
,
k3
,
k4
,
k5
,
k6
,
k7
;
148
};
149
150
class
cyStatisticInfo
151
{
152
public
:
153
154
GZ_PROPERTY_EXPORT(gzFloat, Mean,
CY_EXPORT
);
155
GZ_PROPERTY_EXPORT(gzFloat, StdDev,
CY_EXPORT
);
156
};
157
158
// -------- Debug flags ---------------
159
160
enum
cyDebugFlags
161
{
162
CY_DEBUG_DEFAULT
= 0,
163
CY_DEBUG_DUMP_XML
= 1<<0,
164
CY_DEBUG_HEADER_ONLY
= 1<<1,
165
};
166
167
GZ_USE_BIT_LOGIC
(
cyDebugFlags
);
168
169
170
#endif
// __CY_BASE_H__
KVals::operator[]
gzFloat & operator[](gzUInt32 index)
Definition
cyBase.h:139
KVals::k3
gzFloat k3
Definition
cyBase.h:147
KVals::k4
gzFloat k4
Definition
cyBase.h:147
KVals::k6
gzFloat k6
Definition
cyBase.h:147
KVals::k7
gzFloat k7
Definition
cyBase.h:147
KVals::KVals
KVals(gzFloat _k1=0, gzFloat _k2=0, gzFloat _k3=0, gzFloat _k4=0, gzFloat _k5=0, gzFloat _k6=1, gzFloat _k7=0)
Definition
cyBase.h:128
KVals::k1
gzFloat k1
Definition
cyBase.h:147
KVals::k2
gzFloat k2
Definition
cyBase.h:147
KVals::k5
gzFloat k5
Definition
cyBase.h:147
cyDescriptor
Definition
cyBase.h:112
cyDescriptor::scale
gzFloat scale
Scale used for Wavelet Descriptor.
Definition
cyBase.h:115
cyDescriptor::xy_index
gzUInt32 xy_index
point index
Definition
cyBase.h:119
cyDescriptor::bits
gzUInt32 bits
Bitcount for binary descriptors.
Definition
cyBase.h:118
cyDescriptor::compare
gzUInt32 compare
if part in a compare situation
Definition
cyBase.h:120
cyDescriptor::orientation
gzFloat orientation
Major orientation axis direction.
Definition
cyBase.h:116
cyDescriptor::descriptor
gzArray< gzFloat > descriptor
Actual data.
Definition
cyBase.h:117
cyStatisticInfo
Definition
cyBase.h:151
CY_EXPORT
#define CY_EXPORT
Export control of dll functions.
Definition
cyBase.h:50
GZ_USE_BIT_LOGIC
GZ_USE_BIT_LOGIC(cyDebugFlags)
cyDebugFlags
cyDebugFlags
Definition
cyBase.h:161
CY_DEBUG_HEADER_ONLY
@ CY_DEBUG_HEADER_ONLY
Definition
cyBase.h:164
CY_DEBUG_DUMP_XML
@ CY_DEBUG_DUMP_XML
Definition
cyBase.h:163
CY_DEBUG_DEFAULT
@ CY_DEBUG_DEFAULT
Definition
cyBase.h:162
cyVersion.h
XY_f
Definition
cyBase.h:106
XY_f::y
gzFloat y
Definition
cyBase.h:107
XY_f::x
gzFloat x
Definition
cyBase.h:107
XY
Definition
cyBase.h:101
XY::y
gzInt32 y
Definition
cyBase.h:102
XY::x
gzInt32 x
Definition
cyBase.h:102
Generated by
1.18.0