Defines image abstractions, and streamer and format conversion APIs.
Unless explicitly specified, all errors returned by DW APIs are non recoverable and the user application should transition to fail safe mode. In addition, any error code not described in this documentation should be consider as fatal and the user application should also transition to fail safe mode.
Data Structures | |
| struct | dwImagePool |
| Specifies a pool of images. More... | |
| struct | dwImageExtParameter |
| Specifies the Image Extension parameters. More... | |
| struct | dwImageDataLines |
| Container for data lines from the camera. More... | |
| struct | dwImageSplineControlPoint |
| Control point for a global tone-map spline curve. More... | |
| struct | dwExposureDuration |
| Per-row HDR exposure durations for the captured image. More... | |
| struct | dwSensorTemperature |
| struct | dwImageSensorStatistics |
| Sensor statistics associated with the image. More... | |
| struct | dwImageRawProperties |
| struct | dwImageTimestamps |
| Image timestamps. More... | |
| struct | dwImagePIIRegions |
| Defines PII (Personally Identifiable Information) regions associated with an image. More... | |
| struct | dwImageMetaData |
| Additional meta information stored with each image. More... | |
| struct | dwImageProperties |
| Defines the properties of the image. More... | |
| struct | dwImageCPU |
| Defines a CPU-based image. More... | |
| struct | dwImageCUDA |
| Defines a CUDA image. More... | |
| struct | dwImageNvMedia |
| Defines an NvMedia image. More... | |
Modules | |
| Image Extra Interface | |
| Defines extra methods for image interface. | |
Macros | |
| #define | DW_MAX_IMAGE_PLANES 3 |
| Maximum number of image planes. More... | |
| #define | DW_ISP_MAX_COLOR_COMPONENT (4U) |
| Maximum number of ISP color components. More... | |
| #define | DW_MAX_NUM_TEMPERATURES 4 |
| should be the same as the DEVBLK_CDI_MAX_NUM_TEMPERATURES in NvSIPLCDICommon.h of NvSIPL More... | |
| #define | DW_IMAGE_NUM_SPLINE_COMPONENTS 18U |
| Number of spline components for tone mapping. More... | |
| #define | DW_MAX_COLOR_SIZE 256 |
| Maximum color channel size. More... | |
| #define | DW_DEVBLK_CDI_MAX_EXPOSURES 4 |
| Maximum number of HDR exposures per pixel row. More... | |
| #define | DW_LUMINANCE_CALIB_MATRIX_SIZE 4 |
| Defines the length(M) of a MxM luminance calibration matrix. More... | |
| #define | DW_MAX_PII_REGIONS 24 |
Typedefs | |
| typedef enum dwSyncType | dwSyncType |
| Enum representing a sync type. More... | |
| typedef enum dwImageType | dwImageType |
| Specifies the image type. More... | |
| typedef struct dwImageObject * | dwImageHandle_t |
| Handle to an image object. More... | |
| typedef struct dwImageObject const * | dwConstImageHandle_t |
| Handle to a const image object. More... | |
| typedef struct dwImageAllocationAttrList * | dwImageAllocationAttrListHandle_t |
| dwImage Allocation Attributes List More... | |
| typedef struct dwImagePool | dwImagePool |
| Specifies a pool of images. More... | |
| typedef struct dwImageExtParameter | dwImageExtParameter |
| Specifies the Image Extension parameters. More... | |
| typedef enum dwImageFormat | dwImageFormat |
| Format of the image represented as DW_IMAGE_FORMAT_COLORSPACE(_PIXELTYPE)(_PIXELORDER) More... | |
| typedef struct dwImageDataLines | dwImageDataLines |
| Container for data lines from the camera. More... | |
| typedef struct dwImageSplineControlPoint | dwImageSplineControlPoint |
| Control point for a global tone-map spline curve. More... | |
| typedef struct dwExposureDuration | dwExposureDuration |
| Per-row HDR exposure durations for the captured image. More... | |
| typedef struct dwSensorTemperature | dwSensorTemperature |
| typedef struct dwImageSensorStatistics | dwImageSensorStatistics |
| Sensor statistics associated with the image. More... | |
| typedef struct dwImageRawProperties | dwImageRawProperties |
| typedef struct dwImageTimestamps | dwImageTimestamps |
| Image timestamps. More... | |
| typedef struct dwImageMetaData | dwImageMetaData |
| Additional meta information stored with each image. More... | |
| typedef struct dwImageProperties | dwImageProperties |
| Defines the properties of the image. More... | |
| typedef struct dwImageCPU | dwImageCPU |
| Defines a CPU-based image. More... | |
| typedef struct dwImageCUDA | dwImageCUDA |
| Defines a CUDA image. More... | |
| typedef struct dwImageNvMedia | dwImageNvMedia |
| Defines an NvMedia image. More... | |
Functions | |
| 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. More... | |
| 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 application. More... | |
| 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. More... | |
| DW_API_PUBLIC dwStatus | dwImage_destroy (dwImageHandle_t const image) |
| Destroys the image handle and frees any memory created by dwImage_create(). More... | |
| DW_API_PUBLIC dwStatus | dwImage_getProperties (dwImageProperties *const properties, dwConstImageHandle_t const image) |
| Retrieves the properties of a dwImageHandle_t. More... | |
| DW_API_PUBLIC dwStatus | dwImage_getTimestamp (dwTime_t *const timestamp, dwConstImageHandle_t const image) |
| Retrieves the timestamp of acquisition of a dwImageHandle_t. More... | |
| DW_API_PUBLIC dwStatus | dwImage_setTimestamp (dwTime_t const timestamp, dwImageHandle_t const image) |
| Sets the timestamp of a dwImageHandle_t. More... | |
| DW_API_PUBLIC dwStatus | dwImage_getMetaData (dwImageMetaData *const metaData, dwConstImageHandle_t const image) |
| Retrieves the metadata of a dwImageHandle_t. More... | |
| DW_API_PUBLIC dwStatus | dwImage_setMetaData (dwImageMetaData const *const metaData, dwImageHandle_t const image) |
| Sets the metadata of a dwImageHandle_t. More... | |
| DW_API_PUBLIC dwStatus | dwImage_getCPU (dwImageCPU **const imageCPU, dwImageHandle_t const image) |
| Retrieves the dwImageCPU of a dwImageHandle_t. More... | |
| DW_API_PUBLIC dwStatus | dwImage_getCUDA (dwImageCUDA **const imageCUDA, dwImageHandle_t const image) |
| Retrieves the dwImageCUDA of a dwImageHandle_t. More... | |
| DW_API_PUBLIC dwStatus | dwImage_getNvMedia (dwImageNvMedia **imageNvMedia, dwImageHandle_t image) |
| Retrieves the dwImageNvMedia of a dwImageHandle_t. More... | |
| DW_API_PUBLIC dwStatus | dwImage_getPixelType (dwTrivialDataType *const type, dwImageFormat const format) |
| Retrieves dwTrivialDataType associated with a specific format. More... | |
| DW_API_PUBLIC dwStatus | dwImage_getPlaneCount (size_t *const planeCount, dwImageFormat const format) |
| Retrieves number of planes of the image format. More... | |
| 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 output image. More... | |
| 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 output image. More... | |
| 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. More... | |
| 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 application. More... | |
| DW_API_PUBLIC dwStatus | dwImage_getNvSciBuf (NvSciBufObj *nvSciBufObj, dwImageHandle_t image) |
| Retrieve the NvSciBufObj backing the image allocation. More... | |
| #define DW_DEVBLK_CDI_MAX_EXPOSURES 4 |
Maximum number of HDR exposures per pixel row.
Definition at line 300 of file image/Image.h.
| #define DW_IMAGE_NUM_SPLINE_COMPONENTS 18U |
Number of spline components for tone mapping.
Definition at line 82 of file image/Image.h.
| #define DW_ISP_MAX_COLOR_COMPONENT (4U) |
Maximum number of ISP color components.
Definition at line 78 of file image/Image.h.
| #define DW_LUMINANCE_CALIB_MATRIX_SIZE 4 |
Defines the length(M) of a MxM luminance calibration matrix.
Definition at line 327 of file image/Image.h.
| #define DW_MAX_COLOR_SIZE 256 |
Maximum color channel size.
Definition at line 85 of file image/Image.h.
| #define DW_MAX_IMAGE_PLANES 3 |
Maximum number of image planes.
Definition at line 76 of file image/Image.h.
| #define DW_MAX_NUM_TEMPERATURES 4 |
should be the same as the DEVBLK_CDI_MAX_NUM_TEMPERATURES in NvSIPLCDICommon.h of NvSIPL
Definition at line 80 of file image/Image.h.
| #define DW_MAX_PII_REGIONS 24 |
Definition at line 459 of file image/Image.h.
| typedef struct dwImageObject const* dwConstImageHandle_t |
Handle to a const image object.
Definition at line 101 of file image/Image.h.
| typedef struct dwExposureDuration dwExposureDuration |
Per-row HDR exposure durations for the captured image.
| typedef struct dwImageAllocationAttrList* dwImageAllocationAttrListHandle_t |
dwImage Allocation Attributes List
Definition at line 104 of file image/Image.h.
| typedef struct dwImageCPU dwImageCPU |
Defines a CPU-based image.
| typedef struct dwImageCUDA dwImageCUDA |
Defines a CUDA image.
| typedef struct dwImageDataLines dwImageDataLines |
Container for data lines from the camera.
| typedef struct dwImageExtParameter dwImageExtParameter |
Specifies the Image Extension parameters.
| typedef enum dwImageFormat dwImageFormat |
Format of the image represented as DW_IMAGE_FORMAT_COLORSPACE(_PIXELTYPE)(_PIXELORDER)
| typedef struct dwImageObject* dwImageHandle_t |
Handle to an image object.
Definition at line 99 of file image/Image.h.
| typedef struct dwImageMetaData dwImageMetaData |
Additional meta information stored with each image.
| typedef struct dwImageNvMedia dwImageNvMedia |
Defines an NvMedia image.
| typedef struct dwImagePool dwImagePool |
Specifies a pool of images.
| typedef struct dwImageProperties dwImageProperties |
Defines the properties of the image.
| typedef struct dwImageRawProperties dwImageRawProperties |
| typedef struct dwImageSensorStatistics dwImageSensorStatistics |
Sensor statistics associated with the image.
| typedef struct dwImageSplineControlPoint dwImageSplineControlPoint |
Control point for a global tone-map spline curve.
| typedef struct dwImageTimestamps dwImageTimestamps |
Image timestamps.
| typedef enum dwImageType dwImageType |
Specifies the image type.
| typedef struct dwSensorTemperature dwSensorTemperature |
| typedef enum dwSyncType dwSyncType |
Enum representing a sync type.
Currently it represents synchronization methods for NvSci based buffers with HW engines like GPU or Drive platform VIC
| enum dwImageFormat |
Format of the image represented as DW_IMAGE_FORMAT_COLORSPACE(_PIXELTYPE)(_PIXELORDER)
Definition at line 133 of file image/Image.h.
| enum dwImageMemoryType |
Specifies memory type layout.
Definition at line 214 of file image/Image.h.
| enum dwImageMetaDataFlags |
Flags defining the meta information available in an image.
Definition at line 243 of file image/Image.h.
| enum dwImageType |
Specifies the image type.
Definition at line 89 of file image/Image.h.
| enum dwSyncType |
Enum representing a sync type.
Currently it represents synchronization methods for NvSci based buffers with HW engines like GPU or Drive platform VIC
| Enumerator | |
|---|---|
| DW_SYNC_TYPE_WAITER | |
| DW_SYNC_TYPE_SIGNALER | |
Definition at line 69 of file image/Image.h.
| 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 output image.
The output image must have been memory allocated (see 'dwImage_create'). Note that both images must be of the same type. If the properties and memory layout of both images are the same, an identical copy of the input image onto the output image is performed. The sizes must match (for conversion with resize, see dwImageTransformation under dw/imageprocessing/geometry). The conversion is performed, for both image types using DW's GPU kernel implementations. For use of the VIC engine via NvMedia2D, refer to dwImageTransformation.
@req{GID-AV_REQ-6774636}
| [out] | output | A pointer to the output image. |
| [in] | input | A pointer to the input image. |
| [in] | context | The sdk context. |
| 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 output image.
The output image must have been memory allocated (see 'dwImage_create'). Note that both images must be of the same type. If the properties and memory layout of both images are the same, an identical copy of the input image onto the output image is performed. The sizes must match (for conversion with resize, see dwImageTransformation under dw/imageprocessing/geometry). The conversion is performed, for both image types using DW's GPU kernel implementations. For use of the VIC engine via NvMedia2D, refer to dwImageTransformation.
@req{GID-AV_REQ-6774636}
| [out] | output | A pointer to the output image. |
| [in] | input | A pointer to the input image. |
| [in] | stream | The CUDA stream for executing the conversion kernel. Note this is ignored in case of NvMedia |
| [in] | context | The sdk context. |
| 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.
@req{GID-AV_REQ-6774629}
| [out] | image | A handle to the image |
| [in] | properties | The image properties. |
| [in] | ctx | The DriveWorks context. |
| 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 application.
Valid only for types of DW_IMAGE_CPU and DW_IMAGE_CUDA with DW_IMAGE_LAYOUT_PITCH (or DEFAULT) layout.
| [out] | image | A handle to the image |
| [in] | properties | The image properties. |
| [in] | buffersIn | An array of pointers to individual buffers. |
| [in] | pitches | An array of pitches for each buffer. |
| [in] | bufferCount | The number of buffers (maximum is DW_MAX_IMAGE_PLANES). |
| [in] | ctx | The DriveWorks context. |
| 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.
Valid only for types of DW_IMAGE_CUDA with DW_IMAGE_LAYOUT_BLOCK layout
| [out] | image | A handle to the image |
| [in] | properties | The image properties. |
| [in] | buffers | An array of pointers to cudaArray_t. |
| [in] | bufferCount | The number of buffers (maximum is DW_MAX_IMAGE_PLANES). |
| [in] | ctx | The DriveWorks context. |
| 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 application.
@req{GID-AV_REQ-6774639} The given NvSciBufObj must have been allocated with attributes compatible with the given image properties.
| [out] | image | A handle to the image |
| [in] | properties | The image properties. |
| [in] | nvscibufObj | The NvSciBufObj to bind to. |
| [in] | ctx | The DriveWorks context. |
| DW_API_PUBLIC dwStatus dwImage_destroy | ( | dwImageHandle_t const | image | ) |
Destroys the image handle and frees any memory created by dwImage_create().
If the image was created with createAndBindX, it will unbind the memory and delete the handle without freeing the buffers
| [in] | image | A handle to the image |
| DW_API_PUBLIC dwStatus dwImage_getCPU | ( | dwImageCPU **const | imageCPU, |
| dwImageHandle_t const | image | ||
| ) |
Retrieves the dwImageCPU of a dwImageHandle_t.
The image must have CPU mapping available. This includes images created as DW_IMAGE_CPU type as well as other image types that have CPU mapping capability (e.g., through NvSci or other cross-platform mechanisms).
@req{GID-AV_REQ-6774630}
| [out] | imageCPU | A pointer to the dwImageCPU pointer |
| [in] | image | A handle to the image |
| DW_API_PUBLIC dwStatus dwImage_getCUDA | ( | dwImageCUDA **const | imageCUDA, |
| dwImageHandle_t const | image | ||
| ) |
Retrieves the dwImageCUDA of a dwImageHandle_t.
The image must have been created as a DW_IMAGE_CUDA type.
@req{GID-AV_REQ-6774630}
| [out] | imageCUDA | A pointer to the dwImageCUDA pointer |
| [in] | image | A handle to the image |
| 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.
The byte size for plane i's row is:
elementSize*planeChannelCount[i]*planeWidth[i]
| [out] | elementSize | Size in bytes of the pixel type |
| [out] | planeCount | Number of planes |
| [out] | planeChannelCount | Number of channels within each plane |
| [out] | planeSize | Size of each plane |
| [in] | prop | A pointer to the image properties to compute data layout from. |
| DW_API_PUBLIC dwStatus dwImage_getMetaData | ( | dwImageMetaData *const | metaData, |
| dwConstImageHandle_t const | image | ||
| ) |
Retrieves the metadata of a dwImageHandle_t.
@req{GID-AV_REQ-6774632}
| [out] | metaData | A pointer to the metadata |
| [in] | image | A handle to the image |
| DW_API_PUBLIC dwStatus dwImage_getNvMedia | ( | dwImageNvMedia ** | imageNvMedia, |
| dwImageHandle_t | image | ||
| ) |
Retrieves the dwImageNvMedia of a dwImageHandle_t.
The image must have been created as a DW_IMAGE_NVEMDIA type.
@req{GID-AV_REQ-6774630}
| [out] | imageNvMedia | A pointer to the dwImageNvMedia pointer |
| [in] | image | A handle to the image |
| DW_API_PUBLIC dwStatus dwImage_getNvSciBuf | ( | NvSciBufObj * | nvSciBufObj, |
| dwImageHandle_t | image | ||
| ) |
Retrieve the NvSciBufObj backing the image allocation.
| [out] | nvSciBufObj | pointer to output NvSciBufObj. |
| [in] | image | A handle to the image. |
| DW_API_PUBLIC dwStatus dwImage_getPixelType | ( | dwTrivialDataType *const | type, |
| dwImageFormat const | format | ||
| ) |
Retrieves dwTrivialDataType associated with a specific format.
| [out] | type | The datatype |
| [in] | format | The format |
| DW_API_PUBLIC dwStatus dwImage_getPlaneCount | ( | size_t *const | planeCount, |
| dwImageFormat const | format | ||
| ) |
Retrieves number of planes of the image format.
| [out] | planeCount | The plane count |
| [in] | format | The format |
| DW_API_PUBLIC dwStatus dwImage_getProperties | ( | dwImageProperties *const | properties, |
| dwConstImageHandle_t const | image | ||
| ) |
Retrieves the properties of a dwImageHandle_t.
@req{GID-AV_REQ-6774631}
| [out] | properties | A pointer to the properties |
| [in] | image | A handle to the image |
| DW_API_PUBLIC dwStatus dwImage_getTimestamp | ( | dwTime_t *const | timestamp, |
| dwConstImageHandle_t const | image | ||
| ) |
Retrieves the timestamp of acquisition of a dwImageHandle_t.
| [out] | timestamp | A pointer to the timestamp |
| [in] | image | A handle to the image |
| DW_API_PUBLIC dwStatus dwImage_setMetaData | ( | dwImageMetaData const *const | metaData, |
| dwImageHandle_t const | image | ||
| ) |
Sets the metadata of a dwImageHandle_t.
@req{GID-AV_REQ-6774635}
| [in] | metaData | A pointer to the metadata |
| [in] | image | A handle to the image |
| DW_API_PUBLIC dwStatus dwImage_setTimestamp | ( | dwTime_t const | timestamp, |
| dwImageHandle_t const | image | ||
| ) |
Sets the timestamp of a dwImageHandle_t.
@req{GID-AV_REQ-6774633} @req{GID-AV_REQ-6774634}
| [out] | timestamp | Timestamp to be set |
| [in] | image | A handle to the image |