Gocator API
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-2026 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 * Loads the GoGeoCal data from file.
36 *
37 * @public @memberof GoGeoCal
38 * @param cal Destination for the constructed object handle.
39 * @param fileName Name of the file.
40 * @param allocator Memory allocator (or kNULL for default).
41 * @return Operation status.
42 */
43 GoFx(kStatus) GoGeoCal_Load(GoGeoCal* cal, const kChar* fileName, kAlloc allocator);
44 
45 /**
46 * Saves the GoGeoCal object to file.
47 *
48 * @public @memberof GoGeoCal
49 * @param cal GoGeoCal object.
50 * @param fileName Name of the file.
51 * @return Operation status.
52 */
53 GoFx(kStatus) GoGeoCal_Save(GoGeoCal cal, const kChar* fileName);
54 
55 /**
56 * Gets timestamp
57 *
58 * @public @memberof GoGeoCal
59 * @version Introduced in firmware 4.7.0.130
60 * @param cal GoGeoCal object.
61 * @return Timestamp.
62 */
63 GoFx(const kChar*) GoGeoCal_Timestamp(GoGeoCal cal);
64 
65 /**
66 * Gets count of cameras.
67 *
68 * @public @memberof GoGeoCal
69 * @version Introduced in firmware 4.7.0.130
70 * @param cal GoGeoCal object.
71 * @return Count of views.
72 */
74 
75 /**
76 * Gets calibration window.
77 *
78 * @public @memberof GoGeoCal
79 * @version Introduced in firmware 4.7.0.130
80 * @param cal GoGeoCal object.
81 * @param cameraIndex Camera index. kERROR_PARAMETER if invalid.
82 * @param x Output parameter for window x. Provide with a pointer to a k32u. Ignored if input is kNULL.
83 * @param y Output parameter for window y. Provide with a pointer to a k32u. Ignored if input is kNULL.
84 * @param width Output parameter for window width. Provide with a pointer to a k32u. Ignored if input is kNULL.
85 * @param height Output parameter for window height. Provide with a pointer to a k32u. Ignored if input is kNULL.
86 * @param xSubsampling Output parameter for window xSubsampling. Provide with a pointer to a k32u. Ignored if input is kNULL.
87 * @param ySubsampling Output parameter for window ySubsampling. Provide with a pointer to a k32u. Ignored if input is kNULL.
88 * @return Operation status.
89 */
90 GoFx(kStatus) GoGeoCal_CalWindow(GoGeoCal cal, kSize cameraIndex, k32u* x, k32u* y, k32u* width, k32u* height, k32u* xSubsampling, k32u* ySubsampling);
91 
92 /**
93 * Gets X resolution to Z fit.
94 * The X and Y resolution (mm/pixel) of an imager's pixels varies with the range. When resampling images,
95 * it is necessary to know the native resolution of each pixel. Typically, this is only needed for color/texture output.
96 * Profile cameras would have a fit set to kNULL. The fit is stored as polynomial coefficients. The X resolution at a
97 * given Z range (mm) can be determined by:
98 *
99 * X resolution = coefficients[0] + coefficients[1]*Z + ... + coefficients[N]*Z^N
100 *
101 * @public @memberof GoGeoCal
102 * @version Introduced in firmware 4.7.0.130
103 * @param cal GoGeoCal object.
104 * @param cameraIndex Camera index.
105 * @return Array of X resolution to Z fit coefficients. Type: k64f. kNULL is returned if the
106 * camera does not have a X resolution to Z fit.
107 */
108 GoFx(kArray1) GoGeoCal_XResolutionFit(GoGeoCal cal, kSize cameraIndex);
109 
110 /**
111 * Gets Y resolution to Z fit.
112 * The X and Y resolution (mm/pixel) of an imager's pixels varies with the range. When resampling images,
113 * it is necessary to know the native resolution of each pixel. Typically, this is only needed for color/texture output.
114 * Profile cameras would have a fit set to kNULL. The fit is stored as polynomial coefficients. The Y resolution at a
115 * given Z range (mm) can be determined by:
116 *
117 * Y resolution = coefficients[0] + coefficients[1]*Z + ... + coefficients[N]*Z^N
118 *
119 * @public @memberof GoGeoCal
120 * @version Introduced in firmware 4.7.0.130
121 * @param cal GoGeoCal object.
122 * @param cameraIndex Camera index.
123 * @return Array of Y resolution to Z fit coefficients. Type: k64f. kNULL is returned if the
124 * camera does not have a X resolution to Z fit.
125 */
126 GoFx(kArray1) GoGeoCal_YResolutionFit(GoGeoCal cal, kSize cameraIndex);
127 
128 /**
129 * Gets X center to Z fit.
130 * The world X center (mm) of an imager varies with the range if any yaw is present. It also represents the distance
131 * from the sensor reference 0 plane (usually mid-sensor). The fit is stored as polynomial coefficients. The X center
132 * at a given Z range (mm) can be determined by:
133 *
134 * X center = coefficients[0] + coefficients[1]*Z + ... + coefficients[N]*Z^N
135 *
136 * @public @memberof GoGeoCal
137 * @version Introduced in firmware 4.7.0.130
138 * @param cal GoGeoCal object.
139 * @param cameraIndex Camera index.
140 * @return Array of X center to Z fit coefficients. Type: k64f.
141 */
142 GoFx(kArray1) GoGeoCal_XCenterFit(GoGeoCal cal, kSize cameraIndex);
143 
144 /**
145 * Gets Y center to Z fit.
146 * The world Y center (mm) of an imager varies with the range if any pitch is present. It also represents the distance
147 * from the sensor reference 0 plane (usually mid-sensor). The fit is stored as polynomial coefficients. The Y center
148 * at a given Z range (mm) can be determined by:
149 *
150 * Y center = coefficients[0] + coefficients[1]*Z + ... + coefficients[N]*Z^N
151 *
152 * @public @memberof GoGeoCal
153 * @version Introduced in firmware 4.7.0.130
154 * @param cal GoGeoCal object.
155 * @param cameraIndex Camera index. kERROR_PARAMETER if invalid.
156 * @return Array of Y center to Z fit coefficients. Type: k64f.
157 */
158 GoFx(kArray1) GoGeoCal_YCenterFit(GoGeoCal cal, kSize cameraIndex);
159 
160 /**
161 * Gets camera roll angle. This can be used to correct for camera roll.
162 *
163 * @public @memberof GoGeoCal
164 * @version Introduced in firmware 4.7.0.130
165 * @param cal GoGeoCal object.
166 * @param cameraIndex Camera index
167 * @return Roll angle (in radians)
168 */
169 GoFx(k64f) GoGeoCal_Roll(GoGeoCal cal, kSize cameraIndex);
170 
171 /**
172 * Applies a new camera window to the camera orientation information and updates coefficients.
173 *
174 * @public @memberof GoGeoCal
175 * @version Introduced in firmware 5.2.18.3
176 * @param cal GoGeoCal object.
177 * @param x X of new camera window.
178 * @param y Y of new camera window.
179 * @param width Width of new camera window.
180 * @param height Height of new camera window.
181 * @param xSubsampling X subsampling of new camera window.
182 * @param ySubsampling Y subsampling of new camera window.
183 * @param cameraIndex Camera index.
184 * @return Operation status.
185 */
186 GoFx(kStatus) GoGeoCal_ApplyActiveArea(GoGeoCal cal, k32u x, k32u y, k32u width, k32u height, k32u xSubsampling, k32u ySubsampling, kSize cameraIndex);
187 
188 #include <GoSdk/GoGeoCal.x.h>
189 
190 #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.
kStatus GoGeoCal_Load(GoGeoCal *cal, const kChar *fileName, kAlloc allocator)
Loads the GoGeoCal data from file.
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.
kStatus GoGeoCal_Save(GoGeoCal cal, const kChar *fileName)
Saves the GoGeoCal object to file.
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.