DriveWorks SDK Reference
5.12.103 Release
For Test and Development only

Camera Sensor

Detailed Description

Defines the camera module, which provides access to a virtual camera reading reading the data from a video file or a real camera connected to different sockets.

Unless explicitly specified, all errors returned by DW APIs are non recoverable and the user application should transition to fail safe mode. In addition, any error code not described in this documentation should be consider as fatal and the user application should also transition to fail safe mode.

Data Structures

struct  dwCameraISPBadPixelStats
 
struct  dwCameraISPEllipse
 Defines Ellipse Properties for Override Histogram Statistics. More...
 
struct  dwCameraISPHistogramStatsOverride
 SIPL ISP Histogram Statistics Override Params. More...
 
struct  dwCameraISPLocalAvgClipStats
 
struct  dwCameraISPStatisticsWindows
 
struct  dwCameraIspStatsOverrideSetting
 ISP Override Statistics Settings. More...
 
struct  dwCameraNotificationData
 NotificationData from SIPL. More...
 
struct  dwCameraProperties
 Camera Properties. More...
 
struct  dwCameraSIPLEErrorDetails
 Struct of the detailed error info from SIPL. More...
 
struct  dwCameraSIPLNotification
 Notification Data from SIPL. More...
 

Macros

#define DW_CAMERA_ERROR_ID_MAX   DW_NOTIF_ERROR_INTERNAL_FAILURE
 maximal error id reported by the camera module via module health service More...
 
#define DW_CAMERA_MAX_CAMERAMODULES_PER_BLOCK   4U
 Indicates the maximum number of camera modules per device block. More...
 
#define DW_CAMERA_MAX_DEVICE_GPIOS   8U
 Indicates the maximum number of gpio indices. More...
 
#define DW_CAMERA_NUM_ISP_UNITS   2U
 Number of available ISP Units. More...
 

Typedefs

typedef void(* dwCameraCallback) (dwCameraSIPLNotification *notification, dwSensorHandle_t sensor)
 Function type of the camera error event handling. More...
 
typedef struct dwCameraFrame * dwCameraFrameHandle_t
 Handle to captured frame. More...
 
typedef void NvMediaIPPManager
 

Enumerations

enum  dwCameraExposureControl {
  DW_CAMERA_EXPOSURE_NONE ,
  DW_CAMERA_EXPOSURE_UNKNOWN ,
  DW_CAMERA_EXPOSURE_AE ,
  DW_CAMERA_EXPOSURE_BAE ,
  DW_CAMERA_EXPOSURE_CUSTOM
}
 Enum of exposure control types. More...
 
enum  dwCameraFOV {
  DW_CAMERA_FOV_UNKNOWN = 0 ,
  DW_CAMERA_FOV_30 = 30 ,
  DW_CAMERA_FOV_48 = 48 ,
  DW_CAMERA_FOV_50 = 50 ,
  DW_CAMERA_FOV_55 = 55 ,
  DW_CAMERA_FOV_60 = 60 ,
  DW_CAMERA_FOV_65 = 65 ,
  DW_CAMERA_FOV_90 = 90 ,
  DW_CAMERA_FOV_100 = 100 ,
  DW_CAMERA_FOV_110 = 110 ,
  DW_CAMERA_FOV_120 = 120 ,
  DW_CAMERA_FOV_185 = 185
}
 Enum of available FOV in degrees for camera lenses. More...
 
enum  dwCameraISPType {
  DW_CAMERA_ISP0 = 0 ,
  DW_CAMERA_ISP1 ,
  DW_CAMERA_ISP2 ,
  DW_CAMERA_MAX_ISP_COUNT ,
  DW_CAMERA_ISP_UNKNOWN
}
 ISP types supported by the camera. More...
 
enum  dwCameraOutputType {
  DW_CAMERA_OUTPUT_NATIVE_PROCESSED = 1 << 0 ,
  DW_CAMERA_OUTPUT_NATIVE_RAW = 1 << 1 ,
  DW_CAMERA_OUTPUT_CUDA_RGBA_UINT8 = 1 << 2 ,
  DW_CAMERA_OUTPUT_CUDA_YUV420_UINT8_PLANAR = 1 << 3 ,
  DW_CAMERA_OUTPUT_CUDA_RAW_UINT16 = 1 << 4 ,
  DW_CAMERA_OUTPUT_CUDA_YUV420_UINT16_SEMIPLANAR = 1 << 5 ,
  DW_CAMERA_OUTPUT_CUDA_YUV444_UINT8_PLANAR = 1 << 6 ,
  DW_CAMERA_OUTPUT_CUDA_YUV444_UINT16_PLANAR = 1 << 7 ,
  DW_CAMERA_OUTPUT_CUDA_YUV420_UINT8_SEMIPLANAR = 1 << 8 ,
  DW_CAMERA_OUTPUT_NATIVE_PROCESSED1 = 1 << 9 ,
  DW_CAMERA_OUTPUT_NATIVE_PROCESSED2 = 1 << 10
}
 Output types supported by the camera. More...
 
enum  dwCameraRawFormat {
  DW_CAMERA_RAW_FORMAT_UNKNOWN = 0 ,
  DW_CAMERA_RAW_FORMAT_RGGB = 7000 ,
  DW_CAMERA_RAW_FORMAT_BGGR = 7100 ,
  DW_CAMERA_RAW_FORMAT_GRBG = 7200 ,
  DW_CAMERA_RAW_FORMAT_GBRG = 7300 ,
  DW_CAMERA_RAW_FORMAT_RCCB = 8000 ,
  DW_CAMERA_RAW_FORMAT_BCCR = 8100 ,
  DW_CAMERA_RAW_FORMAT_CRBC = 8200 ,
  DW_CAMERA_RAW_FORMAT_CBRC = 8300 ,
  DW_CAMERA_RAW_FORMAT_RCCC = 9000 ,
  DW_CAMERA_RAW_FORMAT_CRCC = 9100 ,
  DW_CAMERA_RAW_FORMAT_CCRC = 9200 ,
  DW_CAMERA_RAW_FORMAT_CCCR = 9300 ,
  DW_CAMERA_RAW_FORMAT_CCCC = 10000 ,
  DW_CAMERA_RAW_FORMAT_TOF = 20000
}
 Raw encoding formats pixel-order. More...
 
enum  dwCameraSIPLNotificationData {
  DW_NOTIF_INFO_ICP_PROCESSING_DONE = 0 ,
  DW_NOTIF_INFO_ISP_PROCESSING_DONE = 1 ,
  DW_NOTIF_INFO_ACP_PROCESSING_DONE = 2 ,
  DW_NOTIF_INFO_CDI_PROCESSING_DONE = 3 ,
  DW_NOTIF_WARN_ICP_FRAME_DROP = 100 ,
  DW_NOTIF_WARN_ICP_FRAME_DISCONTINUITY = 101 ,
  DW_NOTIF_WARN_ICP_CAPTURE_TIMEOUT = 102 ,
  DW_NOTIF_ERROR_ICP_BAD_INPUT_STREAM = 200 ,
  DW_NOTIF_ERROR_ICP_CAPTURE_FAILURE = 201 ,
  DW_NOTIF_ERROR_ICP_EMB_DATA_PARSE_FAILURE = 202 ,
  DW_NOTIF_ERROR_ISP_PROCESSING_FAILURE = 203 ,
  DW_NOTIF_ERROR_ACP_PROCESSING_FAILURE = 204 ,
  DW_NOTIF_ERROR_CDI_SET_SENSOR_CTRL_FAILURE = 205 ,
  DW_NOTIF_ERROR_DESER_LINK_FAILURE = 206 ,
  DW_NOTIF_ERROR_DESERIALIZER_FAILURE = 207 ,
  DW_NOTIF_ERROR_SERIALIZER_FAILURE = 208 ,
  DW_NOTIF_ERROR_SENSOR_FAILURE = 209 ,
  DW_NOTIF_ERROR_INTERNAL_FAILURE = 300
}
 Enum of available SIPL event notification type (Copy from nvsipl::NvSIPLPipelineNotifier::NotificationType). More...
 
