DriveWorks SDK Reference
3.0.4260 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 
50 #ifndef DW_SENSORS_CAMERA_CAMERA_H_
51 #define DW_SENSORS_CAMERA_CAMERA_H_
52 
53 #include <dw/core/Config.h>
54 #include <dw/core/Types.h>
55 #include <dw/sensors/Sensors.h>
56 #include <dw/image/Image.h>
57 
58 // Forward declares from NvMedia
59 typedef void NvMediaIPPManager;
60 
61 #ifdef __cplusplus
62 extern "C" {
63 #endif
64 
66 typedef struct dwCameraFrame* dwCameraFrameHandle_t;
67 
71 typedef enum dwCameraOutputType {
90 
91 typedef enum dwCameraRawFormat {
94 
99 
104 
109 
111 
114 
116 typedef enum dwCameraType {
128 } dwCameraType;
129 
143 
145 typedef enum dwCameraFOV {
158 } dwCameraFOV;
159 
160 typedef struct dwCameraProperties
161 {
164  dwCameraExposureControl exposure;
168  int32_t outputTypes;
169  uint32_t siblings;
170  uint32_t revision;
171  uint32_t imageBitDepth;
172  bool isSimulated;
174 
200 dwStatus dwSensorCamera_readFrame(dwCameraFrameHandle_t* frameHandle, uint32_t sibling,
201  dwTime_t timeout_us, dwSensorHandle_t sensor);
202 
218 dwStatus dwSensorCamera_returnFrame(dwCameraFrameHandle_t* frameHandle);
219 
242  dwCameraFrameHandle_t frame);
243 
266  dwCameraFrameHandle_t frame);
267 
283 
297  dwSensorHandle_t sensor);
298 
312  dwSensorHandle_t sensor);
313 
328  uint32_t modeIdx,
329  dwSensorHandle_t sensor);
330 
349  dwCameraOutputType type,
350  dwSensorHandle_t sensor);
351 
364 dwStatus dwSensorCamera_setCUDAStream(cudaStream_t stream, dwSensorHandle_t sensor);
365 
377 dwStatus dwSensorCamera_getCUDAStream(cudaStream_t* stream, dwSensorHandle_t sensor);
378 
379 #ifdef __cplusplus
380 }
381 #endif
382 
383 #endif // DW_SENSORS_CAMERA_CAMERA_H_
dwCameraRawFormat rawFormat
Definition: Camera.h:163
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
dwCameraExposureControl
Enum of exposure control types.
Definition: Camera.h:131
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:167
Exposure control using user&#39;s custom callback.
Definition: Camera.h:141
Default exposure control.
Definition: Camera.h:137
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:116
void NvMediaIPPManager
Definition: Camera.h:59
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:166
NVIDIA DriveWorks API: Sensors
other YUV processed outputs (see devguide)
Definition: Camera.h:88
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:78
dwCameraFOV
Enum of available FOV in degrees for camera lenses.
Definition: Camera.h:145
dwCameraFOV fov
Definition: Camera.h:166
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:162
simple yuv420 output, supported in most use cases (see doc)
Definition: Camera.h:80
Unknown exposure control.
Definition: Camera.h:135
struct dwCameraFrame * dwCameraFrameHandle_t
Handle to captured frame.
Definition: Camera.h:66
int32_t outputTypes
Definition: Camera.h:168
No exposure control.
Definition: Camera.h:133
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:169
float32_t framerate
Definition: Camera.h:165
dwCameraOutputType
Output types supported by the camera.
Definition: Camera.h:71
other YUV processed outputs (see devguide)
Definition: Camera.h:84
other YUV processed outputs (see devguide)
Definition: Camera.h:86
uint32_t revision
Definition: Camera.h:170
uint32_t imageBitDepth
Definition: Camera.h:171
dwCameraExposureControl exposure
Definition: Camera.h:164
dwCameraRawFormat
Definition: Camera.h:91
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:73
Raw encoding formats pixel-order.
Definition: Camera.h:93
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:139