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