NVIDIA DriveOS Linux SDK API Reference

7.2.5.0 Early Access Release
image/Image.h File Reference

Detailed Description

NVIDIA DriveWorks API: Image Conversion and Streaming Functionality

Description: This file defines methods for image conversion.

Definition in file image/Image.h.

Go to the source code of this file.

Data Structures

struct  dwImagePool
 Specifies a pool of images. More...
 
struct  dwImageExtParameter
 Specifies the Image Extension parameters. More...
 
struct  dwImageDataLines
 Container for data lines from the camera. More...
 
struct  dwImageSplineControlPoint
 Control point for a global tone-map spline curve. More...
 
struct  dwExposureDuration
 Per-row HDR exposure durations for the captured image. More...
 
struct  dwSensorTemperature
 
struct  dwImageSensorStatistics
 Sensor statistics associated with the image. More...
 
struct  dwImageRawProperties
 
struct  dwImageTimestamps
 Image timestamps. More...
 
struct  dwImagePIIRegions
 Defines PII (Personally Identifiable Information) regions associated with an image. More...
 
struct  dwImageMetaData
 Additional meta information stored with each image. More...
 
struct  dwImageProperties
 Defines the properties of the image. More...
 
struct  dwImageCPU
 Defines a CPU-based image. More...
 
struct  dwImageCUDA
 Defines a CUDA image. More...
 
struct  dwImageNvMedia
 Defines an NvMedia image. More...
 

Macros

#define DW_MAX_IMAGE_PLANES   3
 Maximum number of image planes. More...
 
#define DW_ISP_MAX_COLOR_COMPONENT   (4U)
 Maximum number of ISP color components. More...
 
#define DW_MAX_NUM_TEMPERATURES   4
 should be the same as the DEVBLK_CDI_MAX_NUM_TEMPERATURES in NvSIPLCDICommon.h of NvSIPL More...
 
#define DW_IMAGE_NUM_SPLINE_COMPONENTS   18U
 Number of spline components for tone mapping. More...
 
#define DW_MAX_COLOR_SIZE   256
 Maximum color channel size. More...
 
#define DW_DEVBLK_CDI_MAX_EXPOSURES   4
 Maximum number of HDR exposures per pixel row. More...
 
#define DW_LUMINANCE_CALIB_MATRIX_SIZE   4
 Defines the length(M) of a MxM luminance calibration matrix. More...
 
#define DW_MAX_PII_REGIONS   24
 

Typedefs

typedef enum dwSyncType dwSyncType
 Enum representing a sync type. More...
 
typedef enum dwImageType dwImageType
 Specifies the image type. More...
 
typedef struct dwImageObject * dwImageHandle_t
 Handle to an image object. More...
 
typedef struct dwImageObject const * dwConstImageHandle_t
 Handle to a const image object. More...
 
typedef struct dwImageAllocationAttrList * dwImageAllocationAttrListHandle_t
 dwImage Allocation Attributes List More...
 
typedef struct dwImagePool dwImagePool
 Specifies a pool of images. More...
 
typedef struct dwImageExtParameter dwImageExtParameter
 Specifies the Image Extension parameters. More...
 
typedef enum dwImageFormat dwImageFormat
 Format of the image represented as DW_IMAGE_FORMAT_COLORSPACE(_PIXELTYPE)(_PIXELORDER) More...
 
typedef struct dwImageDataLines dwImageDataLines
 Container for data lines from the camera. More...
 
typedef struct dwImageSplineControlPoint dwImageSplineControlPoint
 Control point for a global tone-map spline curve. More...
 
typedef struct dwExposureDuration dwExposureDuration
 Per-row HDR exposure durations for the captured image. More...
 
typedef struct dwSensorTemperature dwSensorTemperature
 
typedef struct dwImageSensorStatistics dwImageSensorStatistics
 Sensor statistics associated with the image. More...
 
typedef struct dwImageRawProperties dwImageRawProperties
 
typedef struct dwImageTimestamps dwImageTimestamps
 Image timestamps. More...
 
typedef struct dwImageMetaData dwImageMetaData
 Additional meta information stored with each image. More...
 
typedef struct dwImageProperties dwImageProperties
 Defines the properties of the image. More...
 
typedef struct dwImageCPU dwImageCPU
 Defines a CPU-based image. More...
 
typedef struct dwImageCUDA dwImageCUDA
 Defines a CUDA image. More...
 
typedef struct dwImageNvMedia dwImageNvMedia
 Defines an NvMedia image. More...
 

Enumerations

enum  dwSyncType {
  DW_SYNC_TYPE_WAITER,
  DW_SYNC_TYPE_SIGNALER
}
 Enum representing a sync type. More...
 
