| MikroCAD SDK Library

- Home
- All Types
- Files

All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
CalibrationExport.h
Go to the documentation of this file.
1 /**
2 * @file CalibrationExport.h
3 * @brief Calibration parameters for export
4 *
5 * @author LMI Technologies
6 */
7
8 #ifndef _CalibrationExport_h
9 #define _CalibrationExport_h
10
11 #include "MeasurementDefs.h"
12
13 struct TCalibParDateTimeItem
14 {
15 unsigned short m_wYear;
16 unsigned short m_wMon;
17 unsigned short m_wDay;
18 unsigned short m_wHour;
19 unsigned short m_wMin;
20 unsigned short m_wSec;
21
22 TCalibParDateTimeItem()
23 {
24 m_wYear = m_wMon = m_wDay = m_wHour = m_wMin = m_wSec = 0;
25 };
26 };
27
28 struct TSimpleCalibParDateTime
29 {
30 TCalibParDateTimeItem m_DateTimeRefPlane; /**< Date / Time - Reference plane */
31 TCalibParDateTimeItem m_DateTimeGrid; /**< Date / Time - Grid */
32 TCalibParDateTimeItem m_DateTimeGroove; /**< Date / Time - Groove */
33 };
34
35 /**
36 Basic settings
37 */
38 struct TSimpleCalibParBasic
39 {
40 CalibrationType m_CalType; /**< Calibration type */
41 long m_lNumAddPlanes; /**< Number of additional planes */
42 ProjectorPositionToCamera m_PositionToCamera; /**< Projector position relating to the camera */
43 bool m_bNumGridLinesLess25; /**< Less than 25 grid lines are in the camera image */
44 CalibrationMeasProgram m_CalMeasProg; /**< Measurement program for calibration */
45
46 TSimpleCalibParBasic()
47 {
48 m_CalType = CalibrationType_GrooveStandard;
49 m_lNumAddPlanes = 0;
50 m_PositionToCamera = ProjectorPositionToCamera_Left;
51 m_bNumGridLinesLess25 = false;
52 m_CalMeasProg = CalibrationMeasProgram_32_32;
53 };
54 };
55
56 /**
57 Optical settings
58 */
59 struct TSimpleCalibParOptic
60 {
61 float m_fPixelSizeProjX; /**< Pixel size X direction projector */
62 float m_fPixelSizeProjY; /**< Pixel size Y direction projector */
63 float m_fFocalLengthProj; /**< Focal length projector */
64 float m_fPixelSizeCamX; /**< Pixel size X direction camera */
65 float m_fPixelSizeCamY; /**< Pixel size Y direction camera */
66 float m_fFocalLengthCam; /**< Focal length camera */
67
68 TSimpleCalibParOptic()
69 {
70 m_fPixelSizeProjX = m_fPixelSizeProjY = 0.01f;
71 m_fPixelSizeCamX = m_fPixelSizeCamY = 0.01f;
72 m_fFocalLengthProj = m_fFocalLengthCam = 0.01f;
73 };
74 };
75
76 /**
77 Calibration pieces
78 */
79 struct TSimpleCalibParPieces
80 {
81 float m_fGridX; /**< Grid pattern width in mm */
82 float m_fGridY; /**< Grid pattern height in mm */
83 float m_fGrooveDepth; /**< Groove depth in mm */
84
85 TSimpleCalibParPieces()
86 {
87 m_fGridX = m_fGridY = 0.1f;
88 m_fGrooveDepth = 0.1f;
89 };
90 };
91
92 /**
93 Measurement Range
94 */
95 struct TSimpleCalibParMeasRange
96 {
97 float m_fXMin;
98 float m_fXMax;
99 float m_fYMin;
100 float m_fYMax;
101 float m_fZMin;
102 float m_fZMax;
103 float m_fZResolution;
104
105 TSimpleCalibParMeasRange()
106 {
107 m_fXMin = m_fXMax = m_fYMin = m_fYMax = m_fZMin = m_fZMax = 0.0f;
108 m_fZResolution = 1.0f;
109 };
110 };
111
112 /**
113 Main structure
114 */
115 struct TSimpleCalibPar
116 {
117 TSimpleCalibParDateTime m_DateTime;
118 TSimpleCalibParBasic m_Basic;
119 TSimpleCalibParOptic m_Optic;
120 TSimpleCalibParPieces m_Pieces;
121 TSimpleCalibParMeasRange m_MeasRange;
122 };
123
124 /**
125 Multi level calibration - calibration method
126 */
127 enum MultiLevelCalibrationMethod
128 {
129 MultiLevelCalibrationMethod_ManMultiplePlanes, /** Manual, grid, multiple planes */
130 MultiLevelCalibrationMethod_ManMultipleParallelPlanes, /** Manual, grid, multiple parallel planes */
131 MultiLevelCalibrationMethod_AutoMultiplePlanes, /** Automatic, grid, multiple planes */
132 MultiLevelCalibrationMethod_AutoMultipleParallelPlanes, /** Automatic, grid, multiple parallel planes */
133 MultiLevelCalibrationMethod_AutoMultipleParallelPlanesFix, /** Automatic, grid, multiple parallel planes with fixed distance */
134
135 MultiLevelCalibrationMethod_Last, /** Last item */
136 };
137
138 /**
139 Multi level calibration - grid mode
140 */
141 enum MultiLevelCalibrationGridMode
142 {
143 MultiLevelCalibrationGridMode_Grid, /** Grid without diffuse light */
144 MultiLevelCalibrationGridMode_GridDiffuseLight, /** Grid with diffuse light */
145 MultiLevelCalibrationGridMode_GridPlane, /** Grid without diffuse light + plane */
146 MultiLevelCalibrationGridMode_GridDiffuseLightPlane, /** Grid with diffuse light + plane */
147 MultiLevelCalibrationGridMode_GridColorYellowPurple, /** Grid with color yellow / purple */
148
149 MultiLevelCalibrationGridMode_Last, /** Last item */
150 };
151
152 /**
153 Multi level calibration - system calibration mode
154 */
155 enum MultiLevelCalibrationSysCalibMode
156 {
157 MultiLevelCalibrationSysCalibMode_TeleCyl, /** Telecentric lenses with cylinder (measuring field < 5x5 cm²) */
158 MultiLevelCalibrationSysCalibMode_TeleGroove, /** Telecentric lenses with groove (measuring field < 20x20 cm²) */
159 MultiLevelCalibrationSysCalibMode_TeleGroovePlane, /** Telecentric lenses with groove and additional plane (measuring field < 20x20 cm²) */
160 MultiLevelCalibrationSysCalibMode_TeleGrooveMultiPlane, /** Telecentric lenses with groove and multiple planes (measuring field > 20x20 cm²) */
161 MultiLevelCalibrationSysCalibMode_2Planes, /** Normal lenses with 2 parallel planes */
162 MultiLevelCalibrationSysCalibMode_MultiPlane, /** Normal lenses with multiple planes */
163 MultiLevelCalibrationSysCalibMode_MultiPlaneCorr, /** Normal lenses with multiple planes + plane correction */
164 MultiLevelCalibrationSysCalibMode_MultiPlaneCorrParallelZCorr, /** Normal lenses with multiple planes + plane correction + parallel planes + Z correction */
165 MultiLevelCalibrationSysCalibMode_MultiPlaneParallelZCorr, /** Normal lenses with multiple planes + parallel planes + Z correction */
166
167 MultiLevelCalibrationSysCalibMode_Last, /** Last item */
168 };
169
170 /**
171 Multi level calibration - camera mirror mode
172 */
173 enum MultiLevelCalibrationCameraMirrorMode
174 {
175 MultiLevelCalibrationCameraMirrorMode_None, /** No mirroring */
176 MultiLevelCalibrationCameraMirrorMode_Hor, /** Mirroring in horizontal direction */
177 MultiLevelCalibrationCameraMirrorMode_Vert, /** Mirroring in vertical direction */
178 MultiLevelCalibrationCameraMirrorMode_Rot180, /** Rotation 180° */
179 MultiLevelCalibrationCameraMirrorMode_Mirror90Left, /** Mirroring + rotation 90° anticlockwise */
180 MultiLevelCalibrationCameraMirrorMode_90Left, /** Rotation 90° anticlockwise */
181 MultiLevelCalibrationCameraMirrorMode_90Right, /** Rotation 90° clockwise */
182 MultiLevelCalibrationCameraMirrorMode_Mirror90Right, /** Mirroring + rotation 90° clockwise */
183
184 MultiLevelCalibrationCameraMirrorMode_Last, /** Last item */
185 };
186
187 /**
188 Multi level calibration - sensor texture mode
189 */
190 enum MultiLevelCalibrationTextureMode
191 {
192 MultiLevelCalibrationTextureMode_None, /** No texture */
193 MultiLevelCalibrationTextureMode_Gray, /** Texture gray */
194 MultiLevelCalibrationTextureMode_Color, /** Texture colored */
195 MultiLevelCalibrationTextureMode_Extern, /** Texture external */
196
197 MultiLevelCalibrationTextureMode_Last, /** Last item */
198 };
199
200 #endif // _SimpleCalibrationExport_h
TSimpleCalibParBasic::m_lNumAddPlanes
long m_lNumAddPlanes
Number of additional planes.
Definition: CalibrationExport.h:41
TSimpleCalibParPieces::m_fGrooveDepth
float m_fGrooveDepth
Groove depth in mm.
Definition: CalibrationExport.h:83
MultiLevelCalibrationMethod_Last
Automatic, grid, multiple parallel planes with fixed distance.
Definition: CalibrationExport.h:135
MultiLevelCalibrationTextureMode_Color
Texture gray.
Definition: CalibrationExport.h:194
MultiLevelCalibrationSysCalibMode_TeleGrooveMultiPlane
Telecentric lenses with groove and additional plane (measuring field < 20x20 cm²) ...
Definition: CalibrationExport.h:160
CalibrationType
CalibrationType
Calibration types.
Definition: MeasurementDefs.h:358
MultiLevelCalibrationCameraMirrorMode_Last
Mirroring + rotation 90° clockwise.
Definition: CalibrationExport.h:184
MultiLevelCalibrationGridMode_Last
Grid with color yellow / purple.
Definition: CalibrationExport.h:149
MultiLevelCalibrationSysCalibMode_2Planes
Telecentric lenses with groove and multiple planes (measuring field > 20x20 cm²)
Definition: CalibrationExport.h:161
TSimpleCalibParOptic::m_fFocalLengthProj
float m_fFocalLengthProj
Focal length projector.
Definition: CalibrationExport.h:63
MultiLevelCalibrationMethod_ManMultipleParallelPlanes
Manual, grid, multiple planes.
Definition: CalibrationExport.h:130
TSimpleCalibPar
Main structure.
Definition: CalibrationExport.h:115
CalibrationMeasProgram
CalibrationMeasProgram
Measuring program for calibration.
Definition: MeasurementDefs.h:382
CalibrationMeasProgram_32_32
Stripes width 32, 32 images.
Definition: MeasurementDefs.h:386
MultiLevelCalibrationCameraMirrorMode
MultiLevelCalibrationCameraMirrorMode
Multi level calibration - camera mirror mode.
Definition: CalibrationExport.h:173
MultiLevelCalibrationSysCalibMode_MultiPlaneCorr
Normal lenses with multiple planes.
Definition: CalibrationExport.h:163
TSimpleCalibParBasic::m_PositionToCamera
ProjectorPositionToCamera m_PositionToCamera
Projector position relating to the camera.
Definition: CalibrationExport.h:42
MultiLevelCalibrationCameraMirrorMode_Vert
Mirroring in horizontal direction.
Definition: CalibrationExport.h:177
MultiLevelCalibrationSysCalibMode_TeleGroove
Telecentric lenses with cylinder (measuring field < 5x5 cm²)
Definition: CalibrationExport.h:158
TSimpleCalibParOptic::m_fFocalLengthCam
float m_fFocalLengthCam
Focal length camera.
Definition: CalibrationExport.h:66
MultiLevelCalibrationTextureMode_Last
Texture external.
Definition: CalibrationExport.h:197
MultiLevelCalibrationMethod_AutoMultipleParallelPlanes
Automatic, grid, multiple planes.
Definition: CalibrationExport.h:132
ProjectorPositionToCamera
ProjectorPositionToCamera
Projector position to camera.
Definition: MeasurementDefs.h:371
MeasurementDefs.h
Defines for measurement module for sensors with 1 projector and 1 camera.
MultiLevelCalibrationSysCalibMode_MultiPlaneCorrParallelZCorr
Normal lenses with multiple planes + plane correction.
Definition: CalibrationExport.h:164
MultiLevelCalibrationSysCalibMode_TeleGroovePlane
Telecentric lenses with groove (measuring field < 20x20 cm²)
Definition: CalibrationExport.h:159
TSimpleCalibParOptic::m_fPixelSizeProjX
float m_fPixelSizeProjX
Pixel size X direction projector.
Definition: CalibrationExport.h:61
MultiLevelCalibrationSysCalibMode_MultiPlaneParallelZCorr
Normal lenses with multiple planes + plane correction + parallel planes + Z correction.
Definition: CalibrationExport.h:165
MultiLevelCalibrationTextureMode_Extern
Texture colored.
Definition: CalibrationExport.h:195
MultiLevelCalibrationCameraMirrorMode_90Left
Mirroring + rotation 90° anticlockwise.
Definition: CalibrationExport.h:180
MultiLevelCalibrationSysCalibMode_MultiPlane
Normal lenses with 2 parallel planes.
Definition: CalibrationExport.h:162
MultiLevelCalibrationGridMode_GridDiffuseLightPlane
Grid without diffuse light + plane.
Definition: CalibrationExport.h:146
TSimpleCalibParBasic::m_bNumGridLinesLess25
bool m_bNumGridLinesLess25
Less than 25 grid lines are in the camera image.
Definition: CalibrationExport.h:43
TSimpleCalibParOptic
Optical settings.
Definition: CalibrationExport.h:59
TSimpleCalibParPieces::m_fGridX
float m_fGridX
Grid pattern width in mm.
Definition: CalibrationExport.h:81
MultiLevelCalibrationTextureMode
MultiLevelCalibrationTextureMode
Multi level calibration - sensor texture mode.
Definition: CalibrationExport.h:190
MultiLevelCalibrationMethod_AutoMultipleParallelPlanesFix
Automatic, grid, multiple parallel planes.
Definition: CalibrationExport.h:133
MultiLevelCalibrationMethod
MultiLevelCalibrationMethod
Multi level calibration - calibration method.
Definition: CalibrationExport.h:127
MultiLevelCalibrationCameraMirrorMode_Rot180
Mirroring in vertical direction.
Definition: CalibrationExport.h:178
TSimpleCalibParBasic
Basic settings.
Definition: CalibrationExport.h:38
MultiLevelCalibrationCameraMirrorMode_Hor
No mirroring.
Definition: CalibrationExport.h:176
MultiLevelCalibrationCameraMirrorMode_Mirror90Right
Rotation 90° clockwise.
Definition: CalibrationExport.h:182
TSimpleCalibParPieces
Calibration pieces.
Definition: CalibrationExport.h:79
MultiLevelCalibrationSysCalibMode
MultiLevelCalibrationSysCalibMode
Multi level calibration - system calibration mode.
Definition: CalibrationExport.h:155
MultiLevelCalibrationGridMode_GridDiffuseLight
Grid without diffuse light.
Definition: CalibrationExport.h:144
MultiLevelCalibrationGridMode
MultiLevelCalibrationGridMode
Multi level calibration - grid mode.
Definition: CalibrationExport.h:141
TSimpleCalibParBasic::m_CalType
CalibrationType m_CalType
Calibration type.
Definition: CalibrationExport.h:40
MultiLevelCalibrationGridMode_GridColorYellowPurple
Grid with diffuse light + plane.
Definition: CalibrationExport.h:147
MultiLevelCalibrationSysCalibMode_Last
Normal lenses with multiple planes + parallel planes + Z correction.
Definition: CalibrationExport.h:167
TSimpleCalibParPieces::m_fGridY
float m_fGridY
Grid pattern height in mm.
Definition: CalibrationExport.h:82
TSimpleCalibParOptic::m_fPixelSizeCamY
float m_fPixelSizeCamY
Pixel size Y direction camera.
Definition: CalibrationExport.h:65
TSimpleCalibParOptic::m_fPixelSizeProjY
float m_fPixelSizeProjY
Pixel size Y direction projector.
Definition: CalibrationExport.h:62
MultiLevelCalibrationCameraMirrorMode_90Right
Rotation 90° anticlockwise.
Definition: CalibrationExport.h:181
MultiLevelCalibrationCameraMirrorMode_Mirror90Left
Rotation 180°
Definition: CalibrationExport.h:179
MultiLevelCalibrationGridMode_GridPlane
Grid with diffuse light.
Definition: CalibrationExport.h:145
TSimpleCalibParMeasRange
Measurement Range.
Definition: CalibrationExport.h:95
MultiLevelCalibrationMethod_AutoMultiplePlanes
Manual, grid, multiple parallel planes.
Definition: CalibrationExport.h:131
TSimpleCalibParBasic::m_CalMeasProg
CalibrationMeasProgram m_CalMeasProg
Measurement program for calibration.
Definition: CalibrationExport.h:44
TSimpleCalibParOptic::m_fPixelSizeCamX
float m_fPixelSizeCamX
Pixel size X direction camera.
Definition: CalibrationExport.h:64
MultiLevelCalibrationTextureMode_Gray
No texture.
Definition: CalibrationExport.h:193