Loading [MathJax]/extensions/tex2jax.js
  • <xmp id="om0om">
  • <table id="om0om"><noscript id="om0om"></noscript></table>

  • DriveWorks SDK Reference
    5.6.215 Release
    For Test and Development only

    All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
    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  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_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...
     

    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  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_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 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 reestablish 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_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. 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_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. More...
     
    DW_API_PUBLIC dwStatus dwSensorCamera_setEventCallback (dwCameraCallback blkCallback, dwCameraCallback lineCallback, dwSensorHandle_t sensor)
     Set the Camera Error Handling callbacks. More...
     
    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...
     

    Data Structure Documentation

    ◆ 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

    Or'ed 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_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 264 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 234 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 289 of file Camera.h.

    ◆ dwCameraFrameHandle_t

    typedef struct dwCameraFrame* dwCameraFrameHandle_t

    Handle to captured frame.

    Definition at line 70 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 141 of file Camera.h.

    ◆ dwCameraFOV

    Enum of available FOV in degrees for camera lenses.

    Enumerator
    DW_CAMERA_FOV_UNKNOWN 
    DW_CAMERA_FOV_30 
    DW_CAMERA_FOV_48 
    DW_CAMERA_FOV_50 
    DW_CAMERA_FOV_55 
    DW_CAMERA_FOV_60 
    DW_CAMERA_FOV_65 
    DW_CAMERA_FOV_90 
    DW_CAMERA_FOV_100 
    DW_CAMERA_FOV_110 
    DW_CAMERA_FOV_120 
    DW_CAMERA_FOV_185 

    Definition at line 155 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 75 of file Camera.h.

    ◆ dwCameraRawFormat

    Raw encoding formats pixel-order.

    Enumerator
    DW_CAMERA_RAW_FORMAT_UNKNOWN 
    DW_CAMERA_RAW_FORMAT_RGGB 
    DW_CAMERA_RAW_FORMAT_BGGR 
    DW_CAMERA_RAW_FORMAT_GRBG 
    DW_CAMERA_RAW_FORMAT_GBRG 
    DW_CAMERA_RAW_FORMAT_RCCB 
    DW_CAMERA_RAW_FORMAT_BCCR 
    DW_CAMERA_RAW_FORMAT_CRBC 
    DW_CAMERA_RAW_FORMAT_CBRC 
    DW_CAMERA_RAW_FORMAT_RCCC 
    DW_CAMERA_RAW_FORMAT_CRCC 
    DW_CAMERA_RAW_FORMAT_CCRC 
    DW_CAMERA_RAW_FORMAT_CCCR 
    DW_CAMERA_RAW_FORMAT_CCCC 
    DW_CAMERA_RAW_FORMAT_TOF 

    Definition at line 102 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 194 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 126 of file Camera.h.

    ◆ dwSIPLCameraInterfaceProviderType

    Enum of available SIPL interface provider types.

    Enumerator
    DW_SIPL_CAMERA_INTERFACE_PROVIDER_TYPE_DESERIALIZER 
    DW_SIPL_CAMERA_INTERFACE_PROVIDER_TYPE_MODULE 
    DW_SIPL_CAMERA_INTERFACE_PROVIDER_TYPE_COUNT 

    Definition at line 171 of file Camera.h.

    Function Documentation

    ◆ dwSensorCamera_appendAllocationAttributes()

    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 via dwSensorCamera_setImagePool() can be imported into the underlying driver.

    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

    ◆ 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

    ◆ 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 reestablish 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().

    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

    ◆ 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 attributes on the same

    Parameters
    [out]syncAttrListThe sync attributes list to be filled
    [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

    ◆ dwSensorCamera_getEOFFence()

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

    Get EOF fence of the current camera frame.

    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

    ◆ 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

    ◆ 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

    ◆ 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

    ◆ 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
    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

    ◆ 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

    ◆ 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

    ◆ 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

    ◆ 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,
    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. 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

    ◆ 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

    ◆ 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.

    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

    ◆ 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

    ◆ dwSensorCamera_setImagePool()

    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

    ◆ 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
    人人超碰97caoporen国产