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 | dwCameraProperties |
Camera Properties. More... | |
struct | dwCameraNotificationData |
NotificationData from SIPL. More... | |
struct | dwCameraSIPLEErrorDetails |
Struct of the detailed error info from SIPL. More... | |
struct | dwCameraSIPLNotification |
Notification Data from SIPL. More... | |
struct | dwCameraISPEllipse |
Defines Ellipse Properties for Override Histogram Statistics. More... | |
struct | dwCameraISPStatisticsWindows |
struct | dwCameraISPBadPixelStats |
struct | dwCameraISPHistogramStatsOverride |
SIPL ISP Histogram Statistics Override Params. More... | |
struct | dwCameraISPLocalAvgClipStats |
struct | dwCameraIspStatsOverrideSetting |
ISP Override Statistics Settings. More... | |
Macros | |
#define | DW_CAMERA_NUM_ISP_UNITS 2U |
Number of available ISP Units. More... | |
#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_DEVICE_GPIOS 8U |
Indicates the maximum number of gpio indices. More... | |
#define | DW_CAMERA_MAX_CAMERAMODULES_PER_BLOCK 4U |
Indicates the maximum number of camera modules per device block. More... | |
Typedefs | |
typedef void | NvMediaIPPManager |
typedef struct dwCameraFrame * | dwCameraFrameHandle_t |
Handle to captured frame. More... | |
typedef enum dwCameraOutputType | dwCameraOutputType |
Output types supported by the camera. More... | |
typedef enum dwCameraRawFormat | dwCameraRawFormat |
Raw encoding formats pixel-order. More... | |
typedef enum dwCameraType | dwCameraType |
Enum of available camera sensors. More... | |
typedef enum dwCameraExposureControl | dwCameraExposureControl |
Enum of exposure control types. More... | |
typedef enum dwCameraFOV | dwCameraFOV |
Enum of available FOV in degrees for camera lenses. More... | |
typedef enum dwCameraSIPLInterfaceProviderType | dwSIPLCameraInterfaceProviderType |
Enum of available SIPL interface provider types. More... | |
typedef enum dwCameraISPType | dwCameraISPType |
ISP types supported by the camera. More... | |
typedef struct dwCameraProperties | dwCameraProperties |
Camera Properties. More... | |
typedef enum dwCameraSIPLNotificationData | dwCameraSIPLNotificationData |
Enum of available SIPL event notification type (Copy from nvsipl::NvSIPLPipelineNotifier::NotificationType). More... | |
typedef enum dwCameraEvent | dwCameraEvent |
defines camera events exposed by dwCamera More... | |
typedef struct dwCameraNotificationData | dwCameraNotificationData |
NotificationData from SIPL. More... | |
typedef struct dwCameraSIPLEErrorDetails | dwCameraSIPLEErrorDetails |
Struct of the detailed error info from SIPL. More... | |
typedef struct dwCameraSIPLNotification | dwCameraSIPLNotification |
Notification Data from SIPL. More... | |
typedef void(* | dwCameraCallback) (dwCameraSIPLNotification *notification, dwSensorHandle_t sensor) |
Function type of the camera error event handling. More... | |
typedef struct dwCameraISPEllipse | dwCameraISPEllipse |
Defines Ellipse Properties for Override Histogram Statistics. More... | |
typedef struct dwCameraISPHistogramStatsOverride | dwCameraISPHistogramStatsOverride |
SIPL ISP Histogram Statistics Override Params. More... | |
typedef struct dwCameraIspStatsOverrideSetting | dwCameraIspStatsOverrideSetting |
ISP Override Statistics Settings. More... | |
Functions | |
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_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 | DW_DEPRECATED ("dwSensorCamera_setImagePool() is deprecated and will be removed in the next major release," " use dwSensorCamera_setImagePoolNew() instead") dwStatus dwSensorCamera_setImagePool(dwImagePool imagePool |
Sets a pool of image to be used as output by the camera layer. More... | |
DW_API_PUBLIC dwStatus | dwSensorCamera_setImagePoolNew (dwImagePool imagePool, dwCameraOutputType const type, dwSensorHandle_t const sensor) |
Sets a pool of image to be used as output by the camera layer. 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_getSensorProperties (dwCameraProperties *const properties, dwSensorHandle_t const sensor) |
Gets information about the camera sensor. 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_getSupportedCaptureMode (dwCameraProperties *const captureMode, uint32_t const modeIdx, dwSensorHandle_t const sensor) |
Gets capture modes by specified index. 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_setImageAttributes (dwImageProperties *const imageProperties, dwCameraOutputType const outputType, dwSensorHandle_t const sensor) |
Overrides the properties of the images in the internal pool. 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_getCUDAStream (cudaStream_t *const stream, dwSensorHandle_t const sensor) |
Gets the CUDA stream used. 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_getImageTimestamps (dwImageTimestamps *const imageTimestamps, dwCameraFrameHandle_t const frameHandle) |
Gets the timestamps of the current camera frame. 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_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_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 | DW_DEPRECATED ("dwSensorCamera_fillSyncAttributes() is deprecated and will be removed in the next major release," " use dwSensorCamera_fillSyncAttributesNew() instead") dwStatus dwSensorCamera_fillSyncAttributes(NvSciSyncAttrList syncAttrList |
Fill the sync attributes for the camera pipeline to signal EOF fences. More... | |
DW_API_PUBLIC | DW_DEPRECATED ("dwSensorCamera_setSyncObject() is deprecated and will be removed in the next major release," " use dwSensorCamera_setSyncObjectNew() instead") dwStatus dwSensorCamera_setSyncObject(NvSciSyncObj syncObj |
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... | |
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_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_setEventCallback (dwCameraCallback blkCallback, dwCameraCallback lineCallback, dwSensorHandle_t sensor) |
Set the Camera Error Handling callbacks. More... | |
DW_API_PUBLIC dwStatus | dwSensorCamera_disableLink (dwSensorHandle_t const sensor) |
Disable the camera link. More... | |
DW_API_PUBLIC dwStatus | dwSensorCamera_enableLink (dwSensorHandle_t const sensor, bool const resetModule) |
Enable the camera link. 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_lockImage (dwImageHandle_t image, dwSensorHandle_t const sensor) |
Locks an image from the camera sensor for processing to add reference to the image. More... | |
DW_API_PUBLIC dwStatus | dwSensorCamera_unlockImage (dwImageHandle_t image, dwSensorHandle_t const sensor) |
Unlocks a previously locked image from a camera sensor. More... | |
DW_API_PUBLIC dwStatus | dwSensorCamera_setHeaterState (dwSensorHandle_t const sensor, bool const state) |
Turns camera heater on or off. More... | |
Variables | |
DW_API_PUBLIC const dwSensorHandle_t | sensor |
DW_API_PUBLIC dwCameraOutputType | outputType |
#define DW_CAMERA_ERROR_ID_MAX DW_NOTIF_ERROR_INTERNAL_FAILURE |
#define DW_CAMERA_MAX_CAMERAMODULES_PER_BLOCK 4U |
#define DW_CAMERA_MAX_DEVICE_GPIOS 8U |
#define DW_CAMERA_NUM_ISP_UNITS 2U |
typedef void(* dwCameraCallback) (dwCameraSIPLNotification *notification, dwSensorHandle_t sensor) |
typedef enum dwCameraEvent dwCameraEvent |
defines camera events exposed by dwCamera
typedef enum dwCameraExposureControl dwCameraExposureControl |
Enum of exposure control types.
typedef enum dwCameraFOV dwCameraFOV |
Enum of available FOV in degrees for camera lenses.
typedef struct dwCameraFrame* dwCameraFrameHandle_t |
typedef struct dwCameraISPEllipse dwCameraISPEllipse |
Defines Ellipse Properties for Override Histogram Statistics.
SIPL ISP Histogram Statistics Override Params.
typedef struct dwCameraIspStatsOverrideSetting dwCameraIspStatsOverrideSetting |
ISP Override Statistics Settings.
typedef enum dwCameraISPType dwCameraISPType |
ISP types supported by the camera.
typedef struct dwCameraNotificationData dwCameraNotificationData |
NotificationData from SIPL.
typedef enum dwCameraOutputType 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.
typedef struct dwCameraProperties dwCameraProperties |
Camera Properties.
typedef enum dwCameraRawFormat dwCameraRawFormat |
Raw encoding formats pixel-order.
typedef struct dwCameraSIPLEErrorDetails dwCameraSIPLEErrorDetails |
Struct of the detailed error info from SIPL.
typedef struct dwCameraSIPLNotification dwCameraSIPLNotification |
Notification Data from SIPL.
typedef enum dwCameraSIPLNotificationData dwCameraSIPLNotificationData |
Enum of available SIPL event notification type (Copy from nvsipl::NvSIPLPipelineNotifier::NotificationType).
typedef enum dwCameraType dwCameraType |
Enum of available camera sensors.
Enum of available SIPL interface provider types.
typedef void NvMediaIPPManager |
enum dwCameraEvent |
defines camera events exposed by dwCamera
Enum of exposure control types.
enum dwCameraFOV |
Enum of available FOV in degrees for camera lenses.
enum dwCameraISPType |
enum 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.
enum dwCameraRawFormat |
Raw encoding formats pixel-order.
Enum of available SIPL event notification type (Copy from nvsipl::NvSIPLPipelineNotifier::NotificationType).
enum dwCameraType |
Enum of available camera sensors.
DW_API_PUBLIC DW_DEPRECATED | ( | "dwSensorCamera_fillSyncAttributes() is deprecated and will be removed in the next major | release, |
" " use dwSensorCamera_fillSyncAttributesNew() instead" | |||
) |
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.
[out] | syncAttrList | The sync attributes list to be filled |
[in] | outputType | The output type |
[in] | sensor | The sensor handle |
DW_API_PUBLIC DW_DEPRECATED | ( | "dwSensorCamera_setImagePool() is deprecated and will be removed in the next major | release, |
" " use dwSensorCamera_setImagePoolNew() instead" | |||
) |
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.
[in] | imagePool | Handle 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] | sensor | Camera sensor handle |
DW_API_PUBLIC DW_DEPRECATED | ( | "dwSensorCamera_setSyncObject() is deprecated and will be removed in the next major | release, |
" " use dwSensorCamera_setSyncObjectNew() instead" | |||
) |
Set the sync obj to which the camera pipeline will signal EOF fences.
The sync object is not reference counted
[in] | syncObj | The sync object |
[in] | outputType | The output type |
[in] | sensor | The sensor handle |
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.
[in] | syncFences | Array of prefences |
[in] | count | Prefence count |
[in] | outputType | The output type |
[in] | frameHandle | Handle to the camera frame |
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.
[in,out] | imgProps | Image properties |
[in] | outputType | Ouptut type of the camera. |
[in] | sensor | Sensor handle of the camera sensor previously created with dwSAL_createSensor(). |
DW_API_PUBLIC dwStatus dwSensorCamera_disableLink | ( | dwSensorHandle_t const | sensor | ) |
Disable the camera link.
Only supported on non-safety builds. This method should only be called after dwSensor_start() and before dwSensor_stop().
[in] | sensor | A handle to the camera GMSL |
DW_API_PUBLIC dwStatus dwSensorCamera_enableLink | ( | dwSensorHandle_t const | sensor, |
bool const | resetModule | ||
) |
Enable the camera link.
Only supported on non-safety builds. 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.
[in] | sensor | A handle to the camera GMSL |
[in] | resetModule | If true, reconfigure the camera module before enabling the link. |
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.
[out] | syncAttrList | The sync attributes list to be filled |
[in] | syncType | The sync type |
[in] | outputType | The output type |
[in] | sensor | The sensor handle |
DW_API_PUBLIC dwStatus dwSensorCamera_getCUDAStream | ( | cudaStream_t *const | stream, |
dwSensorHandle_t const | sensor | ||
) |
Gets the CUDA stream used.
[out] | stream | Returns the CUDA stream in sensor. |
[in] | sensor | A pointer to the camera handle that is updated. |
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.
[out] | syncFence | The sync fence of the frame |
[in] | outputType | The output type |
[in] | frameHandle | Handle to the camera frame |
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.
[out] | image | Handle to the image received by the camera |
[in] | type | Ouptut type of the image. This is represented by a limited useful number of options which can be chosen at runtime |
[in] | frame | Camera frame handle of the captured frame |
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.
[out] | image | Handle to the image received by the camera |
[in] | type | Ouptut type of the image. This is represented by a limited useful number of options which can be chosen at runtime |
[in] | frame | Camera frame handle of the captured frame |
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'.
[out] | imageProperties | A pointer to image properties of the frames captured by the camera. |
[in] | outputType | Format of the output image to get the properties of |
[in] | sensor | Sensor handle of the camera sensor previously created with dwSAL_createSensor(). |
DW_API_PUBLIC dwStatus dwSensorCamera_getImageTimestamps | ( | dwImageTimestamps *const | imageTimestamps, |
dwCameraFrameHandle_t const | frameHandle | ||
) |
Gets the timestamps of the current camera frame.
[out] | imageTimestamps | The timestamps of the current camera frame. |
[in] | frameHandle | Handle to a captured frame. |
DW_API_PUBLIC dwStatus dwSensorCamera_getNumSupportedCaptureModes | ( | uint32_t *const | numModes, |
dwSensorHandle_t const | sensor | ||
) |
Gets number of supported capture modes.
[out] | numModes | A pointer to the number of available capture modes. |
[in] | sensor | Sensor handle of the camera sensor previously created with dwSAL_createSensor(). |
DW_API_PUBLIC dwStatus dwSensorCamera_getSensorProperties | ( | dwCameraProperties *const | properties, |
dwSensorHandle_t const | sensor | ||
) |
Gets information about the camera sensor.
[out] | properties | A pointer to the properties of the camera. |
[in] | sensor | Sensor handle of the camera sensor previously created with dwSAL_createSensor(). |
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.
[out] | interfaceProvider | nvsipl::IInterfaceProvider*& for given sensor |
[in] | sensor | Handle to sensor |
[in] | type | type of interface provider |
DW_API_PUBLIC dwStatus dwSensorCamera_getSupportedCaptureMode | ( | dwCameraProperties *const | captureMode, |
uint32_t const | modeIdx, | ||
dwSensorHandle_t const | sensor | ||
) |
Gets capture modes by specified index.
[out] | captureMode | A pointer to available capture mode. |
[in] | modeIdx | Index of a mode to retrieve. |
[in] | sensor | Sensor handle of the camera sensor previously created with dwSAL_createSensor(). |
DW_API_PUBLIC dwStatus dwSensorCamera_getTimestamp | ( | dwTime_t *const | timestamp, |
dwCameraFrameHandle_t const | frameHandle | ||
) |
Gets the timestamp of the current camera frame.
[out] | timestamp | The timestamp of the current camera frame. |
[in] | frameHandle | Handle to a captured frame. |
DW_API_PUBLIC dwStatus dwSensorCamera_lockImage | ( | dwImageHandle_t | image, |
dwSensorHandle_t const | sensor | ||
) |
Locks an image from the camera sensor for processing to add reference to the image.
This function locks an image from the specified camera sensor and returns a handle to the image. The image handle can then be used for further processing.
[in] | image | Handle to the image received by the camera |
[in] | sensor | The handle to the camera sensor. |
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.
[in] | paramId | The ID of the parameter to be read |
[out] | buffer | A pointer to the buffer that the data is to be read to. It must be at least 'size' bytes long. |
[in] | size | The 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] | sensor | A handle to the camera GMSL |
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.
[out] | frameHandle | A 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] | timeoutUs | Timeout in microseconds to wait for a new frame. Special values: DW_TIMEOUT_INFINITE - to wait infinitly. Zero - means polling of internal queue. |
[in] | sensor | Sensor handle of the camera previously created with 'dwSAL_createSensor()'. |
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_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.
[in] | frameHandle | Handle previously read from the camera to be returned to the pool. |
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.
[in] | stream | The CUDA stream to use. |
[in] | sensor | A pointer to the camera handle that is updated. |
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.
[in] | blkCallback | device block error handling function. Set to nullptr if not used |
[in] | lineCallback | pipeline error handling function. Set to nullptr if not used |
[in] | sensor | A handle to the camera GMSL |
DW_API_PUBLIC dwStatus dwSensorCamera_setHeaterState | ( | dwSensorHandle_t const | sensor, |
bool const | state | ||
) |
Turns camera heater on or off.
[in] | sensor | The sensor handle. |
[in] | state | The state to set the sensor (true == heater-on, false == heater-off). |
DW_API_PUBLIC dwStatus dwSensorCamera_setImageAttributes | ( | dwImageProperties *const | imageProperties, |
dwCameraOutputType const | outputType, | ||
dwSensorHandle_t const | sensor | ||
) |
Overrides the properties of the images in the internal pool.
dwCameraImageOutputType specifies which pool to override
[in] | imageProperties | A modifiable pointer to image properties of the frames captured by the camera. |
[in] | outputType | Format of the output image to get the properties of |
[in] | sensor | Sensor handle of the camera sensor previously created with dwSAL_createSensor(). |
DW_API_PUBLIC dwStatus dwSensorCamera_setImageMetaDataStats | ( | dwCameraIspStatsOverrideSetting const * | overrideISPStats, |
dwSensorHandle_t | sensor | ||
) |
Overrides ISP statistics (Histogram, Local Average Clip and bad pixel) settings.
[out] | overrideISPStats | A pointer to override ISP statistics settings |
[in] | sensor | The sensor handle. |
DW_API_PUBLIC dwStatus dwSensorCamera_setImagePoolNew | ( | dwImagePool | imagePool, |
dwCameraOutputType const | type, | ||
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.
[in] | imagePool | Handle 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] | type | Ouptut type of the image. This is represented by a limited useful number of options which can be chosen at runtime |
[in] | sensor | Camera sensor handle |
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
[in] | syncObj | The sync object |
[in] | syncType | The sync type |
[in] | outputType | The output type |
[in] | sensor | The sensor handle |
DW_API_PUBLIC dwStatus dwSensorCamera_unlockImage | ( | dwImageHandle_t | image, |
dwSensorHandle_t const | sensor | ||
) |
Unlocks a previously locked image from a camera sensor.
Releases the lock on an image that was previously locked for processing.
[in] | image | Handle to the image received by the camera |
[in] | sensor | The handle to the camera sensor. |
DW_API_PUBLIC dwCameraOutputType outputType |