enum  dwCameraType {
  DW_CAMERA_GENERIC = 0 ,
  DW_CAMERA_GMSL_AR0231 = 3 ,
  DW_CAMERA_USB_GENERIC = 4 ,
  DW_CAMERA_GMSL_AR0144 = 5 ,
  DW_CAMERA_GMSL_AR0138 = 6 ,
  DW_CAMERA_GMSL_AR0220 = 7 ,
  DW_CAMERA_GMSL_AR0820 = 8 ,
  DW_CAMERA_GMSL_MN34906 = 9 ,
  DW_CAMERA_GMSL_OV2311 = 10 ,
  DW_CAMERA_GMSL_IMX390 = 11 ,
  DW_CAMERA_GMSL_CUSTOM = 99
}
 Enum of available camera sensors. More...
 
enum  dwSIPLCameraInterfaceProviderType {
  DW_SIPL_CAMERA_INTERFACE_PROVIDER_TYPE_DESERIALIZER ,
  DW_SIPL_CAMERA_INTERFACE_PROVIDER_TYPE_MODULE ,
  DW_SIPL_CAMERA_INTERFACE_PROVIDER_TYPE_COUNT
}
 Enum of available SIPL interface provider types. More...
 

Functions

DW_API_PUBLIC dwStatus dwSensorCamera_addPreFenceArray (NvSciSyncFence *syncFences, uint32_t count, dwCameraOutputType outputType, dwCameraFrameHandle_t const frameHandle)
 Set array of prefences and a type of dwCameraOutputType so that camera waits on those fences before the use of that output. More...
 
DW_API_PUBLIC dwStatus dwSensorCamera_appendAllocationAttributes (dwImageProperties *const imgProps, dwCameraOutputType const outputType, dwSensorHandle_t const sensor)
 Append the allocation attribute such that images allocated by the application and given to the camera via dwSensorCamera_setImagePool() can be imported into the underlying driver. More...
 
DW_API_PUBLIC dwStatus dwSensorCamera_disableLink (dwSensorHandle_t const sensor)
 Disable the camera link This method should only be called after dwSensor_start() and before dwSensor_stop(). More...
 
DW_API_PUBLIC dwStatus dwSensorCamera_enableLink (dwSensorHandle_t const sensor, bool const resetModule)
 Enable the camera link This method enables a given link and, if reset is asserted, reconfigures the camera module to restablish the link. More...
 
DW_API_PUBLIC dwStatus dwSensorCamera_fillSyncAttributes (NvSciSyncAttrList syncAttrList, dwCameraOutputType outputType, dwSensorHandle_t sensor)
 Fill the sync attributes for the camera pipeline to signal EOF fences. More...
 
DW_API_PUBLIC dwStatus dwSensorCamera_fillSyncAttributesNew (NvSciSyncAttrList syncAttrList, dwSyncType syncType, dwCameraOutputType outputType, dwSensorHandle_t sensor)
 Fill the sync attributes for the camera pipeline to signal EOF fences. More...
 
DW_API_PUBLIC dwStatus dwSensorCamera_getCUDAStream (cudaStream_t *const stream, dwSensorHandle_t const sensor)
 Gets the CUDA stream used. More...
 
DW_API_PUBLIC dwStatus dwSensorCamera_getEOFFence (NvSciSyncFence *syncFence, dwCameraOutputType outputType, dwCameraFrameHandle_t const frameHandle)
 Get EOF fence of the current camera frame according to the type of dwCameraOutputType. More...
 
DW_API_PUBLIC dwStatus dwSensorCamera_getImage (dwImageHandle_t *const image, dwCameraOutputType const type, dwCameraFrameHandle_t const frame)
 Gets the output image/s image in a format specified by the output type. More...
 
DW_API_PUBLIC dwStatus dwSensorCamera_getImageAsync (dwImageHandle_t *const image, dwCameraOutputType const type, dwCameraFrameHandle_t const frame)
 Gets the output image/s image in a format specified by the output type. More...
 
DW_API_PUBLIC dwStatus dwSensorCamera_getImageProperties (dwImageProperties *const imageProperties, dwCameraOutputType const outputType, dwSensorHandle_t const sensor)
 Gets information about the image properties for a given 'dwCameraImageOutputType'. More...
 
DW_API_PUBLIC dwStatus dwSensorCamera_getImageTimestamps (dwImageTimestamps *const imageTimestamps, dwCameraFrameHandle_t const frameHandle)
 Gets the timestamps of the current camera frame. More...
 
DW_API_PUBLIC dwStatus dwSensorCamera_getNumSupportedCaptureModes (uint32_t *const numModes, dwSensorHandle_t const sensor)
 Gets number of supported capture modes. More...
 
DW_API_PUBLIC dwStatus dwSensorCamera_getNvMediaIPPManager (NvMediaIPPManager **const manager, dwSensorHandle_t const sensor)
 Gets the NvMediaIPPManager used for GMSL camera IPP setup and event callback. More...
 
DW_API_PUBLIC dwStatus dwSensorCamera_getSensorProperties (dwCameraProperties *const properties, dwSensorHandle_t const sensor)
 Gets information about the camera sensor. More...
 
DW_API_PUBLIC dwStatus dwSensorCamera_getSIPLInterfaceProvider (void **const interfaceProvider, dwSensorHandle_t const sensor, dwSIPLCameraInterfaceProviderType const type)
 Gets SIPL Interface provider for a custom camera sensor. More...
 
DW_API_PUBLIC dwStatus dwSensorCamera_getSupportedCaptureMode (dwCameraProperties *const captureMode, uint32_t const modeIdx, dwSensorHandle_t const sensor)
 Gets capture modes by specified index. More...
 
DW_API_PUBLIC dwStatus dwSensorCamera_getTimestamp (dwTime_t *const timestamp, dwCameraFrameHandle_t const frameHandle)
 Gets the timestamp of the current camera frame. More...
 
DW_API_PUBLIC dwStatus dwSensorCamera_readEEPROM (uint32_t const paramId, void *const buffer, uint32_t const size, dwSensorHandle_t const sensor)
 Read data associated with a parameter stored on the EEPROM device and write to the provided buffer. More...
 
DW_API_PUBLIC dwStatus dwSensorCamera_readFrame (dwCameraFrameHandle_t *const frameHandle, dwTime_t const timeoutUs, dwSensorHandle_t const sensor)
 Reads a frame handle from the camera sensor. More...
 
DW_API_PUBLIC dwStatus dwSensorCamera_returnFrame (dwCameraFrameHandle_t *const frameHandle)
 Returns a frame to the camera after it has been consumed. More...
 
DW_API_PUBLIC dwStatus dwSensorCamera_setCUDAStream (cudaStream_t const stream, dwSensorHandle_t const sensor)
 Sets the CUDA stream used by getImageAsync during internal cuda related operations Cuda stream is a bunch of asynchronous Cuda operations executed on the device in the order that the host code calls. More...
 
