NVIDIA DriveOS Linux SDK API Reference

7.2.5.0 Early Access Release
CameraModel.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2015-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4  *
5  * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
6  * property and proprietary rights in and to this material, related
7  * documentation and any modifications thereto. Any use, reproduction,
8  * disclosure or distribution of this material and related documentation
9  * without an express license agreement from NVIDIA CORPORATION or
10  * its affiliates is strictly prohibited.
11  */
12 
13 #ifndef DW_CALIBRATION_CAMERAMODEL_CAMERAMODEL_H_
14 #define DW_CALIBRATION_CAMERAMODEL_CAMERAMODEL_H_
15 
16 #include <dw/core/base/Config.h>
18 #include <dw/core/base/Types.h>
19 #include <dw/rig/Rig.h>
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
41 // Calibrated cameras
43 
49 typedef struct dwCameraModelObject* dwCameraModelHandle_t;
50 
54 typedef struct dwCameraModelObject const* dwConstCameraModelHandle_t;
55 
73  const dwPinholeCameraConfig* config,
74  dwContextHandle_t context);
75 
93  const dwFThetaCameraConfig* config,
94  dwContextHandle_t context);
95 
113  const dwStereographicCameraConfig* config,
114  dwContextHandle_t context);
115 
133 
169 
191  float32_t u, float32_t v,
193 
214  float32_t x, float32_t y, float32_t z,
216 
245 dwStatus dwCameraModel_isRayInsideFOV(bool* isInsideMaxFOV,
246  float32_t x, float32_t y, float32_t z,
248 
266 
283 dwStatus dwCameraModel_getImageSize(uint32_t* width, uint32_t* height,
285 
349  dwVector2ui newSize,
351 
376  uint32_t sensorId,
378 
381 #ifdef __cplusplus
382 }
383 #endif
384 
385 #endif // DW_CALIBRATION_CAMERAMODEL_CAMERAMODEL_H_
dwCameraModelHandle_t
struct dwCameraModelObject * dwCameraModelHandle_t
A pointer to the handle representing a calibrated camera model.
Definition: CameraModel.h:49
dwCameraModel_release
DW_API_PUBLIC dwStatus dwCameraModel_release(dwCameraModelHandle_t obj)
Releases the calibrated camera.
dwConstRigHandle_t
struct dwRigObject const * dwConstRigHandle_t
Handle representing the const Rig interface.
Definition: Rig.h:57
Types.h
Rig.h
dwCameraModel_pixel2Ray
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.
dwVector2ui
Defines a two-element unsigned-integer vector.
Definition: MatrixTypes.h:63
dwCameraModel_initializeStereographic
DW_API_PUBLIC dwStatus dwCameraModel_initializeStereographic(dwCameraModelHandle_t *obj, const dwStereographicCameraConfig *config, dwContextHandle_t context)
Creates and initializes a calibrated stereographic camera.
dwCameraModel_getHorizontalFOV
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.
dwConstCameraModelHandle_t
struct dwCameraModelObject const * dwConstCameraModelHandle_t
A pointer to the handle representing a const calibrated camera.
Definition: CameraModel.h:54
dwPinholeCameraConfig
Definition: RigTypes.h:144
dwFThetaCameraConfig
Configuration parameters for a calibrated FTheta camera.
Definition: RigTypes.h:328
float32_t
float float32_t
Definition: core/base/BasicTypes.h:43
dwCameraModel_ray2Pixel
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 camera coordinates to a 2D pixel position.
obj
const NvSciSyncObj *const obj
Definition: wfdext.h:528
dwCameraModel_applyImageTransform
DW_API_PUBLIC dwStatus dwCameraModel_applyImageTransform(const dwMatrix3f *transform, dwVector2ui newSize, dwCameraModelHandle_t obj)
Sets a new origin for the image and adjusts image scales.
dwCameraModel_getInversePolynomial
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.
dwStatus
dwStatus
Status definition.
Definition: ErrorDefs.h:32
dwCameraModel_isRayInsideFOV
DW_API_PUBLIC dwStatus dwCameraModel_isRayInsideFOV(bool *isInsideMaxFOV, float32_t x, float32_t y, float32_t z, dwConstCameraModelHandle_t obj)
Checks if the angle of a ray with the camera's optical center is below the maximum possible angle of ...
Config.h
dwContextHandle_t
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:81
dwMatrix3f
Defines a 3x3 matrix of floating point numbers by using only one array.
Definition: MatrixTypes.h:158
dwCameraModel_getImageSize
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
#define DW_API_PUBLIC
Definition: core/base/Exports.h:57
dwCameraModel_initializeFTheta
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.
dwCameraModel_initialize
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.
dwStereographicCameraConfig
Configuration parameters for a calibrated stereographic camera.
Definition: RigTypes.h:455
Context.h
dwCameraModel_initializePinhole
DW_API_PUBLIC dwStatus dwCameraModel_initializePinhole(dwCameraModelHandle_t *obj, const dwPinholeCameraConfig *config, dwContextHandle_t context)
Creates and initializes a calibrated pinhole camera.