50 #ifndef DW_IMAGE_IMAGE_H_ 51 #define DW_IMAGE_IMAGE_H_ 65 #if (defined(__cplusplus) && (defined(LINUX) || defined(VIBRANTE))) 66 #pragma GCC diagnostic push 67 #pragma GCC diagnostic ignored "-Wold-style-cast" 70 #include <cuda_runtime.h> 72 #if (defined(__cplusplus) && (defined(LINUX) || defined(VIBRANTE))) 73 #pragma GCC diagnostic pop 78 #include <nvmedia_image.h> 79 #include <nvmedia_isp_stat.h> 86 #define DW_MAX_IMAGE_PLANES 3 87 #define DW_ISP_MAX_COLOR_COMPONENT (4U) 90 #define DW_MAX_NUM_TEMPERATURES 4 320 DW_DEPRECATED(
"This structure variable is deprecated and will be removed in the next major release. Please use the new variable in sensorStatistics in this struct");
324 DW_DEPRECATED(
"This structure variable is deprecated and will be removed in the next major release. Please use the new variable in sensorStatistics in this struct");
328 DW_DEPRECATED(
"This structure variable is deprecated and will be removed in the next major release. Please use the new variable in sensorStatistics in this struct");
332 DW_DEPRECATED(
"This structure variable is deprecated and will be removed in the next major release. Please use the new variable in sensorStatistics in this struct");
335 float32_t wbGain[4]
DW_DEPRECATED(
"This structure variable is deprecated and will be removed in the next major release. Please use the new variable in sensorStatistics in this struct");
339 DW_DEPRECATED(
"This structure variable is deprecated and will be removed in the next major release. Please use the new variable in rawProperties in this struct");
419 DW_DEPRECATED(
"NvMediaImage is deprecated and will be removed in the next major release.");
461 size_t const pitches[DW_MAX_IMAGE_PLANES],
size_t const bufferCount,
697 uint32_t
const planeIdx);
730 size_t*
const planeCount,
740 #endif // DW_IMAGE_IMAGE_H_ NVIDIA DriveWorks API: Core Types
uint32_t frameSequenceNumber
Holds a frame sequence number, that is, a monotonically increasing frame counter. ...
Holds a flag to determine whether or not the control info is valid. If no ISP processing occurs this ...
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 ap...
Image contains valid sensor temperature info.
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 outp...
Image contains valid sensor settings information, such as exposure, gain, whitebalance, etc.
dwImageMemoryType memoryLayout
Memory layout type.
float32_t x
Holds X coordinate of the control point.
DW_API_PUBLIC dwStatus dwImageCUDA_mapToROI(dwImageCUDA *const dstImg, dwImageCUDA const *const srcImg, dwRect const roi)
Returns a dwImageCUDA that is mapped to a region of interest in the data of the srcImg.
uint8_t * topLineData
pointer to the beginning of top and bottom lines
float32_t conversionGain
Specifies the conversion Gain.
Sensor statistics associated with the image.
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.
Holds a flag to indicating if the luminance is calibrated.
DW_API_PUBLIC dwStatus dwImage_createAndBindNvMedia(dwImageHandle_t *image, NvMediaImage *nvmImage)
Creates a dwImageHandle_t based on an nvmedia image.
By default CUDA images are created in vidmem on DGPU, this flag forces CUDA image to sysmem Note manu...
DW_API_PUBLIC dwStatus dwImage_getTimestamp(dwTime_t *const timestamp, dwConstImageHandle_t const image)
Retrieves the timestamp of acquisition of a dwImageHandle_t.
struct dwImageAllocationAttrList * dwImageAllocationAttrListHandle_t
float32_t cct
Holds the correlated color temperature.
float32_t rawImageMidTone
Holds the midtone value of the raw image.
DW_API_PUBLIC dwStatus dwImage_getCUDA(dwImageCUDA **const imageCUDA, dwImageHandle_t const image)
Retrieves the dwImageCUDA of a dwImageHandle_t.
float32_t y
Holds Y coordinate of the control point.
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...
dwImageProperties prop
Specifies the properites of the image.
Specifies a pool of images.
dwImageMetaDataFlags
Flags defining the meta information available in an image.
uint32_t width
Specifies the width of the image in pixels.
dwImageType type
Specifies the type of image.
DW_API_PUBLIC dwStatus dwImage_getMetaData(dwImageMetaData *const metaData, dwConstImageHandle_t const image)
Retrieves the metadata of a dwImageHandle_t.
DW_API_PUBLIC dwStatus dwImage_getProperties(dwImageProperties *const properties, dwConstImageHandle_t const image)
Retrieves the properties of a dwImageHandle_t.
pitch linear memory layout
float32_t brightnessKey
Holds the scene brightness key.
dwImageDataLines dataLines
embedded data lines.
float32_t digitalGain
Specifies the digital Gain.
float64_t luminanceCalibrationFactor
Holds luminance constant (aperture^2/Kc) value for calibrated camera.
dwImageMetaData meta
additional meta information stored with the image. Not all images might provide it ...
DW_API_PUBLIC dwStatus dwImageCUDA_getPlaneAsImage(dwImageCUDA *const planeImage, dwImageCUDA const *const srcImage, uint32_t const planeIdx)
Returns a specific plane of a CUDA image as its own single-plane CUDA image.
dwTime_t timestamp_us
Specifies the time, in microseconds, when the image was acquired.
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.
Image contains details of raw order descriptor.
dwImageProperties prop
Holds image properties.
dwTime_t timestamp_us
Specifies the time, in microseconds, when the image was acquired.
uint32_t rawFormatDescriptor
Describes the raw order and used when explicitly creating a DW_IMAGE_NVMEDIA if DW_IMAGE_FLAGS_HAS_RA...
dwStatus
Status definition.
dwImageFormat
Format of the image represented as DW_IMAGE_FORMAT_COLORSPACE(_PIXELTYPE)(_PIXELORDER) ...
DW_API_PUBLIC dwStatus dwImage_getPixelType(dwTrivialDataType *const type, dwImageFormat const format)
Retrieves dwTrivialDataType associated with a specific format.
int64_t dwTime_t
Specifies a timestamp unit, in microseconds.
#define DW_DEPRECATED(msg)
struct dwImageObject const * dwConstImageHandle_t
DW_API_PUBLIC dwStatus dwImage_setTimestamp(dwTime_t const timestamp, dwImageHandle_t const image)
Sets the timestamp of a dwImageHandle_t.
dwImageType
Specifies the image type.
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.
uint32_t rawBitDataType
Describes the raw pixel depth, specified like the above format descriptor by NVM_SURF_ATTR_BITS_PER_C...
DW_API_PUBLIC dwStatus dwImage_getCPU(dwImageCPU **const imageCPU, dwImageHandle_t const image)
Retrieves the dwImageCPU of a dwImageHandle_t.
DW_API_PUBLIC dwStatus dwImage_destroy(dwImageHandle_t const image)
Destroys the image handle and frees any memory created by dwImage_create().
dwImageProperties prop
Defines the properties of the image.
uint8_t numTemperatures
Holds the number of active temperatures.
Defines a two-element unsigned-integer vector.
dwImageSensorStatistics sensorStatistics
Holds info on sensor statistics at the time of the image capture.
RAW for images directly from sensory.
#define DW_MAX_NUM_TEMPERATURES
should be the same as the DEVBLK_CDI_MAX_NUM_TEMPERATURES in NvSIPLCDICommon.h of NvSIPL ...
dwImageRawProperties rawProperties
#define DW_ISP_MAX_COLOR_COMPONENT
uint32_t msbPosition
Specifies the msb of the pixel data.
float32_t analogGain
Specifies the analog Gain.
float32_t alpha
Holds power factor for isp statistics compression. Valid range: [0.5, 1.0].
struct dwContextObject * dwContextHandle_t
Context handle.
NVIDIA DriveWorks API: Core Methods
float32_t exposureTime
Specifies the exposure time (microsecond)
dwTime_t timestamp_us
Specifies the time, in microseconds, when the image was acquired.
float64_t slope
Holds slope of the spline curve at the control point.
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.
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...
YUV encoding formats from camera.
dwImageMemoryType
Specifies memory type layout.
DW_API_PUBLIC dwStatus dwImage_setMetaData(dwImageMetaData const *const metaData, dwImageHandle_t const image)
Sets the metadata of a dwImageHandle_t.
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 outp...
DW_API_PUBLIC dwStatus dwImage_getPlaneCount(size_t *const planeCount, dwImageFormat const format)
Retrieves number of planes of the image format.
Holds the total white balance gains, which includes both sensor channel and ISP gains.
Image contains valid global tone map block.
dwImageAllocationAttrListHandle_t allocAttrs
Allocation attributes used by internal drivers.
dwImageFormat format
Specifies the format of the image.
NVIDIA DriveWorks API: Core Status Methods
Defines the properties of the image.
NVIDIA DriveWorks API: Core Exports
Defines a CPU-based image.