enum  dwImageType {
  DW_IMAGE_CPU = 0,
  DW_IMAGE_CUDA = 2,
  DW_IMAGE_NVMEDIA = 3,
  DW_IMAGE_GL = 0xFF
}
 Specifies the image type. More...
 
enum  dwImageFormat {
  DW_IMAGE_FORMAT_UNKNOWN = 0,
  DW_IMAGE_FORMAT_R_INT16 = 900,
  DW_IMAGE_FORMAT_R_UINT8 = 1000,
  DW_IMAGE_FORMAT_R_UINT16,
  DW_IMAGE_FORMAT_R_UINT32,
  DW_IMAGE_FORMAT_R_FLOAT16,
  DW_IMAGE_FORMAT_R_FLOAT32,
  DW_IMAGE_FORMAT_RG_INT16,
  DW_IMAGE_FORMAT_RG_UINT8,
  DW_IMAGE_FORMAT_RG_FLOAT32,
  DW_IMAGE_FORMAT_RGB_UINT8,
  DW_IMAGE_FORMAT_RGB_UINT16,
  DW_IMAGE_FORMAT_RGB_FLOAT16,
  DW_IMAGE_FORMAT_RGB_FLOAT32,
  DW_IMAGE_FORMAT_RGBA_UINT8,
  DW_IMAGE_FORMAT_RGBA_UINT16,
  DW_IMAGE_FORMAT_RGBA_FLOAT16,
  DW_IMAGE_FORMAT_RGBA_FLOAT32,
  DW_IMAGE_FORMAT_RGBX_FLOAT16 = 1200,
  DW_IMAGE_FORMAT_VUYX_UINT8,
  DW_IMAGE_FORMAT_VUYX_UINT16,
  DW_IMAGE_FORMAT_RGB_UINT8_PLANAR = 2000,
  DW_IMAGE_FORMAT_RGB_UINT16_PLANAR,
  DW_IMAGE_FORMAT_RGB_FLOAT16_PLANAR,
  DW_IMAGE_FORMAT_RGB_FLOAT32_PLANAR,
  DW_IMAGE_FORMAT_RCB_FLOAT16_PLANAR,
  DW_IMAGE_FORMAT_RCB_FLOAT32_PLANAR,
  DW_IMAGE_FORMAT_RCC_FLOAT16_PLANAR,
  DW_IMAGE_FORMAT_RCC_FLOAT32_PLANAR,
  DW_IMAGE_FORMAT_YUV420_UINT8_PLANAR = 3000,
  DW_IMAGE_FORMAT_YUV420_UINT8_SEMIPLANAR,
  DW_IMAGE_FORMAT_YUV420_UINT16_SEMIPLANAR,
  DW_IMAGE_FORMAT_YUV422_UINT8_SEMIPLANAR = 3100,
  DW_IMAGE_FORMAT_YUV_UINT8_PLANAR,
  DW_IMAGE_FORMAT_YUV_UINT16_PLANAR,
  DW_IMAGE_FORMAT_YUV422_UINT8_PACKED = 3200,
  DW_IMAGE_FORMAT_RAW_UINT16 = 4000,
  DW_IMAGE_FORMAT_RAW_FLOAT16
}
 Format of the image represented as DW_IMAGE_FORMAT_COLORSPACE(_PIXELTYPE)(_PIXELORDER) More...
 
enum  dwImageMemoryType {
  DW_IMAGE_MEMORY_TYPE_DEFAULT = 0,
  DW_IMAGE_MEMORY_TYPE_PITCH = 1,
  DW_IMAGE_MEMORY_TYPE_BLOCK = 2
}
 Specifies memory type layout. More...
 
enum  dwImageMetaDataFlags {
  DW_IMAGE_FLAGS_EMBEDDED_LINES = (1 << 2),
  DW_IMAGE_FLAGS_SENSOR_SETTINGS = (1 << 3),
  DW_IMAGE_FLAGS_FRAME_SEQUENCE_NUMBER = (1 << 4),
  DW_IMAGE_FLAGS_SYSMEM = (1 << 5),
  DW_IMAGE_FLAGS_HAS_RAW_ORDER_DESCRIPTOR = (1 << 6),
  DW_IMAGE_FLAGS_CONTROLINFO = (1 << 7),
  DW_IMAGE_FLAGS_LUMINANCE_CALIBRATED = (1 << 8),
  DW_IMAGE_FLAGS_TOTAL_WHITE_BALANCE_GAIN = (1 << 9),
  DW_IMAGE_FLAGS_GTM_SPLINE_INFO = (1 << 10),
  DW_IMAGE_FLAGS_SENSOR_TEMPERATURE = (1 << 11),
  DW_IMAGE_FLAGS_NVSCI_SURF_ATTR = (1 << 12),
  DW_IMAGE_FLAGS_MAPS_CUPVA = (1 << 13)
}
 Flags defining the meta information available in an image. More...
 

