|
|
NVIDIA DriveOS Linux SDK API Reference
|
7.2.5.0 Early Access Release
|
Go to the documentation of this file.
33 #ifndef DW_IMAGE_IMAGE_H_
34 #define DW_IMAGE_IMAGE_H_
42 #if (defined(__cplusplus) && (defined(LINUX) || defined(VIBRANTE)))
43 #pragma GCC diagnostic push
44 #pragma GCC diagnostic ignored "-Wold-style-cast"
47 #if (defined(__cplusplus) && (defined(LINUX) || defined(VIBRANTE)))
48 #pragma GCC diagnostic pop
55 #ifdef DW_SDK_BUILD_PVA
56 #include <cupva_host_scheduling.h>
76 #define DW_MAX_IMAGE_PLANES 3
77 #define DW_ISP_MAX_COLOR_COMPONENT (4U)
79 #define DW_MAX_NUM_TEMPERATURES 4
81 #define DW_IMAGE_NUM_SPLINE_COMPONENTS 18U
85 #define DW_MAX_COLOR_SIZE 256
300 #define DW_DEVBLK_CDI_MAX_EXPOSURES 4
327 #define DW_LUMINANCE_CALIB_MATRIX_SIZE 4
371 DW_DEPRECATED(
"This structure variable is deprecated and will be removed in the next major release. Please use the new variable in luminanceCalibrationMatrix in this struct")
459 #define DW_MAX_PII_REGIONS 24
485 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")
486 uint32_t msbPosition;
489 uint32_t frameSequenceNumber;
515 int32_t colorStdPriv;
933 size_t*
const planeCount,
938 #ifdef DW_SDK_BUILD_PVA
1006 #endif // DW_IMAGE_IMAGE_H_
#define DW_IMAGE_NUM_SPLINE_COMPONENTS
Number of spline components for tone mapping.
struct dwImageCUDA dwImageCUDA
Defines a CUDA image.
struct dwImageAllocationAttrList * dwImageAllocationAttrListHandle_t
dwImage Allocation Attributes List
@ DW_IMAGE_FLAGS_GTM_SPLINE_INFO
Image contains valid global tone map block.
@ DW_IMAGE_FORMAT_RG_UINT8
Not backed by NvSci.
struct dwImageExtParameter dwImageExtParameter
Specifies the Image Extension parameters.
@ DW_IMAGE_FORMAT_R_UINT16
Single-channel unsigned 16-bit integer.
@ DW_IMAGE_FORMAT_RGB_FLOAT16
Not backed by NvSci.
uint32_t rawBitDataType
Describes the raw pixel depth, specified like the above format descriptor by 1 - NVM_SURF_ATTR_BITS_P...
#define DW_DEVBLK_CDI_MAX_EXPOSURES
Maximum number of HDR exposures per pixel row.
@ DW_IMAGE_FLAGS_EMBEDDED_LINES
If an image was extracted from a camera, additional embedded data lines might be provided The data li...
@ DW_IMAGE_FORMAT_RGBA_UINT16
RGBA unsigned 16-bit integer.
float32_t conversionGain
Specifies the conversion Gain (scalar value)
float32_t colorAdjustmentStrength
strength of the color adjustment
@ DW_IMAGE_FORMAT_RG_INT16
Two-channel signed 16-bit integer.
@ DW_IMAGE_FORMAT_YUV420_UINT8_PLANAR
YUV encoding formats from camera.
@ DW_IMAGE_FORMAT_RGBA_FLOAT16
RGBA 16-bit floating point.
dwTime_t eofTimestampUs
Specifies the time, in microseconds, when the last row of the image was fully exposed,...
struct dwImageTimestamps dwImageTimestamps
Image timestamps.
@ DW_IMAGE_GL
This type is provided here for completeness only.
Specifies the Image Extension parameters.
DW_API_PUBLIC dwStatus dwImage_getCUDA(dwImageCUDA **const imageCUDA, dwImageHandle_t const image)
Retrieves the dwImageCUDA of a dwImageHandle_t.
bool reusePII
Boolean to indicate regions data is to be reused If set, reuse the prior pII values.
DW_API_PUBLIC dwStatus dwImage_getNvSciBuf(NvSciBufObj *nvSciBufObj, dwImageHandle_t image)
Retrieve the NvSciBufObj backing the image allocation.
float32_t autoAwbGain[DW_ISP_MAX_COLOR_COMPONENT]
Holds the total white balance gains, which includes both sensor channel and ISP gains....
@ DW_IMAGE_FLAGS_SENSOR_SETTINGS
Image contains valid sensor settings information, such as exposure, gain, whitebalance,...
bool applyToneMapping
if true, tone mapping is applied
size_t imageCount
Number of images in the pool.
dwTime_t timestamp_us
Specifies the time in microseconds from system time epoch, when the image content was updated (ie EOF...
dwImageMemoryType memoryLayout
Memory layout type.
@ DW_IMAGE_FORMAT_R_UINT8
Single-channel unsigned 8-bit integer.
Control point for a global tone-map spline curve.
@ DW_IMAGE_FORMAT_RGB_FLOAT32_PLANAR
Not backed by NvSci.
dwImageFormat
Format of the image represented as DW_IMAGE_FORMAT_COLORSPACE(_PIXELTYPE)(_PIXELORDER)
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.
uint8_t * bottomLineData
pointer to the beginning of bottom lines
float64_t luminanceCalibrationMatrix[DW_LUMINANCE_CALIB_MATRIX_SIZE][DW_LUMINANCE_CALIB_MATRIX_SIZE]
Holds the luminance calibration matrix for the sensor.
float32_t wbGain[4]
Specifies the sensor white balance gains : R(0) G1(1) G2(2) B(3) (scalar value)
dwImageProperties prop
Defines the properties of the image.
@ DW_IMAGE_FLAGS_HAS_RAW_ORDER_DESCRIPTOR
Image contains details of raw order descriptor.
struct dwImageDataLines dwImageDataLines
Container for data lines from the camera.
Defines a two-element unsigned-integer vector.
uint8_t numTemperatures
Holds the number of active temperatures.
dwExposureDuration exposureDurationUs
Specifies the exposure duration (microsecond)
@ DW_IMAGE_FORMAT_RCC_FLOAT16_PLANAR
Not backed by NvSci.
@ DW_IMAGE_FORMAT_RCB_FLOAT32_PLANAR
Not backed by NvSci.
Defines a CPU-based image.
dwImageProperties prop
Specifies the properites of the image.
dwImageType type
Specifies the type of image.
@ DW_IMAGE_FORMAT_RG_FLOAT32
Not backed by NvSci.
const WFDPipeline const WFDSource const WFDTransition const WFDRect *const const WFDuint64 timestamp
struct NvSciBufObjRefRec * NvSciBufObj
A memory object is a container holding the reconciled NvSciBufAttrList defining constraints of the bu...
@ DW_IMAGE_FORMAT_YUV422_UINT8_PACKED
YUV422 packed unsigned 8-bit integer.
@ DW_IMAGE_FORMAT_RGB_FLOAT16_PLANAR
Not backed by NvSci.
@ DW_IMAGE_FORMAT_VUYX_UINT16
Interleaved YUV444 unsigned 16-bit integer.
@ DW_IMAGE_FORMAT_R_INT16
Single-channel signed 16-bit integer.
float32_t sceneDynamicRange
Holds the scene dynamic range. (scalar value)
@ DW_IMAGE_FLAGS_MAPS_CUPVA
Image maps pointer to CUPVA.
float32_t alpha
Holds power factor for isp statistics compression. Valid range: [0.5, 1.0] (scalar value)
#define DW_ISP_MAX_COLOR_COMPONENT
Maximum number of ISP color components.
struct dwImageRawProperties dwImageRawProperties
@ DW_IMAGE_FORMAT_RGB_UINT16
Not backed by NvSci.
float32_t rawImageMidTone
Holds the midtone value of the raw image. (scalar value)
@ DW_IMAGE_FORMAT_R_UINT32
Single-channel unsigned 32-bit integer.
dwImageMetaData meta
additional meta information stored with the image. Not all images might provide it
dwSyncType
Enum representing a sync type.
float64_t luminanceCalibrationFactor
(note: parameter to be deprecated starting 6.0.7.0) Holds a luminance calibration factor ( K / f^2 ) ...
@ DW_IMAGE_FORMAT_YUV_UINT8_PLANAR
Planar YUV444 unsigned 8-bit integer.
float32_t dataCelsius[DW_MAX_NUM_TEMPERATURES]
Holds the values of active sensor temperatures in degrees Celsius.
@ DW_IMAGE_FLAGS_LUMINANCE_CALIBRATED
Holds a flag to indicating if the luminance is calibrated.
uint32_t width
Specifies the width of the image in pixels.
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...
@ DW_IMAGE_MEMORY_TYPE_BLOCK
block memory layout
@ DW_IMAGE_FORMAT_RGBA_UINT8
RGBA unsigned 8-bit integer.
#define DW_LUMINANCE_CALIB_MATRIX_SIZE
Defines the length(M) of a MxM luminance calibration matrix.
float32_t x
Holds X coordinate of the control point.
dwImageMemoryType
Specifies memory type layout.
DW_API_PUBLIC dwStatus dwImage_getNvMedia(dwImageNvMedia **imageNvMedia, dwImageHandle_t image)
Retrieves the dwImageNvMedia of a dwImageHandle_t.
bool nightMode
Holds day-night mode (true: Night mode, false: Day mode)
dwImageType
Specifies the image type.
@ DW_IMAGE_CPU
CPU-accessible image.
@ DW_IMAGE_FORMAT_RGBX_FLOAT16
RGBX 16-bit floating point.
float32_t data[DW_DEVBLK_CDI_MAX_EXPOSURES]
Specifies the exposure duration (microsecond) Each row of the image is captured using DW_DEVBLK_CDI_M...
Defines PII (Personally Identifiable Information) regions associated with an image.
@ DW_IMAGE_FORMAT_YUV422_UINT8_SEMIPLANAR
YUV422 semi-planar unsigned 8-bit integer.
uint8_t * topLineData
pointer to the beginning of top lines
@ DW_IMAGE_FORMAT_YUV420_UINT16_SEMIPLANAR
YUV420 semi-planar unsigned 16-bit integer.
DW_API_PUBLIC dwStatus dwImage_getPixelType(dwTrivialDataType *const type, dwImageFormat const format)
Retrieves dwTrivialDataType associated with a specific format.
float32_t analogGain
Specifies the analog Gain (scalar value)
@ DW_IMAGE_FORMAT_RGBA_FLOAT32
Not backed by NvSci.
dwTime_t timestamp_us
Specifies the time in microseconds from system time epoch, when the image content was updated (ie EOF...
struct dwImageCPU dwImageCPU
Defines a CPU-based image.
float32_t sceneBrightness
Holds the scene brightness level. (scalar value)
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_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_IMAGE_FORMAT_R_FLOAT32
Not backed by NvSci.
float32_t exposureTime
Specifies the exposure time (microsecond) This variable is deprecated and will be removed in the next...
dwTime_t tscEofTimestampUs
Specifies the TSC time, in microseconds, when the last row of the image was fully exposed in TSC time...
@ DW_IMAGE_FLAGS_TOTAL_WHITE_BALANCE_GAIN
Holds the total white balance gains, which includes both sensor channel and ISP gains.
dwStatus
Status definition.
#define DW_DEPRECATED(msg)
@ DW_IMAGE_FORMAT_R_FLOAT16
Single-channel 16-bit floating point.
struct dwImagePool dwImagePool
Specifies a pool of images.
#define DW_MAX_IMAGE_PLANES
Maximum number of image planes.
@ DW_IMAGE_FORMAT_RAW_FLOAT16
for debayered images
uint32_t rawFormatDescriptor
Describes the raw order and used when explicitly creating a DW_IMAGE_NVMEDIA if DW_IMAGE_FLAGS_HAS_RA...
dwImageHandle_t * images
Pointer to image handles.
@ DW_IMAGE_FORMAT_RGB_FLOAT32
Not backed by NvSci.
struct dwSensorTemperature dwSensorTemperature
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.
uint32_t msbPosition
Specifies the msb of the pixel data.
#define DW_MAX_PII_REGIONS
dwImageMetaDataFlags
Flags defining the meta information available in an image.
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...
@ DW_IMAGE_CUDA
CUDA-accessible image.
DW_API_PUBLIC dwStatus dwImage_getPlaneCount(size_t *const planeCount, dwImageFormat const format)
Retrieves number of planes of the image format.
@ DW_IMAGE_FORMAT_RGB_UINT8_PLANAR
Not backed by NvSci.
struct dwImageObject * dwImageHandle_t
Handle to an image object.
@ DW_IMAGE_FLAGS_FRAME_SEQUENCE_NUMBER
Image contains valid frame sequence number.
Defines the properties of the image.
@ DW_IMAGE_FORMAT_RCB_FLOAT16_PLANAR
Not backed by NvSci.
@ DW_IMAGE_FORMAT_RGB_UINT8
Not backed by NvSci.
Container for data lines from the camera.
float32_t brightnessKey
Holds the scene brightness key. (scalar value)
struct dwContextObject * dwContextHandle_t
Context handle.
@ DW_IMAGE_FORMAT_YUV420_UINT8_SEMIPLANAR
YUV420 semi-planar unsigned 8-bit integer.
DW_API_PUBLIC dwStatus dwImage_setTimestamp(dwTime_t const timestamp, dwImageHandle_t const image)
Sets the timestamp of a dwImageHandle_t.
@ DW_IMAGE_FORMAT_RAW_UINT16
RAW for images directly from sensory.
struct dwExposureDuration dwExposureDuration
Per-row HDR exposure durations for the captured image.
@ DW_IMAGE_NVMEDIA
NvMedia-accessible image.
@ DW_IMAGE_FLAGS_SYSMEM
By default CUDA images are created in vidmem on DGPU, this flag forces CUDA image to sysmem Note manu...
@ DW_IMAGE_FORMAT_RGB_UINT16_PLANAR
Planar RGB unsigned 16-bit integer.
float64_t slope
Holds slope of the spline curve at the control point.
DW_API_PUBLIC dwStatus dwImage_getMetaData(dwImageMetaData *const metaData, dwConstImageHandle_t const image)
Retrieves the metadata of a dwImageHandle_t.
NVIDIA Software Communications Interface (SCI) : NvSciBuf
dwTime_t moeTimestampUs
This time indicates the middle of the image frame exposure.
@ DW_IMAGE_MEMORY_TYPE_PITCH
pitch linear memory layout
dwImageFormat format
Specifies the format of the image.
DW_API_PUBLIC dwStatus dwImage_createAndBindNvSciBuf(dwImageHandle_t *const image, dwImageProperties const *properties, NvSciBufObj nvscibufObj, dwContextHandle_t const ctx)
Creates a dwImageHandle_t based on the properties passed and binds a memory buffer provided by the ap...
struct dwImageProperties dwImageProperties
Defines the properties of the image.
Specifies a pool of images.
DW_API_PUBLIC dwStatus dwImage_setMetaData(dwImageMetaData const *const metaData, dwImageHandle_t const image)
Sets the metadata of a dwImageHandle_t.
dwVector2ui embeddedDataSize
this defines the number of rows before and after the image
dwTime_t sofTimestampUs
Rolling shutter timestamp fields: startOfFrameTimestampUs and endOfFrameTimestampUs can be used to co...
struct dwImageObject const * dwConstImageHandle_t
Handle to a const image object.
struct dwImageNvMedia dwImageNvMedia
Defines an NvMedia image.
@ DW_IMAGE_FLAGS_SENSOR_TEMPERATURE
Image contains valid sensor temperature info.
@ DW_IMAGE_FORMAT_RCC_FLOAT32_PLANAR
Not backed by NvSci.
bool colorAdjustment
if true, color adjustment is applied
Per-row HDR exposure durations for the captured image.
bool rawFormatRJ
Describes if raw order alignment is left justified(msb alligned) or right justified (lsb allignment) ...
uint32_t numPIIRegions
Num Of PII Regions.
uint32_t height
Specifies the height of the image in pixels.
@ DW_IMAGE_FORMAT_UNKNOWN
Normal formats.
@ DW_IMAGE_FORMAT_VUYX_UINT8
Interleaved YUV444 unsigned 8-bit integer.
@ DW_IMAGE_FLAGS_CONTROLINFO
Holds a flag to determine whether or not the control info is valid. If no ISP processing occurs this ...
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.
#define DW_MAX_NUM_TEMPERATURES
should be the same as the DEVBLK_CDI_MAX_NUM_TEMPERATURES in NvSIPLCDICommon.h of NvSIPL
@ DW_IMAGE_FLAGS_NVSCI_SURF_ATTR
Image contains NvSci surface based attributes.
float32_t digitalGain
Specifies the digital Gain (scalar value)
DW_API_PUBLIC dwStatus dwImage_getTimestamp(dwTime_t *const timestamp, dwConstImageHandle_t const image)
Retrieves the timestamp of acquisition of a dwImageHandle_t.
float32_t const * toneMap
tone map pointer, If you are using this parameter with ImageCUDA enhancement, please allocate memory ...
struct dwImageSplineControlPoint dwImageSplineControlPoint
Control point for a global tone-map spline curve.
uint32_t bytesPerLine
Number of bytes for each line.
@ DW_IMAGE_MEMORY_TYPE_DEFAULT
the default memory layout for a given image type, can be either pitch or block
float32_t y
Holds Y coordinate of the control point.
float32_t cct
Holds the correlated color temperature. (scalar value)
Sensor statistics associated with the image.
DW_API_PUBLIC dwStatus dwImage_getProperties(dwImageProperties *const properties, dwConstImageHandle_t const image)
Retrieves the properties 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().
@ DW_IMAGE_FORMAT_YUV_UINT16_PLANAR
Planar YUV444 unsigned 16-bit integer.
dwSensorTemperature sensorTemperature
Holds the values of active sensor temperatures in degrees Celsius.