DriveWorks SDK Reference
3.0.4260 Release
For Test and Development only

CameraModel.h
Go to the documentation of this file.
1 // This code contains NVIDIA Confidential Information and is disclosed
3 // under the Mutual Non-Disclosure Agreement.
4 //
5 // Notice
6 // ALL NVIDIA DESIGN SPECIFICATIONS AND CODE ("MATERIALS") ARE PROVIDED "AS IS" NVIDIA MAKES
7 // NO REPRESENTATIONS, WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
8 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTIES OF NONINFRINGEMENT,
9 // MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
10 //
11 // NVIDIA Corporation assumes no responsibility for the consequences of use of such
12 // information or for any infringement of patents or other rights of third parties that may
13 // result from its use. No license is granted by implication or otherwise under any patent
14 // or patent rights of NVIDIA Corporation. No third party distribution is allowed unless
15 // expressly authorized by NVIDIA. Details are subject to change without notice.
16 // This code supersedes and replaces all information previously supplied.
17 // NVIDIA Corporation products are not authorized for use as critical
18 // components in life support devices or systems without express written approval of
19 // NVIDIA Corporation.
20 //
21 // Copyright (c) 2015-2019 NVIDIA Corporation. All rights reserved.
22 //
23 // NVIDIA Corporation and its licensors retain all intellectual property and proprietary
24 // rights in and to this software and related documentation and any modifications thereto.
25 // Any use, reproduction, disclosure or distribution of this software and related
26 // documentation without an express license agreement from NVIDIA Corporation is
27 // strictly prohibited.
28 //
30 
31 #ifndef DW_CALIBRATION_CAMERAMODEL_CAMERAMODEL_H_
32 #define DW_CALIBRATION_CAMERAMODEL_CAMERAMODEL_H_
33 
34 #include <dw/core/Config.h>
35 #include <dw/core/Context.h>
36 #include <dw/core/Exports.h>
37 #include <dw/core/Types.h>
38 #include <dw/rig/Rig.h>
39 
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43 
61 // Calibrated cameras
63 
68 typedef struct dwCameraModelObject* dwCameraModelHandle_t;
69 
72 typedef struct dwCameraModelObject const* dwConstCameraModelHandle_t;
73 
86 dwStatus dwCameraModel_initializePinhole(dwCameraModelHandle_t* obj,
87  const dwPinholeCameraConfig* config,
88  dwContextHandle_t context);
89 
106 dwStatus dwCameraModel_initializeOCam(dwCameraModelHandle_t* obj,
107  const dwOCamCameraConfig* config,
108  dwContextHandle_t context);
109 
122 dwStatus dwCameraModel_initializeFTheta(dwCameraModelHandle_t* obj,
123  const dwFThetaCameraConfig* config,
124  dwContextHandle_t context);
125 
138 dwStatus dwCameraModel_initializeStereographic(dwCameraModelHandle_t* obj,
139  const dwStereographicCameraConfig* config,
140  dwContextHandle_t context);
141 
154 dwStatus dwCameraModel_release(dwCameraModelHandle_t obj);
155 
175  dwCameraModelHandle_t obj);
176 
194  float32_t u, float32_t v,
195  dwConstCameraModelHandle_t obj);
196 
213  float32_t x, float32_t y, float32_t z,
214  dwConstCameraModelHandle_t obj);
215 
230 dwStatus dwCameraModel_isRayInsideFOV(bool* isInside, float32_t x, float32_t y, float32_t z, dwConstCameraModelHandle_t obj);
231 
244  dwConstCameraModelHandle_t obj);
245 
258 dwStatus dwCameraModel_getImageSize(uint32_t* width, uint32_t* height,
259  dwConstCameraModelHandle_t obj);
260 
312  dwVector2ui newSize,
313  bool updateMasks,
314  dwCameraModelHandle_t obj);
315 
331 dwStatus dwCameraModel_initialize(dwCameraModelHandle_t* camera,
332  uint32_t sensorId,
333  dwConstRigHandle_t obj);
334 
339 #ifdef __cplusplus
340 }
341 #endif
342 
343 #endif // DW_CALIBRATION_CAMERAMODEL_CAMERAMODEL_H_
DW_API_PUBLIC dwStatus dwCameraModel_getHorizontalFOV(float32_t *hfov, dwConstCameraModelHandle_t obj)
Gets the horizontal Field of View (FOV) of the calibrated camera, in radians.
NVIDIA DriveWorks API: Core Types
float float32_t
Specifies POD types.
Definition: Types.h:70
NVIDIA DriveWorks API: Rig Configuration
DW_API_PUBLIC dwStatus dwCameraModel_initializeFTheta(dwCameraModelHandle_t *obj, const dwFThetaCameraConfig *config, dwContextHandle_t context)
Creates and initializes a calibrated camera for the F-Theta distortion model.
Configuration parameters for a calibrated FTheta camera.
Definition: Rig.h:268
DW_API_PUBLIC dwStatus dwCameraModel_initializeStereographic(dwCameraModelHandle_t *obj, const dwStereographicCameraConfig *config, dwContextHandle_t context)
Creates and initializes a calibrated camera for the F-Theta distortion model.
NVIDIA DriveWorks API: Core Methods
DW_API_PUBLIC dwStatus dwCameraModel_pixel2Ray(float32_t *x, float32_t *y, float32_t *z, float32_t u, float32_t v, dwConstCameraModelHandle_t obj)
Back-projects a 2D point in pixel coordinates to a 3D optical ray direction.
DW_API_PUBLIC dwStatus dwCameraModel_initializePinhole(dwCameraModelHandle_t *obj, const dwPinholeCameraConfig *config, dwContextHandle_t context)
Creates and initializes a calibrated pinhole camera.
dwStatus
Status definition.
Definition: Status.h:166
DW_API_PUBLIC dwStatus dwCameraModel_ray2Pixel(float32_t *u, float32_t *v, float32_t x, float32_t y, float32_t z, dwConstCameraModelHandle_t obj)
Projects a 3D point in pixel coordinates to a 2D pixel position.
Configuration parameters for a calibrated OCam sphere camera.
Definition: Rig.h:236
DW_API_PUBLIC dwStatus dwCameraModel_getInversePolynomial(float32_t *invPoly, size_t *size, dwCameraModelHandle_t obj)
Returns the inverse polynomial used for the inverse distortion model.
DW_API_PUBLIC dwStatus dwCameraModel_getImageSize(uint32_t *width, uint32_t *height, dwConstCameraModelHandle_t obj)
Gets the width and height of the calibrated camera, in pixels.
DW_API_PUBLIC dwStatus dwCameraModel_release(dwCameraModelHandle_t obj)
Releases the calibrated camera.
struct dwRigObject const * dwConstRigHandle_t
Definition: Rig.h:180
Defines a 3x3 matrix of floating point numbers.
Definition: Types.h:237
struct dwCameraModelObject const * dwConstCameraModelHandle_t
A pointer to the handle representing a const calibrated camera.
Definition: CameraModel.h:72
Defines a two-element unsigned-integer vector.
Definition: Types.h:312
DW_API_PUBLIC dwStatus dwCameraModel_applyImageTransform(const dwMatrix3f *transform, dwVector2ui newSize, bool updateMasks, dwCameraModelHandle_t obj)
Sets a new origin for the image.
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:80
DW_API_PUBLIC dwStatus dwCameraModel_initializeOCam(dwCameraModelHandle_t *obj, const dwOCamCameraConfig *config, dwContextHandle_t context)
Creates and initializes a calibrated omnidirectional camera.
Configuration parameters for a calibrated FTheta camera.
Definition: Rig.h:289
Configuration parameters for a calibrated pinhole camera.
Definition: Rig.h:204
struct dwCameraModelObject * dwCameraModelHandle_t
A pointer to the handle representing a calibrated camera model.
Definition: CameraModel.h:68
NVIDIA DriveWorks API: Core Exports
DW_API_PUBLIC dwStatus dwCameraModel_isRayInsideFOV(bool *isInside, float32_t x, float32_t y, float32_t z, dwConstCameraModelHandle_t obj)
Projects a 3D point in pixel coordinates to a 2D pixel position.
#define DW_API_PUBLIC
Definition: Exports.h:56
DW_API_PUBLIC dwStatus dwCameraModel_initialize(dwCameraModelHandle_t *camera, uint32_t sensorId, dwConstRigHandle_t obj)
Creates a calibrated camera model polymorphically for a compatible sensor.