DriveWorks SDK Reference

| 0.6.67 Release

Cameras

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.

Data Structures

struct  dwCameraProperties
 

Modules

 Vibrante Cameras
 Defines the Vibrante camera module.
 

Typedefs

typedef struct dwCameraFrame * dwCameraFrameHandle_t
 Handle to captured frame. More...
 

Enumerations

enum  dwCameraOutputType {
  DW_CAMERA_PROCESSED_IMAGE = 1 << 0,
  DW_CAMERA_RAW_IMAGE = 1 << 1,
  DW_CAMERA_DATALINES = 1 << 2
}
 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
}
 
enum  dwCameraType {
  DW_CAMERA_GENERIC = 0,
  DW_CAMERA_GMSL_OV10635 = 1,
  DW_CAMERA_GMSL_OV10640 = 2,
  DW_CAMERA_GMSL_AR0231_RGGB = 3,
  DW_CAMERA_GMSL_AR0231_RCCB = 4,
  DW_CAMERA_GMSL_AR0231_RCCB_SSC = 5,
  DW_CAMERA_USB_GENERIC = 6,
  DW_CAMERA_GMSL_AR0231_RCCB_BAE = 7,
  DW_CAMERA_GMSL_OV10640_SVC210 = 8,
  DW_CAMERA_GMSL_OV10640_SVC212 = 9,
  DW_CAMERA_GMSL_AR0231_RCCB_SS3322 = 10,
  DW_CAMERA_GMSL_AR0231_RCCB_SS3323 = 11,
  DW_CAMERA_GMSL_AR0144 = 12
}
 Enum of available cameras. More...
 

Functions

DW_API_PUBLIC dwStatus dwSensorCamera_getDataLines (const dwImageDataLines **dataLines, dwCameraFrameHandle_t frameHandle)
 Gets the data lines sent by the camera sensor. More...
 
DW_API_PUBLIC dwStatus dwSensorCamera_getImageCPU (dwImageCPU **image, dwCameraOutputType format, dwCameraFrameHandle_t frameHandle)
 Gets a frame from the camera sensor. More...
 
DW_API_PUBLIC dwStatus dwSensorCamera_getImageCUDA (dwImageCUDA **image, dwCameraOutputType format, dwCameraFrameHandle_t frameHandle)
 Gets a frame from the camera sensor. More...
 
DW_API_PUBLIC dwStatus dwSensorCamera_getImageProperties (dwImageProperties *imageProperties, dwCameraOutputType type, dwSensorHandle_t sensor)
 Gets information about the image properties for a given dwCameraOutputType. More...
 
DW_API_PUBLIC dwStatus dwSensorCamera_getSensorProperties (dwCameraProperties *properties, dwSensorHandle_t sensor)
 Gets information about the camera sensor. More...
 
DW_API_PUBLIC dwStatus dwSensorCamera_getTimestamp (dwTime_t *timestamp, dwCameraFrameHandle_t frameHandle)
 Gets the timestamp of the current camera frame. More...
 
DW_API_PUBLIC dwStatus dwSensorCamera_readFrame (dwCameraFrameHandle_t *frameHandle, uint32_t sibling, dwTime_t timeout_us, dwSensorHandle_t sensor)
 Reads a frame handle from the camera sensor. More...
 
DW_API_PUBLIC dwStatus dwSensorCamera_returnFrame (dwCameraFrameHandle_t *frameHandle)
 Returns a frame to the camera after it has been consumed. More...
 

Data Structure Documentation

◆ dwCameraProperties

struct dwCameraProperties
Data Fields
dwCameraType cameraType

Type of the camera

float32_t framerate

Framerate in Hz

int32_t outputTypes

Or'ed list of available dwCameraOutputType

dwCameraRawFormat rawFormat

Raw bayern pattern

dwVector2ui resolution

Physical resolution of the camera sensor

uint32_t siblings

Number of sibling frames

Typedef Documentation

◆ dwCameraFrameHandle_t

typedef struct dwCameraFrame* dwCameraFrameHandle_t

Handle to captured frame.

Definition at line 62 of file Camera.h.

Enumeration Type Documentation

◆ dwCameraOutputType

Output types supported by the camera.

Enumerator
DW_CAMERA_PROCESSED_IMAGE 
DW_CAMERA_RAW_IMAGE 
DW_CAMERA_DATALINES 

Definition at line 65 of file Camera.h.

◆ dwCameraRawFormat

Enumerator
DW_CAMERA_RAW_FORMAT_UNKNOWN 

Raw encoding formats pixel-order.

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 

Definition at line 71 of file Camera.h.

◆ dwCameraType

Enum of available cameras.

Enumerator
DW_CAMERA_GENERIC 

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

DW_CAMERA_GMSL_OV10635 

GMSL OV10635 camera

DW_CAMERA_GMSL_OV10640 

GMSL OV10640 camera

DW_CAMERA_GMSL_AR0231_RGGB 

GMSL AR0231 RGGB camera (GRBG, rev-3/4 model ss3321, rev-6 all models)

DW_CAMERA_GMSL_AR0231_RCCB 

GMSL AR0231 RCCB camera (rev-4/6 all models)

DW_CAMERA_GMSL_AR0231_RCCB_SSC 

GMSL AR0231 RCCB camera with sensor computed statistics