DW_API_PUBLIC dwStatus dwSensorCamera_setEventCallback (dwCameraCallback blkCallback, dwCameraCallback lineCallback, dwSensorHandle_t sensor)
 Set the Camera Error Handling callbacks. More...
 
DW_API_PUBLIC dwStatus dwSensorCamera_setImageMetaDataStats (dwCameraIspStatsOverrideSetting const *overrideISPStats, dwSensorHandle_t sensor)
 Overrides ISP statistics (Histogram, Local Average Clip and bad pixel) settings. More...
 
DW_API_PUBLIC dwStatus dwSensorCamera_setImagePool (dwImagePool imagePool, dwSensorHandle_t const sensor)
 Sets a pool of image to be used as output by the camera layer. More...
 
DW_API_PUBLIC dwStatus dwSensorCamera_setSyncObject (NvSciSyncObj syncObj, dwCameraOutputType outputType, dwSensorHandle_t sensor)
 Set the sync obj to which the camera pipeline will signal EOF fences. More...
 
DW_API_PUBLIC dwStatus dwSensorCamera_setSyncObjectNew (NvSciSyncObj syncObj, dwSyncType syncType, dwCameraOutputType outputType, dwSensorHandle_t sensor)
 Set the sync obj to which the camera pipeline will signal EOF fences. More...
 

Data Structure Documentation

◆ dwCameraISPBadPixelStats

struct dwCameraISPBadPixelStats
Data Fields
bool enable Holds a Boolean to enable the bad pixel statistics block.
Note
Bad Pixel Correction must also be enabled to get bad pixel statistics.
dwRect rectangularMask Holds rectangular mask for excluding pixel outside a specified area.

