51#ifndef DW_SENSORS_CAMERA_CAMERA_H_
52#define DW_SENSORS_CAMERA_CAMERA_H_
70#define DW_CAMERA_NUM_ISP_UNITS 2U
174typedef enum dwCameraSIPLInterfaceProviderType {
237#define DW_CAMERA_ERROR_ID_MAX DW_NOTIF_ERROR_INTERNAL_FAILURE
240#define DW_CAMERA_MAX_DEVICE_GPIOS 8U
270#define DW_CAMERA_MAX_CAMERAMODULES_PER_BLOCK 4U
689 uint32_t
const modeIdx,
NVIDIA DriveWorks API: Sensors
NVIDIA DriveWorks API: Core Types
uint8_t uLinkMask
Holds the device block link mask.
dwCameraSIPLEErrorDetails serializerErrorInfoList[DW_CAMERA_MAX_CAMERAMODULES_PER_BLOCK]
Error info for serializer, valid only for device block event.
dwCameraExposureControl exposure
dwVector2i startOffset
Holds the position of the top left pixel in the top left window.
dwCameraSIPLEErrorDetails sensorErrorInfoList[DW_CAMERA_MAX_CAMERAMODULES_PER_BLOCK]
Error info for sensor, valid only for device block event.
uint8_t const * errorBuffer
Pointer to buffer which is filled by driver with error information.
dwRect rectangularMask
Holds rectangular mask for excluding pixel outside a specified area.
bool enableBpStatsOverride
boolean flag to enable bad pixel statistics settings override
uint32_t verticalInterval
Holds the distance between the top edge of one window and a vertically adjacent window.
uint64_t frameCaptureTSC
Holds the TSC timestamp of the frame capture.
dwRect rectangularMask
Holds a rectangular mask for excluding pixels outside a specified area.
float32_t angle
Holds angle of the ellipse horizontal.
uint32_t numWindowsV
Holds number of windows vertically.
dwCameraISPEllipse ellipticalMask
Holds an elliptical mask for excluding pixels outside specified area.
size_t sizeWritten
Holds size of error written to the buffer, filled by driver.
dwVector2f center
Holds center of the ellipse.
dwCameraNotificationData data
NotificationData from SIPL, pipeline & device block event.
uint32_t gpioIdxs[DW_CAMERA_MAX_DEVICE_GPIOS]
Holds the GPIO indices.
uint32_t height
Holds height of the window in pixels.
float32_t offset
Holds offset to be applied to input data prior to bin mapping.
bool enable
Holds a Boolean to enable histogram statistics Control block.
uint32_t verticalAxis
Holds vertical axis of the ellipse.
dwCameraISPBadPixelStats bpStats
Structure containing override settings for bad pixel statistics block.
bool enableLacStatsOverride[DW_CAMERA_NUM_ISP_UNITS]
boolean flag to enable local average clip statistics settings override
dwCameraISPEllipse ellipticalMask
Holds an elliptical mask for excluding pixels outside a specified area.
dwCameraSIPLEErrorDetails deserializerErrorInfo
Error info for deserializer, valid only for device block event.
dwCameraISPLocalAvgClipStats lacStats[DW_CAMERA_NUM_ISP_UNITS]
Structure containing override settings for local average clip statistics block.
bool isRemoteError
Set to true if remote (serializer) error detected, valid only for device block event.
dwCameraSIPLNotificationData eNotifyType
Holds the notification event type.
bool enable
Holds a Boolean to enable the bad pixel statistics block.
uint32_t uIndex
Holds the ID of each camera sensor.
bool enable
Holds a Boolean to enable the local average and clip statistics block.
uint32_t numWindowsH
Holds number of windows horizontally.
uint32_t numCameraModules
Number of the camera modules, valid only for device block event.
uint32_t horizontalAxis
Holds horizontal axis of the ellipse.
uint8_t ranges[8]
Holds range of the pixel values to be considered for each zone.
dwCameraISPHistogramStatsOverride histStats[DW_CAMERA_NUM_ISP_UNITS]
Structure containing override settings for histogram statistics block.
bool disableLensShadingCorrection
boolean flag to disable lens shading compensation for histogram statistics block
bool enableHistStatsOverride[DW_CAMERA_NUM_ISP_UNITS]
boolean flag to enable histogram statistics settings override
uint8_t knees[8]
Holds bin index specifying different zones in the histogram.
uint32_t horizontalInterval
Holds the distance between the left edge of one window and a horizontally adjacent window.
uint8_t linkErrorMask
Store link mask for link error state, valid only for device block event (1 in index position indicate...
uint32_t width
Holds width of the window in pixels.
dwCameraRawFormat rawFormat
bool ellipticalMaskEnable
Holds a Boolean to enable an elliptical mask for excluding pixels outside a specified area.
uint32_t numGpioIdxs
Holds the number of GPIO indices in the array.
DW_API_PUBLIC dwStatus dwSensorCamera_getNumSupportedCaptureModes(uint32_t *const numModes, dwSensorHandle_t const sensor)
Gets number of supported capture modes.
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.
DW_API_PUBLIC dwStatus dwSensorCamera_setEventCallback(dwCameraCallback blkCallback, dwCameraCallback lineCallback, dwSensorHandle_t sensor)
Set the Camera Error Handling callbacks.
DW_API_PUBLIC dwStatus dwSensorCamera_getSupportedCaptureMode(dwCameraProperties *const captureMode, uint32_t const modeIdx, dwSensorHandle_t const sensor)
Gets capture modes by specified index.
DW_API_PUBLIC dwStatus dwSensorCamera_getTimestamp(dwTime_t *const timestamp, dwCameraFrameHandle_t const frameHandle)
Gets the timestamp of the current camera frame.
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.
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.
DW_API_PUBLIC dwStatus dwSensorCamera_getCUDAStream(cudaStream_t *const stream, dwSensorHandle_t const sensor)
Gets the CUDA stream used.
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'.
DW_API_PUBLIC dwStatus dwSensorCamera_appendAllocationAttributes(dwImageProperties *imgProps, dwCameraOutputType const outputType, dwSensorHandle_t const sensor)
Append the allocation attribute such that images allocated by the application and given to the camera...
dwStatus dwSensorCamera_setImagePool(dwImagePool imagePool, dwSensorHandle_t const sensor)
Sets a pool of image to be used as output by the camera layer.
DW_API_PUBLIC dwStatus dwSensorCamera_getEOFFence(NvSciSyncFence *syncFence, dwCameraOutputType outputType, dwCameraFrameHandle_t const frameHandle)
Get EOF fence of the current camera frame.
#define DW_CAMERA_MAX_CAMERAMODULES_PER_BLOCK
Indicates the maximum number of camera modules per device block.
dwCameraType
Enum of available camera sensors.
DW_API_PUBLIC dwStatus dwSensorCamera_getSensorProperties(dwCameraProperties *const properties, dwSensorHandle_t const sensor)
Gets information about the camera sensor.
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.
#define DW_CAMERA_MAX_DEVICE_GPIOS
Indicates the maximum number of gpio indices.
dwSIPLCameraInterfaceProviderType
Enum of available SIPL interface provider types.
dwCameraRawFormat
Raw encoding formats pixel-order.
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,...
struct dwCameraFrame * dwCameraFrameHandle_t
Handle to captured frame.
dwCameraFOV
Enum of available FOV in degrees for camera lenses.
#define DW_CAMERA_NUM_ISP_UNITS
Number of available ISP Units.
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.
void(* dwCameraCallback)(dwCameraSIPLNotification *notification, dwSensorHandle_t sensor)
Function type of the camera error event handling.
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.
dwCameraExposureControl
Enum of exposure control types.
dwCameraOutputType
Output types supported by the camera.
DW_API_PUBLIC dwStatus dwSensorCamera_setImageMetaDataStats(dwCameraIspStatsOverrideSetting const *overrideISPStats, dwSensorHandle_t sensor)
Overrides ISP statistics (Histogram, Local Average Clip and bad pixel) settings.
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.
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_...
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.
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.
dwCameraSIPLNotificationData
Enum of available SIPL event notification type (Copy from nvsipl::NvSIPLPipelineNotifier::Notificatio...
DW_API_PUBLIC dwStatus dwSensorCamera_returnFrame(dwCameraFrameHandle_t *const frameHandle)
Returns a frame to the camera after it has been consumed.
@ DW_SIPL_CAMERA_INTERFACE_PROVIDER_TYPE_MODULE
@ DW_SIPL_CAMERA_INTERFACE_PROVIDER_TYPE_COUNT
@ DW_SIPL_CAMERA_INTERFACE_PROVIDER_TYPE_DESERIALIZER
@ DW_CAMERA_RAW_FORMAT_CCRC
@ DW_CAMERA_RAW_FORMAT_TOF
@ DW_CAMERA_RAW_FORMAT_CCCC
@ DW_CAMERA_RAW_FORMAT_RCCC
@ DW_CAMERA_RAW_FORMAT_BGGR
@ DW_CAMERA_RAW_FORMAT_GRBG
@ DW_CAMERA_RAW_FORMAT_UNKNOWN
@ DW_CAMERA_RAW_FORMAT_GBRG
@ DW_CAMERA_RAW_FORMAT_CBRC
@ DW_CAMERA_RAW_FORMAT_CCCR
@ DW_CAMERA_RAW_FORMAT_RCCB
@ DW_CAMERA_RAW_FORMAT_RGGB
@ DW_CAMERA_RAW_FORMAT_BCCR
@ DW_CAMERA_RAW_FORMAT_CRCC
@ DW_CAMERA_RAW_FORMAT_CRBC
@ DW_CAMERA_EXPOSURE_UNKNOWN
Unknown exposure control.
@ DW_CAMERA_EXPOSURE_BAE
Exposure control with bracketed auto exposure.
@ DW_CAMERA_EXPOSURE_AE
Default exposure control.
@ DW_CAMERA_EXPOSURE_CUSTOM
Exposure control using user's custom callback.
@ DW_CAMERA_EXPOSURE_NONE
No exposure control.
@ DW_CAMERA_OUTPUT_NATIVE_PROCESSED
processed images (usually be YUV420 planar or RGB planar)
@ DW_CAMERA_OUTPUT_CUDA_RAW_UINT16
for raw images
@ DW_CAMERA_OUTPUT_NATIVE_RAW
raw image
@ DW_CAMERA_OUTPUT_CUDA_YUV420_UINT8_PLANAR
simple yuv420 output, supported in most use cases (see doc)
@ DW_CAMERA_OUTPUT_NATIVE_PROCESSED2
processed images from ISP2 output (RGB-FP16)
@ DW_CAMERA_OUTPUT_CUDA_YUV444_UINT16_PLANAR
other YUV processed outputs (see devguide)
@ DW_CAMERA_OUTPUT_NATIVE_PROCESSED1
processed images from ISP1 output (usually be YUV420 planar or RGB planar)
@ DW_CAMERA_OUTPUT_CUDA_RGBA_UINT8
for processed images RGBA image supported in all processed use cases
@ 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_YUV420_UINT8_SEMIPLANAR
simple yuv420 semiplanar output, supported in most use cases (see doc)
@ 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_ERROR_ISP_PROCESSING_FAILURE
Pipeline event, indicates ISP processing failure.
@ DW_NOTIF_ERROR_CDI_SET_SENSOR_CTRL_FAILURE
Pipeline event, indicates CDI set sensor control failure.
@ DW_NOTIF_ERROR_ICP_BAD_INPUT_STREAM
Pipeline event, indicates ICP bad input stream.
@ DW_NOTIF_INFO_ISP_PROCESSING_DONE
Pipeline event, indicates ISP processing is finished.
@ DW_NOTIF_ERROR_ICP_EMB_DATA_PARSE_FAILURE
Pipeline event, indicates embedded data parsing failure.
@ DW_NOTIF_INFO_ICP_PROCESSING_DONE
Pipeline event, indicates ICP processing is finished.
@ DW_NOTIF_ERROR_SERIALIZER_FAILURE
Device block event, indicates a serializer failure.
@ DW_NOTIF_WARN_ICP_FRAME_DISCONTINUITY
Pipeline event, indicates a discontinuity was detected in parsed embedded data frame sequence number.
@ DW_NOTIF_ERROR_SENSOR_FAILURE
Device block event, indicates a sensor failure.
@ DW_NOTIF_ERROR_DESERIALIZER_FAILURE
Device block event, indicates a deserializer failure.
@ DW_NOTIF_ERROR_DESER_LINK_FAILURE
Device block event, indicates a deserializer link error. Deprecated in the future.
@ DW_NOTIF_INFO_ACP_PROCESSING_DONE
Pipeline event, indicates auto control processing is finished.
@ DW_NOTIF_ERROR_ICP_CAPTURE_FAILURE
Pipeline event, indicates ICP capture failure.
@ DW_NOTIF_INFO_CDI_PROCESSING_DONE
Pipeline event, indicates CDI processing is finished.
@ DW_NOTIF_ERROR_ACP_PROCESSING_FAILURE
Pipeline event, indicates auto control processing failure.
@ DW_NOTIF_ERROR_INTERNAL_FAILURE
Pipeline and device block event, indicates an unexpected internal failure.
@ DW_NOTIF_WARN_ICP_CAPTURE_TIMEOUT
Pipeline event, indicates occurrence of timeout while capturing.
Defines Ellipse Properties for Override Histogram Statistics.
SIPL ISP Histogram Statistics Override Params.
ISP Override Statistics Settings.
NotificationData from SIPL.
Struct of the detailed error info from SIPL.
Notification Data from SIPL.
dwStatus
Status definition.
float float32_t
Specifies POD types.
int64_t dwTime_t
Specifies a timestamp unit, in microseconds.
Defines a two-element single-precision floating-point vector.
Defines a two-element integer vector.
Defines a two-element unsigned-integer vector.
struct dwImageObject * dwImageHandle_t
#define DW_ISP_MAX_COLOR_COMPONENT
Specifies a pool of images.
Defines the properties of the image.
struct dwSensorObject * dwSensorHandle_t
Handle representing a sensor.
NVIDIA DriveWorks API: Image Conversion and Streaming Functionality