Crops a selected ROI from the input image and loads the cropped image to the output buffer. This API is asynchronous.
The cropped image will be resized again if the size of cropArea is inconsistent with that of the canvas.
For the Ascend 310 AI Processor, the high-order filtering algorithm developed by Huawei is used by default.
For the Ascend 910 AI Processor, the high-order filtering algorithm developed by Huawei is used by default.
For the Ascend 310P AI Processor, the conventional bilinear algorithm is used by default.
For details about the restrictions on the image resolution, format, width and height alignment, and buffer of the VPC function, see Restrictions.
Because the crop ROI obtained by calling this API is directly used as the output image, its resolution must not be greater than 4096 x 4096.
aclError acldvppVpcCropAsync(acldvppChannelDesc *channelDesc,
acldvppPicDesc *inputDesc,
acldvppPicDesc *outputDesc,
acldvppRoiConfig *cropArea,
aclrtStream stream)
Parameter |
Input/Output |
Description |
|---|---|---|
channelDesc |
Input |
Pointer to the channel description. Must be the same as the channelDesc argument passed to the acldvppCreateChannel call. |
inputDesc |
Input |
Pointer to the input image information.
|
outputDesc |
Input/Output |
Pointer to the output image description. When outputDesc is used as an input, the user needs to:
|
cropArea |
Input |
Pointer to the crop ROI. Call acldvppCreateRoiConfig to create an ROI configuration. |
stream |
Input |
Stream. |
0 on successful task delivery; else, failure.
For the API call sequence, see Typical Functions of VPC.