Gocator API
 All Classes Files Functions Variables Typedefs Macros Modules Pages
GoGeoCal.h
Go to the documentation of this file.
1 /**
2 * @file GoGeoCal.h
3 * @brief Declares the GoGeoCal class.
4 *
5 * @internal
6 * Copyright (C) 2017-2021 by LMI Technologies Inc.
7 * Licensed under the MIT License.
8 * Redistributed files must retain the above copyright notice.
9 */
10 #ifndef GO_GEOCAL_H
11 #define GO_GEOCAL_H
12 
13 #include <GoSdk/GoSdkDef.h>
14 
15 /**
16 * @class GoGeoCal
17 * @extends kObject
18 * @ingroup GoSdk
19 * @brief Contains the GeoCal data for a sensor.
20 * Do not read the GeoCal file directly, use this class to parse it.
21 */
22 typedef kObject GoGeoCal;
23 
24 /**
25 * Gets sensor ID
26 *
27 * @public @memberof GoGeoCal
28 * @version Introduced in firmware 4.7.0.130
29 * @param cal GoGeoCal object.
30 * @return Sensor ID.
31 */
32 GoFx(k32u) GoGeoCal_Id(GoGeoCal cal);
33 
34 /**
35 * Gets timestamp
36 *
37 * @public @memberof GoGeoCal
38 * @version Introduced in firmware 4.7.0.130
39 * @param cal GoGeoCal object.
40 * @return Timestamp.
41 */
42 GoFx(const kChar*) GoGeoCal_Timestamp(GoGeoCal cal);
43 
44 /**
45 * Gets count of cameras.
46 *
47 * @public @memberof GoGeoCal
48 * @version Introduced in firmware 4.7.0.130
49 * @param cal GoGeoCal object.
50 * @return Count of views.
51 */
53 
54 /**
55 * Gets calibration window.
56 *
57 * @public @memberof GoGeoCal
58 * @version Introduced in firmware 4.7.0.130
59 * @param cal GoGeoCal object.
60 * @param cameraIndex Camera index. kERROR_PARAMETER if invalid.
61 * @param x Output parameter for window x. Provide with a pointer to a k32u. Ignored if input is kNULL.
62 * @param y Output parameter for window y. Provide with a pointer to a k32u. Ignored if input is kNULL.
63 * @param width Output parameter for window width. Provide with a pointer to a k32u. Ignored if input is kNULL.
64 * @param height Output parameter for window height. Provide with a pointer to a k32u. Ignored if input is kNULL.
65 * @param xSubsampling Output parameter for window xSubsampling. Provide with a pointer to a k32u. Ignored if input is kNULL.
66 * @param ySubsampling Output parameter for window ySubsampling. Provide with a pointer to a k32u. Ignored if input is kNULL.
67 * @return Operation status.
68 */
69 GoFx(kStatus) GoGeoCal_CalWindow(GoGeoCal cal, kSize cameraIndex, k32u* x, k32u* y, k32u* width, k32u* height, k32u* xSubsampling, k32u* ySubsampling);
70 
71 /**
72 * Gets X resolution to Z fit.
73 * The X and Y resolution (mm/pixel) of an imager's pixels varies with the range. When resampling images,
74 * it is necessary to know the native resolution of each pixel. Typically, this is only needed for color/texture output.
75 * Profile cameras would have a fit set to kNULL. The fit is stored as polynomial coefficients. The X resolution at a
76 * given Z range (mm) can be determined by:
77 *
78 * X resolution = coefficients[0] + coefficients[1]*Z + ... + coefficients[N]*Z^N
79 *
80 * @public @memberof GoGeoCal
81 * @version Introduced in firmware 4.7.0.130
82 * @param cal GoGeoCal object.
83 * @param cameraIndex Camera index.
84 * @return Array of X resolution to Z fit coefficients. Type: k64f. kNULL is returned if the
85 * camera does not have a X resolution to Z fit.
86 */
87 GoFx(kArray1) GoGeoCal_XResolutionFit(GoGeoCal cal, kSize cameraIndex);
88 
89 /**
90 * Gets Y resolution to Z fit.
91 * The X and Y resolution (mm/pixel) of an imager's pixels varies with the range. When resampling images,
92 * it is necessary to know the native resolution of each pixel. Typically, this is only needed for color/texture output.
93 * Profile cameras would have a fit set to kNULL. The fit is stored as polynomial coefficients. The Y resolution at a
94 * given Z range (mm) can be determined by:
95 *
96 * Y resolution = coefficients[0] + coefficients[1]*Z + ... + coefficients[N]*Z^N
97 *
98 * @public @memberof GoGeoCal
99 * @version Introduced in firmware 4.7.0.130
100 * @param cal GoGeoCal object.
101 * @param cameraIndex Camera index.
102 * @return Array of Y resolution to Z fit coefficients. Type: k64f. kNULL is returned if the
103 * camera does not have a X resolution to Z fit.
104 */
105 GoFx(kArray1) GoGeoCal_YResolutionFit(GoGeoCal cal, kSize cameraIndex);
106 
107 /**
108 * Gets X center to Z fit.
109 * The world X center (mm) of an imager varies with the range if any yaw is present. It also represents the distance
110 * from the sensor reference 0 plane (usually mid-sensor). The fit is stored as polynomial coefficients. The X center
111 * at a given Z range (mm) can be determined by:
112 *
113 * X center = coefficients[0] + coefficients[1]*Z + ... + coefficients[N]*Z^N
114 *
115 * @public @memberof GoGeoCal
116 * @version Introduced in firmware 4.7.0.130
117 * @param cal GoGeoCal object.
118 * @param cameraIndex Camera index.
119 * @return Array of X center to Z fit coefficients. Type: k64f.
120 */
121 GoFx(kArray1) GoGeoCal_XCenterFit(GoGeoCal cal, kSize cameraIndex);
122 
123 /**
124 * Gets Y center to Z fit.
125 * The world Y center (mm) of an imager varies with the range if any pitch is present. It also represents the distance
126 * from the sensor reference 0 plane (usually mid-sensor). The fit is stored as polynomial coefficients. The Y center
127 * at a given Z range (mm) can be determined by:
128 *
129 * Y center = coefficients[0] + coefficients[1]*Z + ... + coefficients[N]*Z^N
130 *
131 * @public @memberof GoGeoCal
132 * @version Introduced in firmware 4.7.0.130
133 * @param cal GoGeoCal object.
134 * @param cameraIndex Camera index. kERROR_PARAMETER if invalid.
135 * @return Array of Y center to Z fit coefficients. Type: k64f.
136 */
137 GoFx(kArray1) GoGeoCal_YCenterFit(GoGeoCal cal, kSize cameraIndex);
138 
139 /**
140 * Gets camera roll angle. This can be used to correct for camera roll.
141 *
142 * @public @memberof GoGeoCal
143 * @version Introduced in firmware 4.7.0.130
144 * @param cal GoGeoCal object.
145 * @param cameraIndex Camera index
146 * @return Roll angle (in radians)
147 */
148 GoFx(k64f) GoGeoCal_Roll(GoGeoCal cal, kSize cameraIndex);
149 
150 /**
151 * Applies a new camera window to the camera orientation information and updates coefficients.
152 *
153 * @public @memberof GoGeoCal
154 * @version Introduced in firmware 5.2.18.3
155 * @param cal GoGeoCal object.
156 * @param x X of new camera window.
157 * @param y Y of new camera window.
158 * @param width Width of new camera window.
159 * @param height Height of new camera window.
160 * @param xSubsampling X subsampling of new camera window.
161 * @param ySubsampling Y subsampling of new camera window.
162 * @param cameraIndex Camera index.
163 * @return Operation status.
164 */
165 GoFx(kStatus) GoGeoCal_ApplyActiveArea(GoGeoCal cal, k32u x, k32u y, k32u width, k32u height, k32u xSubsampling, k32u ySubsampling, kSize cameraIndex);
166 
167 #include <GoSdk/GoGeoCal.x.h>
168 
169 #endif
const kChar * GoGeoCal_Timestamp(GoGeoCal cal)
Gets timestamp.
kStatus GoGeoCal_ApplyActiveArea(GoGeoCal cal, k32u x, k32u y, k32u width, k32u height, k32u xSubsampling, k32u ySubsampling, kSize cameraIndex)
Applies a new camera window to the camera orientation information and updates coefficients.
kSize GoGeoCal_CameraCount(GoGeoCal cal)
Gets count of cameras.
kArray1 GoGeoCal_YCenterFit(GoGeoCal cal, kSize cameraIndex)
Gets Y center to Z fit.
kStatus GoGeoCal_CalWindow(GoGeoCal cal, kSize cameraIndex, k32u *x, k32u *y, k32u *width, k32u *height, k32u *xSubsampling, k32u *ySubsampling)
Gets calibration window.
k32u GoGeoCal_Id(GoGeoCal cal)
Gets sensor ID.
kArray1 GoGeoCal_XCenterFit(GoGeoCal cal, kSize cameraIndex)
Gets X center to Z fit.
kArray1 GoGeoCal_YResolutionFit(GoGeoCal cal, kSize cameraIndex)
Gets Y resolution to Z fit.
Essential SDK declarations.
k64f GoGeoCal_Roll(GoGeoCal cal, kSize cameraIndex)
Gets camera roll angle.
Contains the GeoCal data for a sensor. Do not read the GeoCal file directly, use this class to parse ...
kArray1 GoGeoCal_XResolutionFit(GoGeoCal cal, kSize cameraIndex)
Gets X resolution to Z fit.