49 #ifndef DW_IMAGE_IMAGE_H_ 50 #define DW_IMAGE_IMAGE_H_ 52 #include <dw/core/Config.h> 64 #if (defined(__cplusplus) && (defined(LINUX) || defined(VIBRANTE))) 65 #pragma GCC diagnostic push 66 #pragma GCC diagnostic ignored "-Wold-style-cast" 69 #include <cuda_runtime.h> 71 #if (defined(__cplusplus) && (defined(LINUX) || defined(VIBRANTE))) 72 #pragma GCC diagnostic pop 77 #include <nvmedia_image.h> 84 #define DW_MAX_IMAGE_PLANES 3 329 size_t pitches[DW_MAX_IMAGE_PLANES],
size_t bufferCount,
596 #endif // DW_IMAGE_IMAGE_H_ uint32_t frameSequenceNumber
Holds a frame sequence number, that is, a monotonically increasing frame counter. ...
Image contains valid sensor settings information, such as exposure, gain, whitebalance, etc.
dwImageMemoryType memoryLayout
Memory layout type.
uint8_t * topLineData
pointer to the beginning of top and bottom lines
NVIDIA DriveWorks API: Core Types
float float32_t
Specifies POD types.
struct dwImageObject * dwImageHandle_t
dwTrivialDataType
Specifies a type indicator of the underlying trivial data type.
dwVector2ui embeddedDataSize
this defines the number of rows before and after the image
DW_API_PUBLIC dwStatus dwImage_getNvMedia(dwImageNvMedia **imageNvMedia, dwImageHandle_t image)
Retrieves the dwImageNvMedia of a dwImageHandle_t.
#define DW_MAX_IMAGE_PLANES
Container for data lines from the camera.
DW_API_PUBLIC dwStatus dwImage_createAndBindNvMedia(dwImageHandle_t *image, NvMediaImage *nvmImage)
Creates a dwImageHandle_t based on an nvmedia image.
uint32_t msbPosition
Specifies the msb of the pixel data.
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 dwImage_getProperties(dwImageProperties *properties, dwConstImageHandle_t image)
Retrieves the properties of a dwImageHandle_t.
dwImageProperties prop
Specifies the properites of the image.
dwImageMetaDataFlags
Flags defining the meta information available in an image.
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 outp...
uint32_t width
Specifies the width of the image in pixels.
dwImageType type
Specifies the type of image.
DW_API_PUBLIC dwStatus dwImage_getTimestamp(dwTime_t *timestamp, dwConstImageHandle_t image)
Retrieves the timestamp of acquisition of a dwImageHandle_t.
NVIDIA DriveWorks API: Core Methods
pitch linear memory layout
dwImageDataLines dataLines
embedded data lines.
DW_API_PUBLIC dwStatus dwImage_getCPU(dwImageCPU **imageCPU, dwImageHandle_t image)
Retrieves the dwImageCPU of a dwImageHandle_t.
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.
DW_API_PUBLIC dwStatus dwImage_getPlaneCount(size_t *planeCount, const dwImageFormat format)
Retrieves number of planes of the image format.
If an image was extracted from a camera, additional embedded data lines might be provided The data li...
uint32_t flags
combination of multiple flags 'dwImageMetaDataFlags' defining which of the meta fields are valid ...
This type is provided here for completeness only.
Image contains valid frame sequence number.
dwImageProperties prop
Holds image properties.
dwTime_t timestamp_us
Specifies the time, in microseconds, when the image was acquired.
DW_API_PUBLIC dwStatus dwImage_getPixelType(dwTrivialDataType *type, const dwImageFormat format)
Retrieves dwTrivialDataType associated with a specific format.
dwStatus
Status definition.
dwImageFormat
Format of the image represented as DW_IMAGE_FORMAT_COLORSPACE(_PIXELTYPE)(_PIXELORDER) ...
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...
int64_t dwTime_t
Specifies a timestamp unit, in microseconds.
struct dwImageObject const * dwConstImageHandle_t
float32_t analogGain
Specifies the analog Gain.
NvMediaImage * img
Holds the pointer to the NvMedia image.
dwImageType
Specifies the image type.
DW_API_PUBLIC dwStatus dwImage_destroy(dwImageHandle_t image)
Destroys the image handle and frees any memory created by dwImage_create().
float32_t conversionGain
Specifies the conversion Gain.
DW_API_PUBLIC dwStatus dwImage_getCUDA(dwImageCUDA **imageCUDA, dwImageHandle_t image)
Retrieves the dwImageCUDA of a dwImageHandle_t.
dwImageProperties prop
Defines the properties of the image.
Defines a two-element unsigned-integer vector.
RAW for images directly from sensory.
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.
struct dwContextObject * dwContextHandle_t
Context handle.
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 ap...
dwTime_t timestamp_us
Specifies the time, in microseconds, when the image was acquired.
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...
DW_API_PUBLIC dwStatus dwImage_getMetaData(dwImageMetaData *metaData, dwConstImageHandle_t image)
Retrieves the metadata of a dwImageHandle_t.
the default memory layout for a given image type, can be either pitch or block
uint32_t height
Specifies the height of the image in pixels.
float32_t exposureTime
Specifies the exposure time (microsecond)
YUV encoding formats from camera.
NVIDIA DriveWorks API: Core Exports
dwImageMemoryType
Specifies memory type layout.
DW_API_PUBLIC dwStatus dwImage_setTimestamp(dwTime_t timestamp, dwImageHandle_t image)
Sets the timestamp of a dwImageHandle_t.
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 outp...
dwImageFormat format
Specifies the format of the image.
float32_t digitalGain
Specifies the digital Gain.
NVIDIA DriveWorks API: Core Status Methods
Defines the properties of the image.
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.
Defines a CPU-based image.