This section explains how to utilize the ImageTransformation module to downscale an image's ROI.
Creating an Image
To create an image for where the output should be copied:
imgProperties.width /= 2;
imgProperties.height /= 2;
DW_API_PUBLIC dwStatus dwSensorCamera_getImageProperties(dwImageProperties *const imageProperties, dwCameraOutputType const outputType, dwSensorHandle_t const sensor)
Gets information about the image properties for a given 'dwCameraImageOutputType'.
@ DW_CAMERA_OUTPUT_NATIVE_PROCESSED
processed images (usually be YUV420 planar or RGB planar)
struct dwImageObject * dwImageHandle_t
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.
Defines the properties of the image.
Initializing the ImageTransformation Module
The dwImageTransformationHandle_t handle initializes the ImageTransformation module with the following parameters:
For a complete description of all parameters, please refer to dwImageTransformationParameters.
Performing the Transformation
dwImageTransformation_copyFullImage(imageSmall, imageInput, imageTransformationEngine);
Releasing the Handle
To release the handle:
To see a full demonstration of this workflow, please refer to Image Transformation Sample.