DriveWorks SDK Reference
3.5.78 Release
For Test and Development only

Camera.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) 2016-2020 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 
59 #ifndef DW_SENSORS_CAMERA_CAMERA_H_
60 #define DW_SENSORS_CAMERA_CAMERA_H_
61 
62 #include <dw/core/Config.h>
63 #include <dw/core/Types.h>
64 #include <dw/sensors/Sensors.h>
65 #include <dw/image/Image.h>
66 
67 // Forward declares from NvMedia
68 typedef void NvMediaIPPManager;
69 
70 #ifdef __cplusplus
71 extern "C" {
72 #endif
73 
75 typedef struct dwCameraFrame* dwCameraFrameHandle_t;
76 
80 typedef enum dwCameraOutputType {
99 
101 typedef enum dwCameraRawFormat {
103 
108 
113 
118 
120 
123 
125 typedef enum dwCameraType {
137 } dwCameraType;
138 
152 
154 typedef enum dwCameraFOV {
167 } dwCameraFOV;
168 
170 typedef struct dwCameraProperties
171 {
174  dwCameraExposureControl exposure;
178  int32_t outputTypes;
179  uint32_t siblings;
180  uint32_t revision;
181  uint32_t imageBitDepth;
182  bool isSimulated;
184 
209 dwStatus dwSensorCamera_readFrameNew(dwCameraFrameHandle_t* frameHandle,
210  dwTime_t timeout_us, dwSensorHandle_t sensor);
211 
236 DW_DEPRECATED("WARNING: dwSensorCamera_readFrame() will be deprecated from future releases "
237  "Use dwSensorCamera_readFrameNew api instead and replace camera.gmsl.ipp with camera.gmsl. See the user guide for Camera SIPL Migration")
238 dwStatus dwSensorCamera_readFrame(dwCameraFrameHandle_t* frameHandle, uint32_t sibling,
239  dwTime_t timeout_us, dwSensorHandle_t sensor);
240 
256 dwStatus dwSensorCamera_returnFrame(dwCameraFrameHandle_t* frameHandle);
257 
280  dwCameraFrameHandle_t frame);
281 
304  dwCameraFrameHandle_t frame);
305 
321 
335  dwSensorHandle_t sensor);
336 
350  dwSensorHandle_t sensor);
351 
366  uint32_t modeIdx,
367  dwSensorHandle_t sensor);
368 
387  dwCameraOutputType type,
388  dwSensorHandle_t sensor);
389 
402 dwStatus dwSensorCamera_setCUDAStream(cudaStream_t stream, dwSensorHandle_t sensor);
403 
415 dwStatus dwSensorCamera_getCUDAStream(cudaStream_t* stream, dwSensorHandle_t sensor);
416 
428 dwStatus dwSensorCamera_getTimestamp(dwTime_t* timestamp, dwCameraFrameHandle_t frameHandle);
429 
430 #ifdef __cplusplus
431 }
432 #endif
433 
434 #endif // DW_SENSORS_CAMERA_CAMERA_H_
dwCameraRawFormat rawFormat
Definition: Camera.h:173
NVIDIA DriveWorks API: Core Types
float float32_t
Specifies POD types.
Definition: Types.h:70
DW_API_PUBLIC dwStatus dwSensorCamera_getNvMediaIPPManager(NvMediaIPPManager **manager, dwSensorHandle_t sensor)
Gets the NvMediaIPPManager used for GMSL camera IPP setup and event callback.
struct dwImageObject * dwImageHandle_t
Definition: Image.h:99
DW_API_PUBLIC dwStatus dwSensorCamera_readFrameNew(dwCameraFrameHandle_t *frameHandle, dwTime_t timeout_us, dwSensorHandle_t sensor)
Reads a frame handle from the camera sensor.
dwCameraExposureControl
Enum of exposure control types.
Definition: Camera.h:140
DW_API_PUBLIC dwStatus dwSensorCamera_setCUDAStream(cudaStream_t stream, dwSensorHandle_t sensor)
Sets the CUDA stream used by getImageAsync during internal cuda related operations.
DW_API_PUBLIC dwStatus dwSensorCamera_returnFrame(dwCameraFrameHandle_t *frameHandle)
Returns a frame to the camera after it has been consumed.
dwVector2ui resolution
Definition: Camera.h:177
Exposure control using user&#39;s custom callback.
Definition: Camera.h:150
Default exposure control.
Definition: Camera.h:146
DW_API_PUBLIC dwStatus dwSensorCamera_getTimestamp(dwTime_t *timestamp, dwCameraFrameHandle_t frameHandle)
Gets the timestamp of the current camera frame.
NVIDIA DriveWorks API: Image Conversion and Streaming Functionality
DW_API_PUBLIC dwStatus dwSensorCamera_getImageAsync(dwImageHandle_t *image, dwCameraOutputType type, dwCameraFrameHandle_t frame)
Gets the output image/s image in a format specified by the output type.
dwCameraType
Enum of available camera sensors.
Definition: Camera.h:125
void NvMediaIPPManager
Definition: Camera.h:68
DW_API_PUBLIC dwStatus dwSensorCamera_getNumSupportedCaptureModes(uint32_t *numModes, dwSensorHandle_t sensor)
Gets number of supported capture modes.
struct dwSensorObject * dwSensorHandle_t
Handle representing a sensor.
Definition: Sensors.h:88
dwStatus
Status definition.
Definition: Status.h:178
NVIDIA DriveWorks API: Sensors
other YUV processed outputs (see devguide)
Definition: Camera.h:97
int64_t dwTime_t
Specifies a timestamp unit, in microseconds.
Definition: Types.h:82
for processed images RGBA image supported in all processed use cases
Definition: Camera.h:87
dwCameraFOV
Enum of available FOV in degrees for camera lenses.
Definition: Camera.h:154
#define DW_DEPRECATED(msg)
Definition: Exports.h:68
dwCameraFOV fov
Definition: Camera.h:176
DW_API_PUBLIC dwStatus dwSensorCamera_getImageProperties(dwImageProperties *imageProperties, dwCameraOutputType type, dwSensorHandle_t sensor)
Gets information about the image properties for a given &#39;dwCameraImageOutputType&#39;.
Defines a two-element unsigned-integer vector.
Definition: Types.h:312
dwCameraType cameraType
Definition: Camera.h:172
simple yuv420 output, supported in most use cases (see doc)
Definition: Camera.h:89
Unknown exposure control.
Definition: Camera.h:144
struct dwCameraFrame * dwCameraFrameHandle_t
Handle to captured frame.
Definition: Camera.h:75
int32_t outputTypes
Definition: Camera.h:178
Camera Properties.
Definition: Camera.h:170
No exposure control.
Definition: Camera.h:142
DW_API_PUBLIC dwStatus dwSensorCamera_getSensorProperties(dwCameraProperties *properties, dwSensorHandle_t sensor)
Gets information about the camera sensor.
DW_API_PUBLIC dwStatus dwSensorCamera_readFrame(dwCameraFrameHandle_t *frameHandle, uint32_t sibling, dwTime_t timeout_us, dwSensorHandle_t sensor)
Reads a frame handle from the camera sensor.
uint32_t siblings
Definition: Camera.h:179
float32_t framerate
Definition: Camera.h:175
dwCameraOutputType
Output types supported by the camera.
Definition: Camera.h:80
other YUV processed outputs (see devguide)
Definition: Camera.h:93
other YUV processed outputs (see devguide)
Definition: Camera.h:95
uint32_t revision
Definition: Camera.h:180
uint32_t imageBitDepth
Definition: Camera.h:181
dwCameraExposureControl exposure
Definition: Camera.h:174
dwCameraRawFormat
Raw encoding formats pixel-order.
Definition: Camera.h:101
DW_API_PUBLIC dwStatus dwSensorCamera_getCUDAStream(cudaStream_t *stream, dwSensorHandle_t sensor)
Gets the CUDA stream used.
DW_API_PUBLIC dwStatus dwSensorCamera_getImage(dwImageHandle_t *image, dwCameraOutputType type, dwCameraFrameHandle_t frame)
Gets the output image/s image in a format specified by the output type.
#define DW_API_PUBLIC
Definition: Exports.h:56
processed images (usually be YUV420 planar or RGB planar)
Definition: Camera.h:82
Defines the properties of the image.
Definition: Image.h:236
DW_API_PUBLIC dwStatus dwSensorCamera_getSupportedCaptureMode(dwCameraProperties *captureMode, uint32_t modeIdx, dwSensorHandle_t sensor)
Gets capture modes by specified index.
Exposure control with bracketed auto exposure.
Definition: Camera.h:148