DriveWorks SDK Reference
3.5.78 Release
For Test and Development only

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

Go to the source code of this file.

Data Structures

struct  dwImageCPU
 Defines a CPU-based image. More...
 
struct  dwImageCUDA
 Defines a CUDA image. More...
 
struct  dwImageDataLines
 Container for data lines from the camera. More...
 
struct  dwImageNvMedia
 Defines an NvMedia image. More...
 
struct  dwImageProperties
 Defines the properties of the image. More...
 

Macros

#define DW_MAX_IMAGE_PLANES   3
 

Typedefs

typedef struct dwImageObject const * dwConstImageHandle_t
 
typedef struct dwImageObject * dwImageHandle_t
 
typedef uint32_t GLenum
 
typedef uint32_t GLuint
 

Enumerations

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_YUV_UINT8_PLANAR,
  DW_IMAGE_FORMAT_YUV_UINT16_PLANAR,
  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)
}
 Flags defining the meta information available in an image. More...
 
enum  dwImageType {
  DW_IMAGE_CPU = 0,
  DW_IMAGE_CUDA = 2,
  DW_IMAGE_NVMEDIA = 3,
  DW_IMAGE_GL = 0xFF
}
 Specifies the image type. More...
 

Functions

DW_API_PUBLIC dwStatus dwImage_copyConvert (dwImageHandle_t output, dwConstImageHandle_t input, dwContextHandle_t 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 output, dwConstImageHandle_t input, cudaStream_t stream, dwContextHandle_t 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_create (dwImageHandle_t *image, dwImageProperties properties, dwContextHandle_t 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 *image, dwImageProperties properties, void *buffersIn[DW_MAX_IMAGE_PLANES], size_t pitches[DW_MAX_IMAGE_PLANES], size_t bufferCount, dwContextHandle_t 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 *image, dwImageProperties properties, cudaArray_t buffers[DW_MAX_IMAGE_PLANES], size_t bufferCount, dwContextHandle_t ctx)
 Creates a dwImageHandle_t based on the properties passed and binds a cudaArray_t to it. More...
 
DW_API_PUBLIC dwStatus dwImage_createAndBindNvMedia (dwImageHandle_t *image, NvMediaImage *nvmImage)
 Creates a dwImageHandle_t based on an nvmedia image. More...
 
DW_API_PUBLIC dwStatus dwImage_destroy (dwImageHandle_t image)
 Destroys the image handle and frees any memory created by dwImage_create(). More...
 
DW_API_PUBLIC dwStatus dwImage_getCPU (dwImageCPU **imageCPU, dwImageHandle_t image)
 Retrieves the dwImageCPU of a dwImageHandle_t. More...
 
DW_API_PUBLIC dwStatus dwImage_getCUDA (dwImageCUDA **imageCUDA, dwImageHandle_t image)
 Retrieves the dwImageCUDA of a dwImageHandle_t. More...
 
DW_API_PUBLIC dwStatus dwImage_getDataLayout (size_t *elementSize, size_t *planeCount, uint32_t planeChannelCount[DW_MAX_IMAGE_PLANES], dwVector2ui planeSize[DW_MAX_IMAGE_PLANES], const dwImageProperties *prop)
 Returns the expected data layout of an image given its properties. More...
 
DW_API_PUBLIC dwStatus dwImage_getMetaData (dwImageMetaData *metaData, dwConstImageHandle_t image)
 Retrieves the metadata 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 *type, const dwImageFormat format)
 Retrieves dwTrivialDataType associated with a specific format. More...
 
DW_API_PUBLIC dwStatus dwImage_getPlaneCount (size_t *planeCount, const dwImageFormat format)
 Retrieves number of planes of the image format. More...
 
DW_API_PUBLIC dwStatus dwImage_getProperties (dwImageProperties *properties, dwConstImageHandle_t image)
 Retrieves the properties of a dwImageHandle_t. More...
 
DW_API_PUBLIC dwStatus dwImage_getTimestamp (dwTime_t *timestamp, dwConstImageHandle_t image)
 Retrieves the timestamp of acquisition of a dwImageHandle_t. More...
 
DW_API_PUBLIC dwStatus dwImage_setTimestamp (dwTime_t timestamp, dwImageHandle_t image)
 Sets the timestamp of a dwImageHandle_t. More...
 
DW_API_PUBLIC dwStatus dwImageCUDA_getPlaneAsImage (dwImageCUDA *planeImage, const dwImageCUDA *srcImage, uint32_t planeIdx)
 Returns a specific plane of a CUDA image as its own single-plane CUDA image. More...
 
DW_API_PUBLIC dwStatus dwImageCUDA_mapToROI (dwImageCUDA *dstImg, const dwImageCUDA *srcImg, dwRect roi)
 Returns a dwImageCUDA that is mapped to a region of interest in the data of the srcImg. More...