DW_CAMERA_USB_GENERIC 

Generic USB camera

DW_CAMERA_GMSL_AR0231_RCCB_BAE 

GMSL AR0231 RCCB camera with Bracketed AE.

DW_CAMERA_GMSL_OV10640_SVC210 

GMSL OV10640 camera SVC210 type (185 deg fov)

DW_CAMERA_GMSL_OV10640_SVC212 

GMSL OV10640 camera SVC212 type (65 deg fov)

DW_CAMERA_GMSL_AR0231_RCCB_SS3322 

GMSL AR0231 RCCB camera SS3322 type (100 deg fov, rev-4/6)

DW_CAMERA_GMSL_AR0231_RCCB_SS3323 

GMSL AR0231 RCCB camera SS3322 type (60 deg fov)

DW_CAMERA_GMSL_AR0144 

GMSL AR0144 camera (GRBG, rev-3 model)

Definition at line 92 of file Camera.h.

Function Documentation

◆ dwSensorCamera_getDataLines()

DW_API_PUBLIC dwStatus dwSensorCamera_getDataLines ( const dwImageDataLines **  dataLines,
dwCameraFrameHandle_t  frameHandle 
)

Gets the data lines sent by the camera sensor.

Parameters
[out]dataLinesAdditional data lines sent from the sensor with this image.
[in]frameHandleHandle to a captured frame.
Note
The returned lines have the lifetime of the associated frame handle, e.g., when the handle is returned, the data gets invalid.
Returns
DW_INVALID_HANDLE - if given handle is not valid.
DW_NOT_IMPLEMENTED - if given camera does not support datalines.
DW_SUCCESS

◆ dwSensorCamera_getImageCPU()

DW_API_PUBLIC dwStatus dwSensorCamera_getImageCPU ( dwImageCPU **  image,
dwCameraOutputType  format,
dwCameraFrameHandle_t  frameHandle 
)

Gets a frame from the camera sensor.

Note
The returned image has the lifetime of the associated frame handle, e.g., when the handle is returned, the data gets invalid.
Parameters
[out]imageA pointer to a pointer to an image read from the camera. The format or the image depends on camera type. The frame must be returned to be put back into the internal pool.
[in]formatFormat of the image to get.
[in]frameHandleHandle to a captured frame.
Returns
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_NOT_AVAILABLE - if sensor has not been configured to deliver CPU images of format type.
DW_SUCCESS

◆ dwSensorCamera_getImageCUDA()

DW_API_PUBLIC dwStatus dwSensorCamera_getImageCUDA ( dwImageCUDA **  image,
dwCameraOutputType  format,
dwCameraFrameHandle_t  frameHandle 
)

Gets a frame from the camera sensor.

Note
The returned image has the lifetime of the associated frame handle, e.g., when the handle is returned, the data gets invalid.
Parameters
[out]imageA pointer to a pointer to an image read from the camera. The format or the image depends on camera type. The frame must be returned to be put back into the internal pool.
[in]formatFormat of the image to get.
[in]frameHandleHandle to a captured frame.
Returns
DW_CUDA_ERROR - if the underlying camera driver had a CUDA 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_NOT_AVAILABLE - if sensor has not been configured to deliver CUDA images of format type.
DW_SUCCESS

◆ dwSensorCamera_getImageProperties()

DW_API_PUBLIC dwStatus dwSensorCamera_getImageProperties ( dwImageProperties imageProperties,
dwCameraOutputType  type,
dwSensorHandle_t  sensor 
)

Gets information about the image properties for a given dwCameraOutputType.

Parameters
[out]imagePropertiesA pointer to image properties of the frames captured by the camera.
[in]typeFormat of the image to get. This is an OR'ed list of dwCameraOutputType.
[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. However the dimensions might be different depending on the provided type.

◆ dwSensorCamera_getSensorProperties()

DW_API_PUBLIC dwStatus dwSensorCamera_getSensorProperties ( dwCameraProperties properties,
dwSensorHandle_t  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().

◆ dwSensorCamera_getTimestamp()

DW_API_PUBLIC dwStatus dwSensorCamera_getTimestamp ( dwTime_t timestamp,
dwCameraFrameHandle_t  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_readFrame()

DW_API_PUBLIC dwStatus dwSensorCamera_readFrame ( dwCameraFrameHandle_t frameHandle,
uint32_t  sibling,
dwTime_t  timeout_us,
dwSensorHandle_t  sensor 
)

Reads a frame handle from the camera sensor.

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]siblingNumber of camera siblings from which to retrieve frames.
[in]timeout_usTimeout 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 handle is not valid.
DW_NOT_IMPLEMENTED - if the method for this image type is not implemented by given camera.
DW_TIME_OUT - if no frame could not be acquired within given time interval.
DW_NOT_AVAILABLE - if sensor has not been started or data is not available in polling mode.
DW_SAL_SENSOR_ERROR - if there was an i/o error.
DW_END_OF_STREAM - if end of stream reached.
DW_SUCCESS

◆ dwSensorCamera_returnFrame()

DW_API_PUBLIC dwStatus dwSensorCamera_returnFrame ( dwCameraFrameHandle_t 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_HANDLE - if given handle is not valid.
DW_CALL_NOT_ALLOWED - if the sensor this frame camera from has already been released.
DW_SUCCESS