Functions

DW_API_PUBLIC dwStatus dwImage_create (dwImageHandle_t *const image, dwImageProperties properties, dwContextHandle_t const ctx)
 Creates and allocates resources for a dwImageHandle_t based on the properties passed as input. More...
 
DW_API_PUBLIC dwStatus dwImage_createAndBindBuffer (dwImageHandle_t *const image, dwImageProperties properties, void *const buffersIn[DW_MAX_IMAGE_PLANES], size_t const pitches[DW_MAX_IMAGE_PLANES], size_t const bufferCount, dwContextHandle_t const ctx)
 Creates a dwImageHandle_t based on the properties passed and binds a memory buffer provided by the application. More...
 
DW_API_PUBLIC dwStatus dwImage_createAndBindCUDAArray (dwImageHandle_t *const image, dwImageProperties properties, cudaArray_t const buffers[DW_MAX_IMAGE_PLANES], size_t const bufferCount, dwContextHandle_t const ctx)
 Creates a dwImageHandle_t based on the properties passed and binds a cudaArray_t to it. More...
 
DW_API_PUBLIC dwStatus dwImage_destroy (dwImageHandle_t const image)
 Destroys the image handle and frees any memory created by dwImage_create(). More...
 
DW_API_PUBLIC dwStatus dwImage_getProperties (dwImageProperties *const properties, dwConstImageHandle_t const image)
 Retrieves the properties of a dwImageHandle_t. More...
 
DW_API_PUBLIC dwStatus dwImage_getTimestamp (dwTime_t *const timestamp, dwConstImageHandle_t const image)
 Retrieves the timestamp of acquisition of a dwImageHandle_t. More...
 
DW_API_PUBLIC dwStatus dwImage_setTimestamp (dwTime_t const timestamp, dwImageHandle_t const image)
 Sets the timestamp of a dwImageHandle_t. More...
 
DW_API_PUBLIC dwStatus dwImage_getMetaData (dwImageMetaData *const metaData, dwConstImageHandle_t const image)
 Retrieves the metadata of a dwImageHandle_t. More...
 
DW_API_PUBLIC dwStatus dwImage_setMetaData (dwImageMetaData const *const metaData, dwImageHandle_t const image)
 Sets the metadata of a dwImageHandle_t. More...
 
DW_API_PUBLIC dwStatus dwImage_getCPU (dwImageCPU **const imageCPU, dwImageHandle_t const image)
 Retrieves the dwImageCPU of a dwImageHandle_t. More...
 
DW_API_PUBLIC dwStatus dwImage_getCUDA (dwImageCUDA **const imageCUDA, dwImageHandle_t const image)
 Retrieves the dwImageCUDA of a dwImageHandle_t. More...
 
DW_API_PUBLIC dwStatus dwImage_getNvMedia (dwImageNvMedia **imageNvMedia, dwImageHandle_t image)
 Retrieves the dwImageNvMedia of a dwImageHandle_t. More...
 
DW_API_PUBLIC dwStatus dwImage_getPixelType (dwTrivialDataType *const type, dwImageFormat const format)
 Retrieves dwTrivialDataType associated with a specific format. More...
 
DW_API_PUBLIC dwStatus dwImage_getPlaneCount (size_t *const planeCount, dwImageFormat const format)
 Retrieves number of planes of the image format. More...
 
DW_API_PUBLIC dwStatus dwImage_copyConvert (dwImageHandle_t const output, dwConstImageHandle_t const input, dwContextHandle_t const context)
 Converts CUDA or NvMedia images by copying into an output image, following the properties in the output image. More...
 
DW_API_PUBLIC dwStatus dwImage_copyConvertAsync (dwImageHandle_t const output, dwConstImageHandle_t const input, cudaStream_t const stream, dwContextHandle_t const context)
 Converts CUDA or NvMedia images by copying into an output image, following the properties in the output image. More...
 
DW_API_PUBLIC dwStatus dwImage_getDataLayout (size_t *const elementSize, size_t *const planeCount, uint32_t planeChannelCount[DW_MAX_IMAGE_PLANES], dwVector2ui planeSize[DW_MAX_IMAGE_PLANES], dwImageProperties const *const prop)
 Returns the expected data layout of an image given its properties. More...
 
DW_API_PUBLIC dwStatus dwImage_createAndBindNvSciBuf (dwImageHandle_t *const image, dwImageProperties const *properties, NvSciBufObj nvscibufObj, dwContextHandle_t const ctx)
 Creates a dwImageHandle_t based on the properties passed and binds a memory buffer provided by the application. More...
 
DW_API_PUBLIC dwStatus dwImage_getNvSciBuf (NvSciBufObj *nvSciBufObj, dwImageHandle_t image)
 Retrieve the NvSciBufObj backing the image allocation. More...