Defines the image transformation module.
|
DW_API_PUBLIC dwStatus | dwImageTransformation_appendAllocationAttributes (dwImageProperties *const imgProps, dwImageTransformationHandle_t obj) |
| Append the allocation attribute such that the images created of type DW_IMAGE_NVMEDIA can be fed to dwImageTransformation_copyXXX() More...
|
|
DW_API_PUBLIC dwStatus | dwImageTransformation_copy (dwImageHandle_t outputImage, const dwImageHandle_t inputImage, const dwRect *outputROI, const dwRect *inputROI, dwImageTransformationHandle_t obj) |
| Resizes the input image subregion and copies the result into the previously allocated output image, in a specified subregion, of the same type (CUDA or NvMedia) and format (any) More...
|
|
DW_API_PUBLIC dwStatus | dwImageTransformation_copyFullImage (dwImageHandle_t const outputImage, dwImageHandle_t const inputImage, dwImageTransformationHandle_t const obj) |
| Resizes the input image and copies the result into the previously allocated output image, of the same type (CUDA or NvMedia) and format (any) More...
|
|
DW_API_PUBLIC dwStatus | dwImageTransformation_copySubImage (dwImageHandle_t const outputImage, dwImageHandle_t const inputImage, dwRect const inputROI, dwImageTransformationHandle_t const obj) |
| Resizes the input image sub region and copies the result into the previously allocated output image, of the same type (CUDA or NvMedia) and format (any) More...
|
|
DW_API_PUBLIC dwStatus | dwImageTransformation_getCUDAStream (cudaStream_t *stream, dwImageTransformationHandle_t obj) |
| Gets the cuda stream used by the APIs of Image Transformation. More...
|
|
DW_API_PUBLIC dwStatus | dwImageTransformation_initialize (dwImageTransformationHandle_t *handle, dwImageTransformationParameters params, dwContextHandle_t context) |
| Initializes an Image Transformation Engine. More...
|
|
DW_API_PUBLIC dwStatus | dwImageTransformation_release (dwImageTransformationHandle_t handle) |
| Releases an Image Transformation Engine. More...
|
|
DW_API_PUBLIC dwStatus | dwImageTransformation_reset (dwImageTransformationHandle_t obj) |
| Resets an Image Transformation Engine. More...
|
|
DW_API_PUBLIC dwStatus | dwImageTransformation_setBorderMode (dwImageProcessingBorderMode mode, dwImageTransformationHandle_t obj) |
| Sets the border mode used by the APIs of Image Transformation. More...
|
|
DW_API_PUBLIC dwStatus | dwImageTransformation_setCUDAStream (cudaStream_t stream, dwImageTransformationHandle_t obj) |
| Sets the cuda stream used by the APIs of Image Transformation. More...
|
|
DW_API_PUBLIC dwStatus | dwImageTransformation_setInterpolationMode (dwImageProcessingInterpolation mode, dwImageTransformationHandle_t obj) |
| Sets the interpolation mode used by the APIs of Image Transformation. More...
|
|
◆ dwImageTransformationParameters
struct dwImageTransformationParameters |
Data Fields |
bool |
ignoreAspectRatio |
Boolean indicating whether the aspect ratio of the input image should be kept (false) or the image should be stretched to the roi specified (true). Default false
|
◆ dwImageTransformationHandle_t
◆ dwImageProcessingBorderMode
border mode (valid for DW_IMAGE_CUDA types)
Enumerator |
---|
DW_IMAGEPROCESSING_BORDER_MODE_ZERO | |
DW_IMAGEPROCESSING_BORDER_MODE_MIRROR | |
DW_IMAGEPROCESSING_BORDER_MODE_REPEAT | |
DW_IMAGEPROCESSING_BORDER_MODE_WRAP | |
Definition at line 61 of file ImageProcessingCommon.h.
◆ dwImageProcessingInterpolation
interpolation mode
Enumerator |
---|
DW_IMAGEPROCESSING_INTERPOLATION_DEFAULT | simplest form of interpolation
|
DW_IMAGEPROCESSING_INTERPOLATION_LINEAR | bilinear interpolation
|
Definition at line 53 of file ImageProcessingCommon.h.
◆ dwImageTransformation_appendAllocationAttributes()
Append the allocation attribute such that the images created of type DW_IMAGE_NVMEDIA can be fed to dwImageTransformation_copyXXX()
- Parameters
-
[in,out] | imgProps | Image properties |
[in] | obj | dwImageTransformation handle |
- Note
- The imgProps are read and used to generate the allocation attributes needed by the driver. The allocation attributes are stored back into imgProps.meta.allocAttrs. Applications do not need to free or alter the imgProps.meta.allocAttrs in any way. The imgProps.meta.allocAttrs are only used by DriveWorks as needed when the given imgProps are used to allocate dwImages. If the application alters the imgProps after calling this API, the imgProps.meta.allocAttrs may no longer be applicable to the imgProps and calls related to allocating images will fail.
-
if imgProps.meta.allocAttrs does not have allocated Memory, this would be allocated by DW and will be owned by DW context until context is destroyed and should be used wisely as it the space is limited.
- Returns
- DW_NVMEDIA_ERROR - if underlying camera driver had an NvMedia error.
DW_INVALID_HANDLE - if given handle is not valid.
DW_SUCCESS
◆ dwImageTransformation_copy()
Resizes the input image subregion and copies the result into the previously allocated output image, in a specified subregion, of the same type (CUDA or NvMedia) and format (any)
- Parameters
-
[out] | outputImage | Pointer to the output image. |
[in] | inputImage | Pointer to the input image. |
[in] | outputROI | Pointer to a ROI on the output image where to copy the result. If false, defaults to the full image |
[in] | inputROI | Pointer to a ROI on the input image, where the source pixels are located. If null, defaults to the full image |
[in] | obj | Handle to the Image Transformation engine |
- Returns
- DW_INVALID_ARGUMENT if the images are invalid
DW_SUCCESS if the operation is successful
DW_CUDA_ERROR if the underlying cuda operation failed
DW_NVMEDIA_ERROR if the underlying NvMedia operation failed
◆ dwImageTransformation_copyFullImage()
Resizes the input image and copies the result into the previously allocated output image, of the same type (CUDA or NvMedia) and format (any)
- Parameters
-
[out] | outputImage | Pointer to the output image. |
[in] | inputImage | Pointer to the input image. |
[in] | obj | Handle to the Image Transformation engine |
- Returns
- DW_INVALID_ARGUMENT if the images are invalid
DW_SUCCESS if the operation is successful
DW_CUDA_ERROR if the underlying cuda operation failed
DW_NVMEDIA_ERROR if the underlying NvMedia operation failed
◆ dwImageTransformation_copySubImage()
Resizes the input image sub region and copies the result into the previously allocated output image, of the same type (CUDA or NvMedia) and format (any)
- Parameters
-
[out] | outputImage | Pointer to the output image. |
[in] | inputImage | Pointer to the input image. |
[in] | inputROI | Pointer to a ROI on the input image, where the source pixels are located. |
[in] | obj | Handle to the Image Transformation engine |
- Returns
- DW_INVALID_ARGUMENT if the images are invalid
DW_SUCCESS if the operation is successful
DW_CUDA_ERROR if the underlying cuda operation failed
DW_NVMEDIA_ERROR if the underlying NvMedia operation failed
◆ dwImageTransformation_getCUDAStream()
Gets the cuda stream used by the APIs of Image Transformation.
- Parameters
-
[out] | stream | CUDA stream |
[in] | obj | Handle to the Image Transformation engine |
- Returns
- DW_SUCCESS if the operation is successful
DW_CUDA_ERROR if the underlying cuda operation failed
◆ dwImageTransformation_initialize()
Initializes an Image Transformation Engine.
- Parameters
-
[out] | handle | Pointer to the Image Transformation Engine. |
[in] | params | parameters of image transformation. |
[in] | context | Handle to Driveworks |
- Returns
- DW_INVALID_ARGUMENT if the images are invalid
DW_SUCCESS if the operation is successful
DW_CUDA_ERROR if the underlying cuda operation failed
◆ dwImageTransformation_release()
Releases an Image Transformation Engine.
- Parameters
-
[in] | handle | Pointer to the Image Transformation Engine. |
- Returns
- DW_INVALID_ARGUMENT if the images are invalid
DW_SUCCESS if the operation is successful
DW_CUDA_ERROR if the underlying cuda operation failed
◆ dwImageTransformation_reset()
Resets an Image Transformation Engine.
- Parameters
-
[in] | obj | Pointer to the Image Transformation Engine. |
- Returns
- DW_INVALID_ARGUMENT if the images are invalid
DW_SUCCESS if the operation is successful
◆ dwImageTransformation_setBorderMode()
Sets the border mode used by the APIs of Image Transformation.
- Parameters
-
[in] | mode | Border mode |
[in] | obj | Handle to the Image Transformation engine |
- Returns
- DW_INVALID_ARGUMENT if the images are invalid
DW_SUCCESS if the operation is successful
◆ dwImageTransformation_setCUDAStream()
Sets the cuda stream used by the APIs of Image Transformation.
- Parameters
-
[in] | stream | CUDA stream |
[in] | obj | Handle to the Image Transformation engine |
- Returns
- DW_INVALID_ARGUMENT if the images are invalid
DW_SUCCESS if the operation is successful
DW_CUDA_ERROR if the underlying cuda operation failed
◆ dwImageTransformation_setInterpolationMode()
Sets the interpolation mode used by the APIs of Image Transformation.
- Parameters
-
[in] | mode | Interpolation mode |
[in] | obj | Handle to the Image Transformation engine |
- Returns
- DW_INVALID_ARGUMENT if the images are invalid
DW_SUCCESS if the operation is successful