46 #ifndef DW_IMAGE_IMAGE_H__ 47 #define DW_IMAGE_IMAGE_H__ 49 #include <dw/core/Config.h> 61 #if (defined LINUX || VIBRANTE) 62 #pragma GCC diagnostic push 63 #pragma GCC diagnostic ignored "-Wold-style-cast" 66 #include <cuda_runtime.h> 68 #if (defined LINUX || VIBRANTE) 69 #pragma GCC diagnostic pop 73 #include <nvmedia_image.h> 80 #define DW_MAX_IMAGE_PLANES 3 325 dwImageCUDAMemoryType layout);
493 #endif // DW_IMAGE_IMAGE_H__ dwTrivialDataType pxlType
Specifies the pixel type of the image.
Image contains valid sensor settings information, such as exposure, gain, whitebalance, etc.
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.
uint8_t * topLineData
pointer to the beginning of top and bottom lines
NVIDIA DriveWorks API: Core Types
dwImageCUDAMemoryType
Specifies the CUDA memory type.
int32_t flags
combination of multiple flags dwImageMetaDataFlags defining which of the meta fields are valid ...
float float32_t
Specifies POD types.
dwTrivialDataType
Specifies a type indicator of the underlying trivial data type.
dwVector2ui embeddedDataSize
this defines the number of rows before and after the image
#define DW_MAX_IMAGE_PLANES
Container for data lines from the camera.
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.
DW_API_PUBLIC dwStatus dwImageCUDA_destroy(dwImageCUDA *cudaImage)
Deallocates data in a dwImageCUDA.
GLuint tex
Specifies the OpenGL texture handle.
DW_API_PUBLIC dwStatus dwImageGL_destroy(dwImageGL *glImage)
Destroys the texture in a dwImageGL.
dwImageProperties prop
Specifies the properites of the image.
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...
dwImageMetaDataFlags
Flags defining the meta information available in an image.
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.
uint32_t width
Specifies the width of the image in pixels.
uint64_t dwTime_t
Specifies a timestamp unit, in microseconds.
dwImageType type
Specifies the type of image.
NVIDIA DriveWorks API: Core Methods
dwImageDataLines dataLines
embedded data lines.
dwImagePixelFormat
Specifies the pixel format of the image.
dwImageMetaData meta
additional meta information stored with the image. Not all images might provide it ...
dwTime_t timestamp_us
Specifies the time, in microseconds, when the image was acquired.
NVIDIA DriveWorks API: Core Exports
If an image was extracted from a camera, additional embedded data lines might be provided The data li...
dwImageProperties prop
Holds image properties.
dwTime_t timestamp_us
Specifies the time, in microseconds, when the image was acquired.
dwStatus
Status definition.
DW_API_PUBLIC dwStatus dwImageCPU_create(dwImageCPU *cpuImage, const dwImageProperties *prop)
Allocates memory for the data of a dwImageCPU based on the dwImageProperties.
GLenum target
Specifies the OpenGL texture target.
dwTime_t timestamp_us
Specifies the time, in microseconds, when the image was acquired.
float32_t analogGain
Specifies the analog Gain.
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.
dwImageCUDAMemoryType layout
Defines the memory layout of the image.
NvMediaImage * img
Holds the pointer to the NvMedia image.
dwImageType
Specifies the image type.
uint32_t planeCount
Specifies the plane count of the image. For interleaved images the plane count is 1...
float32_t conversionGain
Specifies the conversion Gain.
DW_API_PUBLIC dwStatus dwImageNvMedia_destroy(dwImageNvMedia *nvmImage)
Destroys the texture in a dwImageNvMedia.
dwImageProperties prop
Defines the properties of the image.
Defines a two-element unsigned-integer vector.
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.
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.
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.
Defines a GL texture image.
struct dwContextObject * dwContextHandle_t
Context handle.
DW_API_PUBLIC dwStatus dwImageCPU_destroy(dwImageCPU *cpuImage)
Deallocates data in a dwImageCPU.
dwTime_t timestamp_us
Specifies the time, in microseconds, when the image was acquired.
dwImagePixelFormat pxlFormat
Specifies the pixel format of the image.
uint32_t height
Specifies the height of the image in pixels.
float32_t exposureTime
Specifies the exposure time (microsecond)
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 dwImageCUDAMemoryTy...
DW_API_PUBLIC dwStatus dwImageNvMedia_setFromImage(dwImageNvMedia *dstImage, const NvMediaImage *srcImage)
Fills dwImageNvMedia struct based on the contents of NvMediaImage.
dwImageProperties prop
Specifies the properties of the image.
float32_t digitalGain
Specifies the digital Gain.
NVIDIA DriveWorks API: Core Status Methods
Defines the properties of the image.
Defines a CPU-based image.