NVIDIA DriveOS Linux NSR SDK API Reference

7.0.3.0 Release
CameraModel.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2015-2025 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>
17 #include <dw/core/context/Context.h>
18 #include <dw/core/base/Exports.h>
19 #include <dw/core/base/Types.h>
20 #include <dw/rig/Rig.h>
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
42 // Calibrated cameras
44 
50 typedef struct dwCameraModelObject* dwCameraModelHandle_t;
51 
55 typedef struct dwCameraModelObject const* dwConstCameraModelHandle_t;
56 
74  const dwPinholeCameraConfig* config,
75  dwContextHandle_t context);
76 
94  const dwFThetaCameraConfig* config,
95  dwContextHandle_t context);
96 
113 DW_DEPRECATED("dwCameraModel_initializeFThetaNew is renamed to dwCameraModel_initializeFTheta.")
115  const dwFThetaCameraConfig* config,
116  dwContextHandle_t context);
117 
135  const dwStereographicCameraConfig* config,
136  dwContextHandle_t context);
137 
155 
191 
213  float32_t u, float32_t v,
215 
236  float32_t x, float32_t y, float32_t z,
238 
267 dwStatus dwCameraModel_isRayInsideFOV(bool* isInsideMaxFOV,
268  float32_t x, float32_t y, float32_t z,
270 
288 
305 dwStatus dwCameraModel_getImageSize(uint32_t* width, uint32_t* height,
307 
371  dwVector2ui newSize,
373 
398  uint32_t sensorId,
400 
403 #ifdef __cplusplus
404 }
405 #endif
406 
407 #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:50
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:58
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:55
dwPinholeCameraConfig
Definition: RigTypes.h:126
dwFThetaCameraConfig
Configuration parameters for a calibrated FTheta camera.
Definition: RigTypes.h:307
float32_t
float float32_t
Specifies POD types.
Definition: BasicTypes.h:41
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.
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.
DW_DEPRECATED
#define DW_DEPRECATED(msg)
Definition: Exports.h:50
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 ...
dwContextHandle_t
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:74
dwMatrix3f
Defines a 3x3 matrix of floating point numbers by using only one array.
Definition: MatrixTypes.h:158
dwStatus
dwStatus
Status definition.
Definition: ErrorDefs.h:27
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: Exports.h:38
obj
const NvSciSyncObj *const obj
Definition: wfdext.h:120
dwCameraModel_initializeFThetaNew
DW_API_PUBLIC dwStatus dwCameraModel_initializeFThetaNew(dwCameraModelHandle_t *obj, const dwFThetaCameraConfig *config, dwContextHandle_t context)
Creates and initializes a calibrated camera for the F-Theta distortion model.
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:431
dwCameraModel_initializePinhole
DW_API_PUBLIC dwStatus dwCameraModel_initializePinhole(dwCameraModelHandle_t *obj, const dwPinholeCameraConfig *config, dwContextHandle_t context)
Creates and initializes a calibrated pinhole camera.