DriveWorks SDK Reference

| 0.6.67 Release

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  dwImageGL
 Defines a GL texture image. 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 uint32_t GLenum
 
typedef uint32_t GLuint
 

Enumerations

enum  dwImageCUDAMemoryType {
  DW_IMAGE_CUDA_PITCH,
  DW_IMAGE_CUDA_BLOCK
}
 Specifies the CUDA memory type. More...
 
enum  dwImageMetaDataFlags {
  DW_IMAGE_FLAGS_EMBEDDED_LINES = (1 << 2),
  DW_IMAGE_FLAGS_SENSOR_SETTINGS = (1 << 3)
}
 Flags defining the meta information available in an image. More...
 
enum  dwImagePixelFormat {
  DW_IMAGE_PIXEL_FORMAT_UNKNOWN = 0,
  DW_IMAGE_R = 1000,
  DW_IMAGE_RGB = 2000,
  DW_IMAGE_RCB = 2100,
  DW_IMAGE_RCC = 2200,
  DW_IMAGE_RGBA = 3000,
  DW_IMAGE_YUV420 = 6000,
  DW_IMAGE_YUV422 = 6100,
  DW_IMAGE_RAW = 10000
}
 Specifies the pixel format of the image. More...
 
enum  dwImageType {
  DW_IMAGE_CPU = 0,
  DW_IMAGE_GL,
  DW_IMAGE_CUDA,
  DW_IMAGE_NVMEDIA
}
 Specifies the image type. More...
 

Functions

DW_API_PUBLIC dwStatus dwImage_getDataLayout (size_t *elementSize, 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 dwImageCPU_create (dwImageCPU *cpuImage, const dwImageProperties *prop)
 Allocates memory for the data of a dwImageCPU based on the dwImageProperties. More...
 
DW_API_PUBLIC dwStatus dwImageCPU_destroy (dwImageCPU *cpuImage)
 Deallocates data in a dwImageCPU. More...
 
DW_API_PUBLIC dwStatus dwImageCPU_mapToROI (dwImageCPU *dstImg, const dwImageCPU *srcImg, dwRect roi)
 Returns a dwImageCPU that is mapped to a region of interest in the data of the srcImg. More...
 
DW_API_PUBLIC dwStatus dwImageCUDA_create (dwImageCUDA *cudaImage, const dwImageProperties *prop, dwImageCUDAMemoryType layout)
 Allocates memory for the data of a dwImageCUDA based on the dwImageProperties and dwImageCUDAMemoryType memory layout. More...
 
DW_API_PUBLIC dwStatus dwImageCUDA_destroy (dwImageCUDA *cudaImage)
 Deallocates data in a dwImageCUDA. 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...
 
DW_API_PUBLIC dwStatus dwImageCUDA_setFromPitch (dwImageCUDA *result, void *devicePtr, uint32_t width, uint32_t height, size_t pitchInBytes, dwImagePixelFormat pixelFormat)
 Fill out given dwImageCUDA structure from a raw pointer. More...
 
DW_API_PUBLIC dwStatus dwImageGL_create (dwImageGL *glImage, const dwImageProperties *prop, GLenum target)
 Generates a texture for a dwImageGL based on the dwImageProperties for a GL target. More...
 
DW_API_PUBLIC dwStatus dwImageGL_destroy (dwImageGL *glImage)
 Destroys the texture in a dwImageGL. More...
 
DW_API_PUBLIC dwStatus dwImageGL_setupTexture (dwImageGL *glImg, const uint8_t *data, int32_t level, uint32_t depth)
 Sets up the texture defined in glImg->prop.tex from pixels stored in data. More...
 
DW_API_PUBLIC dwStatus dwImageNvMedia_create (dwImageNvMedia *nvmImage, const dwImageProperties *prop, const dwContextHandle_t context)
 Sets up an NvMediaImage based on the dwImageProperties for the NvMediaDevice in the current dwContext. More...
 
DW_API_PUBLIC dwStatus dwImageNvMedia_destroy (dwImageNvMedia *nvmImage)
 Destroys the texture in a dwImageNvMedia. More...
 
DW_API_PUBLIC dwStatus dwImageNvMedia_setFromImage (dwImageNvMedia *dstImage, const NvMediaImage *srcImage)
 Fills dwImageNvMedia struct based on the contents of NvMediaImage. More...