Coordinates of the image's top left and bottom right points are (0, 0) and(width, height), respectively. Either set the rectangle's dimensions ( to 0 or set the rectangle to include the full image with no rectangular mask.

Supported values: Rectangle must be within the input image and must be a valid rectangle ((right > left) && (bottom > top)). The minimum supported rectangular mask size is 4x4. Constraints: All left, top, bottom, and right coordinates must be even.

◆ dwCameraISPEllipse

struct dwCameraISPEllipse
Data Fields
float32_t angle Holds angle of the ellipse horizontal.
dwVector2f center Holds center of the ellipse.
uint32_t horizontalAxis Holds horizontal axis of the ellipse.
uint32_t verticalAxis Holds vertical axis of the ellipse.

◆ dwCameraISPHistogramStatsOverride

struct dwCameraISPHistogramStatsOverride
Data Fields
bool disableLensShadingCorrection boolean flag to disable lens shading compensation for histogram statistics block
dwCameraISPEllipse ellipticalMask Holds an elliptical mask for excluding pixels outside a specified area.
bool ellipticalMaskEnable Holds a Boolean to enable an elliptical mask for excluding pixels outside a specified area.
bool enable Holds a Boolean to enable histogram statistics Control block.
uint8_t knees[8] Holds bin index specifying different zones in the histogram.

Each zone can have a different number of bins. Supported values: [1, 255]

float32_t offset Holds offset to be applied to input data prior to bin mapping.

Supported values: [-2.0, 2.0]

uint8_t ranges[8] Holds range of the pixel values to be considered for each zone.

The whole pixel range is divided into NVSIPL_ISP_HIST_KNEE_POINTS zones. Supported values: [0, 21]

dwRect rectangularMask Holds a rectangular mask for excluding pixels outside a specified area.

The coordinates of image top left and bottom right points are (0, 0) and (width, height), respectively. A rectangle ((right > left) && (bottom > top)), or must be ((0,0), (0,0)) to disable the rectangular mask.

The rectangle settings(x0, y0, x1, y1) must follow the constraints listed below:

  • (x0 >= 0) and (y0 >= 0)
  • x0 and x1 should be even
  • (x1 <= image width) and (y1 <= image height)
  • rectangle width(x1 - x0) >= 2 and height(y1 - y0) >= 2

◆ dwCameraISPLocalAvgClipStats

struct dwCameraISPLocalAvgClipStats
Data Fields
dwCameraISPEllipse ellipticalMask Holds an elliptical mask for excluding pixels outside specified area.

Coordinates of the image's top left and bottom right points are (0, 0) and (width, height), respectively.

Supported values for X coordinate of the center: [0, input width] Supported values for Y coordinate of the center: [0, input height] Supported values for horizontal axis: [16, 2 x input width] Supported values for vertical axis: [16, 2 x input height]

Note
Supported values for angle: [0.0, 360.0]
bool ellipticalMaskEnable[DW_ISP_MAX_COLOR_COMPONENT] Holds a Boolean to enable an elliptical mask for excluding pixels outside a specified area for each region of interest.
bool enable Holds a Boolean to enable the local average and clip statistics block.
float32_t max[DW_ISP_MAX_COLOR_COMPONENT] Holds maximum value of pixels in RGGB/RCCB/RCCC order.

Supported values: [0.0, 1.0], max >= min

float32_t min[DW_ISP_MAX_COLOR_COMPONENT] Holds minimum value of pixels in RGGB/RCCB/RCCC order.

Supported values: [0.0, 1.0]

bool roiEnable[DW_ISP_MAX_COLOR_COMPONENT] Holds a Boolean to enable an individual region of interest.
dwCameraISPStatisticsWindows windows[DW_ISP_MAX_COLOR_COMPONENT] Holds local average and clip windows for each region of interest.

Supported values for width of the window: [2, 256] and must be an even number Supported values for height of the window: [2, 256] Supported values for number of the windows horizontally: [1, 32] Supported values for number of the windows vertically: [1, 32] Supported values for horizontal interval between windows: [max(4, window width), image ROI width] and must be an even number Supported values for vertical interval between windows: [max(2, window height), image ROI height] Supported values for X coordinate of start offset: [0, image ROI width-3] and must be an even number Supported values for Y coordinate of start offset: [0, image ROI height-3] startOffset.x + horizontalInterval * (numWindowH - 1) + winWidth <= image ROI width startOffset.y + veritcallInterval * (numWindowV - 1) + winHeight <= image ROI height

◆ dwCameraISPStatisticsWindows

struct dwCameraISPStatisticsWindows
Data Fields
uint32_t height Holds height of the window in pixels.
uint32_t horizontalInterval Holds the distance between the left edge of one window and a horizontally adjacent window.
uint32_t numWindowsH Holds number of windows horizontally.
uint32_t numWindowsV Holds number of windows vertically.
dwVector2i startOffset Holds the position of the top left pixel in the top left window.
uint32_t verticalInterval Holds the distance between the top edge of one window and a vertically adjacent window.
uint32_t width Holds width of the window in pixels.

◆ dwCameraIspStatsOverrideSetting

struct dwCameraIspStatsOverrideSetting
Data Fields
dwCameraISPBadPixelStats bpStats Structure containing override settings for bad pixel statistics block.
bool enableBpStatsOverride boolean flag to enable bad pixel statistics settings override
bool enableHistStatsOverride[DW_CAMERA_NUM_ISP_UNITS] boolean flag to enable histogram statistics settings override
bool enableLacStatsOverride[DW_CAMERA_NUM_ISP_UNITS] boolean flag to enable local average clip statistics settings override
dwCameraISPHistogramStatsOverride histStats[DW_CAMERA_NUM_ISP_UNITS] Structure containing override settings for histogram statistics block.
dwCameraISPLocalAvgClipStats lacStats[DW_CAMERA_NUM_ISP_UNITS] Structure containing override settings for local average clip statistics block.

◆ dwCameraNotificationData

struct dwCameraNotificationData
Data Fields
dwCameraSIPLNotificationData eNotifyType Holds the notification event type.
uint64_t frameCaptureTSC Holds the TSC timestamp of the frame capture.
uint32_t gpioIdxs[DW_CAMERA_MAX_DEVICE_GPIOS] Holds the GPIO indices.
uint32_t numGpioIdxs Holds the number of GPIO indices in the array.
uint32_t uIndex Holds the ID of each camera sensor.
uint8_t uLinkMask Holds the device block link mask.

◆ dwCameraProperties

struct dwCameraProperties
Data Fields
dwCameraType cameraType

Type of the camera

dwCameraExposureControl exposure

Exposure control

dwCameraFOV fov

FOV of the lens

float32_t framerate

Framerate in Hz

uint32_t imageBitDepth

Bit depth of image

bool isSimulated

Camera is being simulated

int32_t outputTypes

Output types referring list of available 'dwCameraOutputType'

dwCameraRawFormat rawFormat

Raw bayer pattern

dwVector2ui resolution

Physical resolution of the camera sensor

uint32_t revision

Revision of the camera (0 if info is not available)

uint32_t siblings

Number of sibling frames

◆ dwCameraSIPLEErrorDetails

struct dwCameraSIPLEErrorDetails
Data Fields
uint8_t const * errorBuffer Pointer to buffer which is filled by driver with error information.

Note: DO NOT delete/free this pointer. This is managed by DW

size_t sizeWritten Holds size of error written to the buffer, filled by driver.

◆ dwCameraSIPLNotification

struct dwCameraSIPLNotification
Data Fields
dwCameraNotificationData data NotificationData from SIPL, pipeline & device block event.
dwCameraSIPLEErrorDetails deserializerErrorInfo Error info for deserializer, valid only for device block event.
bool isRemoteError Set to true if remote (serializer) error detected, valid only for device block event.
uint8_t linkErrorMask Store link mask for link error state, valid only for device block event (1 in index position indicates error, all 0 means no link error detected).
uint32_t numCameraModules Number of the camera modules, valid only for device block event.
dwCameraSIPLEErrorDetails sensorErrorInfoList[DW_CAMERA_MAX_CAMERAMODULES_PER_BLOCK] Error info for sensor, valid only for device block event.
dwCameraSIPLEErrorDetails serializerErrorInfoList[DW_CAMERA_MAX_CAMERAMODULES_PER_BLOCK] Error info for serializer, valid only for device block event.

Macro Definition Documentation

◆ DW_CAMERA_ERROR_ID_MAX

#define DW_CAMERA_ERROR_ID_MAX   DW_NOTIF_ERROR_INTERNAL_FAILURE

maximal error id reported by the camera module via module health service

Definition at line 280 of file Camera.h.

◆ DW_CAMERA_MAX_CAMERAMODULES_PER_BLOCK

#define DW_CAMERA_MAX_CAMERAMODULES_PER_BLOCK   4U

Indicates the maximum number of camera modules per device block.

Definition at line 313 of file Camera.h.

◆ DW_CAMERA_MAX_DEVICE_GPIOS

#define DW_CAMERA_MAX_DEVICE_GPIOS   8U

Indicates the maximum number of gpio indices.

Definition at line 283 of file Camera.h.

◆ DW_CAMERA_NUM_ISP_UNITS

#define DW_CAMERA_NUM_ISP_UNITS   2U

Number of available ISP Units.

Definition at line 70 of file Camera.h.

Typedef Documentation

◆ dwCameraCallback

typedef void(* dwCameraCallback) (dwCameraSIPLNotification *notification, dwSensorHandle_t sensor)

Function type of the camera error event handling.

Definition at line 338 of file Camera.h.

◆ dwCameraFrameHandle_t

typedef struct dwCameraFrame* dwCameraFrameHandle_t

Handle to captured frame.

Definition at line 73 of file Camera.h.

◆ NvMediaIPPManager

typedef void NvMediaIPPManager

Definition at line 63 of file Camera.h.

Enumeration Type Documentation

◆ dwCameraExposureControl

Enum of exposure control types.

Enumerator
DW_CAMERA_EXPOSURE_NONE 

No exposure control.

DW_CAMERA_EXPOSURE_UNKNOWN 

Unknown exposure control.

DW_CAMERA_EXPOSURE_AE 

Default exposure control.

DW_CAMERA_EXPOSURE_BAE 

Exposure control with bracketed auto exposure.

DW_CAMERA_EXPOSURE_CUSTOM 

Exposure control using user's custom callback.

Definition at line 159 of file Camera.h.

◆ dwCameraFOV

Enum of available FOV in degrees for camera lenses.

Enumerator
DW_CAMERA_FOV_UNKNOWN 

FOV for camera lenses is not supported.

DW_CAMERA_FOV_30 

FOV for camera lenses is 30 degrees.

DW_CAMERA_FOV_48 

FOV for camera lenses is 48 degrees.

DW_CAMERA_FOV_50 

FOV for camera lenses is 50 degrees.

DW_CAMERA_FOV_55 

FOV for camera lenses is 55 degrees.

DW_CAMERA_FOV_60 

FOV for camera lenses is 60 degrees.

DW_CAMERA_FOV_65 

FOV for camera lenses is 65 degrees.

DW_CAMERA_FOV_90 

FOV for camera lenses is 90 degrees.

DW_CAMERA_FOV_100 

FOV for camera lenses is 100 degrees.

DW_CAMERA_FOV_110 

FOV for camera lenses is 110 degrees.

DW_CAMERA_FOV_120 

FOV for camera lenses is 120 degrees.

DW_CAMERA_FOV_185 

FOV for camera lenses is 185 degrees.

Definition at line 173 of file Camera.h.

◆ dwCameraISPType

ISP types supported by the camera.

Enumerator
DW_CAMERA_ISP0 

Supports YUV420 planar or RGB planar.

DW_CAMERA_ISP1 

Similar to ISP0.

DW_CAMERA_ISP2 

Supports RGB FP16.

DW_CAMERA_MAX_ISP_COUNT 
DW_CAMERA_ISP_UNKNOWN 

Definition at line 211 of file Camera.h.

◆ dwCameraOutputType

Output types supported by the camera.

DW_CAMERA_OUTPUT_NATIVE_* types return the image directly from the layer underneath as it is represented in system memory, while for non native output types images are converted and streamed through ad hoc streamers.

Enumerator
DW_CAMERA_OUTPUT_NATIVE_PROCESSED 

processed images (usually be YUV420 planar or RGB planar)

DW_CAMERA_OUTPUT_NATIVE_RAW 

raw image

DW_CAMERA_OUTPUT_CUDA_RGBA_UINT8 

for processed images
RGBA image supported in all processed use cases

DW_CAMERA_OUTPUT_CUDA_YUV420_UINT8_PLANAR 

simple yuv420 output, supported in most use cases (see doc)

DW_CAMERA_OUTPUT_CUDA_RAW_UINT16 

for raw images

DW_CAMERA_OUTPUT_CUDA_YUV420_UINT16_SEMIPLANAR 

other YUV processed outputs (see devguide)

DW_CAMERA_OUTPUT_CUDA_YUV444_UINT8_PLANAR 

other YUV processed outputs (see devguide)

DW_CAMERA_OUTPUT_CUDA_YUV444_UINT16_PLANAR 

other YUV processed outputs (see devguide)

DW_CAMERA_OUTPUT_CUDA_YUV420_UINT8_SEMIPLANAR 

simple yuv420 semiplanar output, supported in most use cases (see doc)

DW_CAMERA_OUTPUT_NATIVE_PROCESSED1 

processed images from ISP1 output (usually be YUV420 planar or RGB planar)

DW_CAMERA_OUTPUT_NATIVE_PROCESSED2 

processed images from ISP2 output (RGB-FP16)

Definition at line 78 of file Camera.h.

◆ dwCameraRawFormat

Raw encoding formats pixel-order.

Enumerator
DW_CAMERA_RAW_FORMAT_UNKNOWN 

Format unsopported.

DW_CAMERA_RAW_FORMAT_RGGB 

Format:RGGB.

DW_CAMERA_RAW_FORMAT_BGGR 

Format:BGGR.

DW_CAMERA_RAW_FORMAT_GRBG 

Format:GRBG.

DW_CAMERA_RAW_FORMAT_GBRG 

Format:GBRG.

DW_CAMERA_RAW_FORMAT_RCCB 

Format:RCCB.

DW_CAMERA_RAW_FORMAT_BCCR 

Format:BCCR.

DW_CAMERA_RAW_FORMAT_CRBC 

Format:CRBC.

DW_CAMERA_RAW_FORMAT_CBRC 

Format:CBRC.

DW_CAMERA_RAW_FORMAT_RCCC 

Format:RCCC.

DW_CAMERA_RAW_FORMAT_CRCC 

Format:CRCC.

DW_CAMERA_RAW_FORMAT_CCRC 

Format:CCRC.

DW_CAMERA_RAW_FORMAT_CCCR 

Format:CCCR.

DW_CAMERA_RAW_FORMAT_CCCC 

Format:CCCC.

DW_CAMERA_RAW_FORMAT_TOF 

Format:TOF.

Definition at line 105 of file Camera.h.

◆ dwCameraSIPLNotificationData

Enum of available SIPL event notification type (Copy from nvsipl::NvSIPLPipelineNotifier::NotificationType).

Enumerator
DW_NOTIF_INFO_ICP_PROCESSING_DONE 

Pipeline event, indicates ICP processing is finished.

DW_NOTIF_INFO_ISP_PROCESSING_DONE 

Pipeline event, indicates ISP processing is finished.

DW_NOTIF_INFO_ACP_PROCESSING_DONE 

Pipeline event, indicates auto control processing is finished.

DW_NOTIF_INFO_CDI_PROCESSING_DONE 

Pipeline event, indicates CDI processing is finished.

DW_NOTIF_WARN_ICP_FRAME_DROP 

Pipeline event, indicates pipeline was forced to drop a frame due to a slow consumer or system issues.

DW_NOTIF_WARN_ICP_FRAME_DISCONTINUITY 

Pipeline event, indicates a discontinuity was detected in parsed embedded data frame sequence number.

DW_NOTIF_WARN_ICP_CAPTURE_TIMEOUT 

Pipeline event, indicates occurrence of timeout while capturing.

DW_NOTIF_ERROR_ICP_BAD_INPUT_STREAM 

Pipeline event, indicates ICP bad input stream.

DW_NOTIF_ERROR_ICP_CAPTURE_FAILURE 

Pipeline event, indicates ICP capture failure.

DW_NOTIF_ERROR_ICP_EMB_DATA_PARSE_FAILURE 

Pipeline event, indicates embedded data parsing failure.

DW_NOTIF_ERROR_ISP_PROCESSING_FAILURE 

Pipeline event, indicates ISP processing failure.

DW_NOTIF_ERROR_ACP_PROCESSING_FAILURE 

Pipeline event, indicates auto control processing failure.

DW_NOTIF_ERROR_CDI_SET_SENSOR_CTRL_FAILURE 

Pipeline event, indicates CDI set sensor control failure.

DW_NOTIF_ERROR_DESER_LINK_FAILURE 

Device block event, indicates a deserializer link error. Deprecated in the future.

DW_NOTIF_ERROR_DESERIALIZER_FAILURE 

Device block event, indicates a deserializer failure.

DW_NOTIF_ERROR_SERIALIZER_FAILURE 

Device block event, indicates a serializer failure.

DW_NOTIF_ERROR_SENSOR_FAILURE 

Device block event, indicates a sensor failure.

DW_NOTIF_ERROR_INTERNAL_FAILURE 

Pipeline and device block event, indicates an unexpected internal failure.

Definition at line 240 of file Camera.h.

◆ dwCameraType

Enum of available camera sensors.

Enumerator
DW_CAMERA_GENERIC 

Generic video source, e.g. video file with raw or processed data

DW_CAMERA_GMSL_AR0231 

GMSL AR0231 camera (rev-7)

DW_CAMERA_USB_GENERIC 

Generic USB camera

DW_CAMERA_GMSL_AR0144 

GMSL AR0144 camera

DW_CAMERA_GMSL_AR0138 

GMSL AR0138 camera

DW_CAMERA_GMSL_AR0220 

GMSL AR0220 camera

DW_CAMERA_GMSL_AR0820 

GMSL AR0820 camera

DW_CAMERA_GMSL_MN34906 

GMSL MN34906 camera

DW_CAMERA_GMSL_OV2311 

GMSL OV2311 camera

DW_CAMERA_GMSL_IMX390 

GMSL IMX390 camera

DW_CAMERA_GMSL_CUSTOM 

GMSL custom camera defined using NvSIPL

Definition at line 144 of file Camera.h.

◆ dwSIPLCameraInterfaceProviderType

Enum of available SIPL interface provider types.

Enumerator
DW_SIPL_CAMERA_INTERFACE_PROVIDER_TYPE_DESERIALIZER 

Provider type: Deserializer.

DW_SIPL_CAMERA_INTERFACE_PROVIDER_TYPE_MODULE 

Provider type: Module.

DW_SIPL_CAMERA_INTERFACE_PROVIDER_TYPE_COUNT 

Provider type: Count.

Definition at line 201 of file Camera.h.

Function Documentation

◆ dwSensorCamera_addPreFenceArray()

DW_API_PUBLIC dwStatus dwSensorCamera_addPreFenceArray ( NvSciSyncFence *  syncFences,
uint32_t  count,
dwCameraOutputType  outputType,
dwCameraFrameHandle_t const  frameHandle 
)

Set array of prefences and a type of dwCameraOutputType so that camera waits on those fences before the use of that output.

Parameters
[in]syncFencesArray of prefences
[in]countPrefence count
[in]outputTypeThe output type
[in]frameHandleHandle to the camera frame

◆ dwSensorCamera_appendAllocationAttributes()

DW_API_PUBLIC dwStatus dwSensorCamera_appendAllocationAttributes ( dwImageProperties *const  imgProps,
dwCameraOutputType const  outputType,
dwSensorHandle_t const  sensor 
)

Append the allocation attribute such that images allocated by the application and given to the camera via dwSensorCamera_setImagePool() can be imported into the underlying driver.

This API is used to append the underlying driver's allocation attributes to the image properties.

Parameters
[in,out]imgPropsImage properties
[in]outputTypeOuptut type of the camera.
[in]sensorSensor handle of the camera sensor previously created with dwSAL_createSensor().
Note
The given imgProps should be compatible with that returned by dwSensorCamra_getImageProperties API.
The imgProps are read and used to generate the allocation attributes needed by the driver. The allocation attributes are stored back into imgProps.meta.allocAttrs. Applications do not need to free or alter the imgProps.meta.allocAttrs in any way. The imgProps.meta.allocAttrs are only used by DriveWorks as needed when the given imgProps are used to allocate dwImages. If the application alters the imgProps after calling this API, the imgProps.meta.allocAttrs may no longer be applicable to the imgProps and calls related to allocating images will fail.
if imgProps.meta.allocAttrs does not have allocated Memory, this would be allocated by DW and will be owned by DW context until context is destroyed and should be used wisely as it the space is limited.
Must be called after dwSAL_start().
Returns
DW_NVMEDIA_ERROR - if underlying camera driver had an NvMedia error.
DW_INVALID_HANDLE - if given handle is not valid.
DW_NOT_IMPLEMENTED - if the method for this image type is not implemented by given camera.
DW_SUCCESS - if call is successful.

◆ dwSensorCamera_disableLink()

DW_API_PUBLIC dwStatus dwSensorCamera_disableLink ( dwSensorHandle_t const  sensor)

Disable the camera link This method should only be called after dwSensor_start() and before dwSensor_stop().

Parameters
[in]sensorA handle to the camera GMSL
Returns
DW_NOT_SUPPORTED If current SDK/PDK version is not supported DW_INTERNAL_ERROR If the disableLink failed DW_SUCCESS if call is successful.

◆ dwSensorCamera_enableLink()

DW_API_PUBLIC dwStatus dwSensorCamera_enableLink ( dwSensorHandle_t const  sensor,
bool const  resetModule 
)

Enable the camera link This method enables a given link and, if reset is asserted, reconfigures the camera module to restablish the link.

This method should only be called after dwSensor_start() and before dwSensor_stop(). Please note, it is not necessary to call dwSensorCamera_enableLink() after dwSensor_start(). This API is used to enable the link again after the link has been disabled by dwSensorCamera_disableLink(). It is called if the error occurs on initializing.

Parameters
[in]sensorA handle to the camera GMSL
[in]resetModuleIf true, reconfigure the camera module before enabling the link.
Returns
DW_NOT_SUPPORTED If current SDK/PDK version is not supported DW_INTERNAL_ERROR If the enableLink failed DW_SUCCESS if call is successful.

◆ dwSensorCamera_fillSyncAttributes()

DW_API_PUBLIC dwStatus dwSensorCamera_fillSyncAttributes ( NvSciSyncAttrList  syncAttrList,
dwCameraOutputType  outputType,
dwSensorHandle_t  sensor 
)

Fill the sync attributes for the camera pipeline to signal EOF fences.

Note that multiple calls on the same syncAttrList will append the same attributes.

Parameters
[out]syncAttrListThe sync attributes list to be filled
[in]outputTypeThe output type
[in]sensorThe sensor handle

◆ dwSensorCamera_fillSyncAttributesNew()

DW_API_PUBLIC dwStatus dwSensorCamera_fillSyncAttributesNew ( NvSciSyncAttrList  syncAttrList,
dwSyncType  syncType,
dwCameraOutputType  outputType,
dwSensorHandle_t  sensor 
)

Fill the sync attributes for the camera pipeline to signal EOF fences.

Note that multiple calls on the same syncAttrList will append the same attributes.

Parameters
[out]syncAttrListThe sync attributes list to be filled
[in]syncTypeThe sync type
[in]outputTypeThe output type
[in]sensorThe sensor handle

◆ dwSensorCamera_getCUDAStream()

DW_API_PUBLIC dwStatus dwSensorCamera_getCUDAStream ( cudaStream_t *const  stream,
dwSensorHandle_t const  sensor 
)

Gets the CUDA stream used.

Parameters
[out]streamReturns the CUDA stream in sensor.
[in]sensorA pointer to the camera handle that is updated.
Returns
DW_INVALID_ARGUMENT: if the sensor handle or cudaStream is null
DW_INVALID_HANDLE: if the sensor handle is not a camera
DW_SUCCESS: if call is successful.

◆ dwSensorCamera_getEOFFence()

DW_API_PUBLIC dwStatus dwSensorCamera_getEOFFence ( NvSciSyncFence *  syncFence,
dwCameraOutputType  outputType,
dwCameraFrameHandle_t const  frameHandle 
)

Get EOF fence of the current camera frame according to the type of dwCameraOutputType.

Parameters
[out]syncFenceThe sync fence of the frame
[in]outputTypeThe output type
[in]frameHandleHandle to the camera frame

◆ dwSensorCamera_getImage()

DW_API_PUBLIC dwStatus dwSensorCamera_getImage ( dwImageHandle_t *const  image,
dwCameraOutputType const  type,
dwCameraFrameHandle_t const  frame 
)

Gets the output image/s image in a format specified by the output type.

Depending on the type requested, conversion and streaming handled by the camera implicitly might be required. The call is blocking NOTE: the underlying resources are still in the frame handle and the image returned is intended not to be modified. For this reason, any modifications to this 'dwImageHandle_t' or 'dwImageCPU', 'dwImageCUDA', 'dwImageGL' or 'dwImageNvMedia' returned by 'dwImage_getCPU' ('dwImage_getCUDA', 'dwImage_getGL' and 'dwImage_getNvMedia') will result in undefined behavior.

Parameters
[out]imageHandle to the image received by the camera
[in]typeOuptut type of the image. This is represented by a limited useful number of options which can be chosen at runtime
[in]frameCamera frame handle of the captured frame
Returns
DW_CUDA_ERROR - if the underlying camera driver had a CUDA error.
In such case it is not possible to recover a DW_CAMERA_OUTOUT_CUDA_X output, however it is
possible to successfully request a DW_CAMERA_NATIVE_X output and work with it
DW_NVMEDIA_ERROR - if underlying camera driver had an NvMedia error.
DW_INVALID_HANDLE - if given camera frame handle is not valid.
DW_INVALID_ARGUMENT - if given image handle is null.
DW_NOT_IMPLEMENTED - if the method for this image type is not implemented by given camera.
DW_SUCCESS - if call is successful.

◆ dwSensorCamera_getImageAsync()

DW_API_PUBLIC dwStatus dwSensorCamera_getImageAsync ( dwImageHandle_t *const  image,
dwCameraOutputType const  type,
dwCameraFrameHandle_t const  frame 
)

Gets the output image/s image in a format specified by the output type.

Depending on the type requested, conversion and streaming handled by the camera implicitly might be required, which happens on the cudaStream specified at 'dwSensorCamera_setCUDAStream()' NOTE: the underlying resources are still in the frame handle and the image returned is intended not to be modified. For this reason, any modifications to this 'dwImageHandle_t' or 'dwImageCPU', 'dwImageCUDA', 'dwImageGL' or 'dwImageNvMedia' returned by 'dwImage_getCPU' ('dwImage_getCUDA', 'dwImage_getGL' and 'dwImage_getNvMedia') will result in undefined behavior.

Parameters
[out]imageHandle to the image received by the camera
[in]typeOuptut type of the image. This is represented by a limited useful number of options which can be chosen at runtime
[in]frameCamera frame handle of the captured frame
Returns
DW_CUDA_ERROR - if the underlying camera driver had a CUDA error.
In such case it is not possible to recover a DW_CAMERA_OUTOUT_CUDA_X output, however it is
possible to successfully request a DW_CAMERA_NATIVE_X output and work with it
DW_NVMEDIA_ERROR - if underlying camera driver had an NvMedia error.
DW_INVALID_HANDLE - if given handle is not valid.
DW_NOT_IMPLEMENTED - if the method for this image type is not implemented by given camera.
DW_SUCCESS - if call is successful.

◆ dwSensorCamera_getImageProperties()

DW_API_PUBLIC dwStatus dwSensorCamera_getImageProperties ( dwImageProperties *const  imageProperties,
dwCameraOutputType const  outputType,
dwSensorHandle_t const  sensor 
)

Gets information about the image properties for a given 'dwCameraImageOutputType'.

Parameters
[out]imagePropertiesA pointer to image properties of the frames captured by the camera.
[in]outputTypeFormat of the output image to get the properties of
[in]sensorSensor handle of the camera sensor previously created with dwSAL_createSensor().
Note
The dimensions of the returned properties corresponds to the dimension of the image returned through 'dwSensorCamera_getImage*' methods
Returns
DW_INVALID_ARGUMENT: if the sensor handle is null
DW_INVALID_HANDLE: if the sensor handle is not a camera
DW_NOT_AVAILABLE: when the setup of the sensor is incompatible with the output type requested
DW_SUCCESS: if call is successful.

◆ dwSensorCamera_getImageTimestamps()

DW_API_PUBLIC dwStatus dwSensorCamera_getImageTimestamps ( dwImageTimestamps *const  imageTimestamps,
dwCameraFrameHandle_t const  frameHandle 
)

Gets the timestamps of the current camera frame.

Parameters
[out]imageTimestampsThe timestamps of the current camera frame.
[in]frameHandleHandle to a captured frame.
Returns
DW_INVALID_HANDLE - if given handle is not valid.
DW_INVALID_ARGUMENT - if given imageTimestamps point is null DW_INVALID_ARGUMENT - if given frameHandle is null DW_SUCCESS

◆ dwSensorCamera_getNumSupportedCaptureModes()

DW_API_PUBLIC dwStatus dwSensorCamera_getNumSupportedCaptureModes ( uint32_t *const  numModes,
dwSensorHandle_t const  sensor 
)

Gets number of supported capture modes.

Parameters
[out]numModesA pointer to the number of available capture modes.
[in]sensorSensor handle of the camera sensor previously created with dwSAL_createSensor().
Returns
DW_INVALID_ARGUMENT: if the sensor handle is null
DW_INVALID_HANDLE: if the sensor handle is not a camera
DW_SUCCESS: if call is successful.

◆ dwSensorCamera_getNvMediaIPPManager()

DW_API_PUBLIC dwStatus dwSensorCamera_getNvMediaIPPManager ( NvMediaIPPManager **const  manager,
dwSensorHandle_t const  sensor 
)

Gets the NvMediaIPPManager used for GMSL camera IPP setup and event callback.

Parameters
[out]managerA pointer to the NvMediaIPPManager instance created by the sensor.
[in]sensorSensor handle of the camera sensor previously created with dwSAL_createSensor().
Returns
DW_NOT_AVAILABLE if NvMedia is not available.
DW_INVALID_ARGUMENT if given sensor handle or output pointer are NULL
DW_SUCCESS - if call is successful.
Note
The ownership of the NvMedia IPP manager remains with the sensor.

◆ dwSensorCamera_getSensorProperties()

DW_API_PUBLIC dwStatus dwSensorCamera_getSensorProperties ( dwCameraProperties *const  properties,
dwSensorHandle_t const  sensor 
)

Gets information about the camera sensor.

Parameters
[out]propertiesA pointer to the properties of the camera.
[in]sensorSensor handle of the camera sensor previously created with dwSAL_createSensor().
Returns
DW_INVALID_ARGUMENT: if the sensor handle is null
DW_INVALID_HANDLE: if the sensor handle is not a camera
DW_SUCCESS - if call is successful.

◆ dwSensorCamera_getSIPLInterfaceProvider()

DW_API_PUBLIC dwStatus dwSensorCamera_getSIPLInterfaceProvider ( void **const  interfaceProvider,
dwSensorHandle_t const  sensor,
dwSIPLCameraInterfaceProviderType const  type 
)

Gets SIPL Interface provider for a custom camera sensor.

Parameters
[out]interfaceProvidernvsipl::IInterfaceProvider*& for given sensor
[in]sensorHandle to sensor
[in]typetype of interface provider
Returns
DW_INVALID_HANDLE - if given handle is not valid.
DW_NOT_SUPPORTED - if the APIis not supported on platform DW_SUCCESS - if call is successful.

◆ dwSensorCamera_getSupportedCaptureMode()

DW_API_PUBLIC dwStatus dwSensorCamera_getSupportedCaptureMode ( dwCameraProperties *const  captureMode,
uint32_t const  modeIdx,
dwSensorHandle_t const  sensor 
)

Gets capture modes by specified index.

Parameters
[out]captureModeA pointer to available capture mode.
[in]modeIdxIndex of a mode to retrieve.
[in]sensorSensor handle of the camera sensor previously created with dwSAL_createSensor().
Returns
DW_INVALID_ARGUMENT: if the sensor handle is null
DW_INVALID_HANDLE: if the sensor handle is not a camera
DW_SUCCESS: if call is successful.

◆ dwSensorCamera_getTimestamp()

DW_API_PUBLIC dwStatus dwSensorCamera_getTimestamp ( dwTime_t *const  timestamp,
dwCameraFrameHandle_t const  frameHandle 
)

Gets the timestamp of the current camera frame.

Parameters
[out]timestampThe timestamp of the current camera frame.
[in]frameHandleHandle to a captured frame.
Returns
DW_INVALID_HANDLE - if given handle is not valid.
DW_SUCCESS - if call is successful.

◆ dwSensorCamera_readEEPROM()

DW_API_PUBLIC dwStatus dwSensorCamera_readEEPROM ( uint32_t const  paramId,
void *const  buffer,
uint32_t const  size,
dwSensorHandle_t const  sensor 
)

Read data associated with a parameter stored on the EEPROM device and write to the provided buffer.

If the parameter is not present, does not contain valid data, or is corrupted, then this API call will fail, and no data will be written to the provided buffer. Currently doesn't support virtual sensors.

Note: This reads from the copy of the EEPROM data in local memory, so this can be done, even if the ISC device is in a state where it cannot be read from.

Parameters
[in]paramIdThe ID of the parameter to be read
[out]bufferA pointer to the buffer that the data is to be read to. It must be at least 'size' bytes long.
[in]sizeThe number of bytes that are to be read from the parameter. This must be greater than zero and less than or equal to the maximum size of the parameter.
[in]sensorA handle to the camera GMSL
Returns
DW_SUCCESS if call is successful,
DW_NVMEDIA_ERROR If the read is unsuccessful due to nvmedia,
DW_NOT_SUPPORTED for unsupported platforms,
DW_INVALID_HANDLE if the given sensor handle is invalid,i.e null or of wrong type

◆ dwSensorCamera_readFrame()

DW_API_PUBLIC dwStatus dwSensorCamera_readFrame ( dwCameraFrameHandle_t *const  frameHandle,
dwTime_t const  timeoutUs,
dwSensorHandle_t const  sensor 
)

Reads a frame handle from the camera sensor.

The reading is a blocking call. It will block the thread within a timeout[us] With the frame handle, the associated data can be queried from the sensor. Available data is configured during sensor creation.

Parameters
[out]frameHandleA pointer to a handle to a frame read from the camera. With the handle, different data can be queried. The frame handle must be returned to be put back into the internal pool.
[in]timeoutUsTimeout in microseconds to wait for a new frame. Special values: DW_TIMEOUT_INFINITE - to wait infinitly. Zero - means polling of internal queue.
[in]sensorSensor handle of the camera previously created with 'dwSAL_createSensor()'.
Returns
DW_CUDA_ERROR - if the underlying camera driver had a CUDA error.
DW_NVMEDIA_ERROR - if underlying camera driver had an NvMedia error.
DW_INVALID_HANDLE - if given sensor handle is not valid.
DW_INVALID_ARGUMENT - if given frame pointer is NULL
DW_NOT_IMPLEMENTED - if the method for this image type is not implemented by given camera.
DW_TIME_OUT - if no frame could be acquired within given time interval.
This is a recoverable error if the following behavior is observed: the expected rate
at which frames are returned is a single frame every 1/fps seconds, therefore a timeout
should be set such as to cover one frame instance. Frames in a live camera are not returned
consistently therefore a time delta duration is to be expected close to the rate (ie +-10%).
If the total timeouts that have been accummulated after all retries amount to 3 frames interval
the camera is to be considered unresponsive.
DW_NOT_AVAILABLE - if sensor has not been started or data is not available in polling mode.
DW_NOT_READY - if sensor is stopped or not started or has started but hasn't begun acquiring frames after the specified timeout. If the sensor is in a stopped or not started state, the sensor should be started with dwSensor_start. After that The status will be returned until the first frame acquired. If this doesn't happen within 2 seconds, the sensor is to be considered unresponsive.
DW_SAL_SENSOR_ERROR - if there was an i/o error.
DW_END_OF_STREAM - if end of stream reached.
DW_BUFFER_FULL - if there are no more available frames to be read. To recover, return frames to free buffer space
DW_SUCCESS -if call is successful.

◆ dwSensorCamera_returnFrame()

DW_API_PUBLIC dwStatus dwSensorCamera_returnFrame ( dwCameraFrameHandle_t *const  frameHandle)

Returns a frame to the camera after it has been consumed.

All data associated with this handle is invalid after the handle has been returned.

Parameters
[in]frameHandleHandle previously read from the camera to be returned to the pool.
Returns
DW_CUDA_ERROR - if the underlying camera driver had a CUDA error.
DW_NVMEDIA_ERROR - if underlying camera driver had NvMedia error.
DW_INVALID_ARGUMENT - if given handle is NULL
DW_INVALID_HANDLE - if given handle is not valid.
DW_CALL_NOT_ALLOWED - if the sensor this frame camera from has already been released.
DW_SUCCESS - if call is successful.

◆ dwSensorCamera_setCUDAStream()

DW_API_PUBLIC dwStatus dwSensorCamera_setCUDAStream ( cudaStream_t const  stream,
dwSensorHandle_t const  sensor 
)

Sets the CUDA stream used by getImageAsync during internal cuda related operations Cuda stream is a bunch of asynchronous Cuda operations executed on the device in the order that the host code calls.

Parameters
[in]streamThe CUDA stream to use.
[in]sensorA pointer to the camera handle that is updated.
Returns
DW_INVALID_ARGUMENT: if the sensor handle is null
DW_INVALID_HANDLE: if the sensor handle is not a camera
DW_CUDA_ERROR: when the cudaStream cannot be set
DW_SUCCESS: if call is successful.

◆ dwSensorCamera_setEventCallback()

DW_API_PUBLIC dwStatus dwSensorCamera_setEventCallback ( dwCameraCallback  blkCallback,
dwCameraCallback  lineCallback,
dwSensorHandle_t  sensor 
)

Set the Camera Error Handling callbacks.

If receiving the device block error event, the blkCallback will be invoked. If receiving the pipeline error event, the lineCallback will be invoked.

Note
  1. At least one of the blkCallback and lineCallback should not be "nullptr"
  2. The callback functions need to return in a very short time and they shouldn't block the caller thread
Parameters
[in]blkCallbackdevice block error handling function. Set to nullptr if not used
[in]lineCallbackpipeline error handling function. Set to nullptr if not used
[in]sensorA handle to the camera GMSL
Returns
DW_NOT_SUPPORTED If current SDK/PDK version is not supported DW_SUCCESS if call is successful.

◆ dwSensorCamera_setImageMetaDataStats()

DW_API_PUBLIC dwStatus dwSensorCamera_setImageMetaDataStats ( dwCameraIspStatsOverrideSetting const *  overrideISPStats,
dwSensorHandle_t  sensor 
)

Overrides ISP statistics (Histogram, Local Average Clip and bad pixel) settings.

Note
The ISP Statistics updates the platform configuration for entire image Stream.
Must be called before dwSAL_start().
Returns
DW_NVMEDIA_ERROR - if underlying camera driver had an NvMedia error.
DW_INVALID_HANDLE - if given handle is not valid.
DW_NOT_IMPLEMENTED - if the method for this image type is not implemented by given camera.
DW_CALL_NOT_ALLOWED - if the method is called before dwAL_start.
DW_SUCCESS - if call is successful.
Parameters
[out]overrideISPStatsA pointer to override ISP statistics settings
[in]sensorThe sensor handle.

◆ dwSensorCamera_setImagePool()

DW_API_PUBLIC dwStatus dwSensorCamera_setImagePool ( dwImagePool  imagePool,
dwSensorHandle_t const  sensor 
)

Sets a pool of image to be used as output by the camera layer.

If this is called, the default pool is not allocated. The pool's type (raw/isp0/isp1/isp2) is deduced automatically by the format of the image. All images in the pool must match in properties If the size of the pool mismatches fifo-size, the fifo-size will be overridden.

Parameters
[in]imagePoolHandle to the dwImagePool, ownership remains of the creator of the pool, the camera will be using the images as outputs during capture and processing
[in]sensorCamera sensor handle
Returns
DW_NVMEDIA_ERROR - if underlying camera driver had an NvMedia error.
DW_INVALID_HANDLE - if given handle is not valid.
DW_NOT_IMPLEMENTED - if the method for this image type is not implemented by given camera.
DW_SUCCESS - if call is successful.

◆ dwSensorCamera_setSyncObject()

DW_API_PUBLIC dwStatus dwSensorCamera_setSyncObject ( NvSciSyncObj  syncObj,
dwCameraOutputType  outputType,
dwSensorHandle_t  sensor 
)

Set the sync obj to which the camera pipeline will signal EOF fences.

The sync object is not reference counted

Parameters
[in]syncObjThe sync object
[in]outputTypeThe output type
[in]sensorThe sensor handle

◆ dwSensorCamera_setSyncObjectNew()

DW_API_PUBLIC dwStatus dwSensorCamera_setSyncObjectNew ( NvSciSyncObj  syncObj,
dwSyncType  syncType,
dwCameraOutputType  outputType,
dwSensorHandle_t  sensor 
)

Set the sync obj to which the camera pipeline will signal EOF fences.

The sync object is not reference counted

Parameters
[in]syncObjThe sync object
[in]syncTypeThe sync type
[in]outputTypeThe output type
[in]sensorThe sensor handle