aclmdlSetAIPPCropParams
Description
Sets cropping parameters in the dynamic AIPP scenario.
Prototype
aclError aclmdlSetAIPPCropParams(aclmdlAIPP *aippParmsSet, int8_t cropSwitch,
int32_t cropStartPosW, int32_t cropStartPosH,
int32_t cropSizeW, int32_t cropSizeH,
uint64_t batchIndex)
Restrictions
If the cropping function is enabled, the following conditions must be met for the arguments passed to the aclmdlSetAIPPSrcImageSize call and aclmdlSetAIPPCropParams call:
- cropSizeW+cropStartPosW ≤ srcImageSizeW
- cropSizeH+cropStartPosH ≤ srcImageSizeH
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
aippParmsSet |
Output |
Pointer to the dynamic AIPP parameter object. Call aclmdlCreateAIPP in advance to create data of the aclmdlAIPP type. |
cropSwitch |
Input |
Cropping enable.
|
cropStartPosW |
Input |
Horizontal coordinate of the crop start. For YUV420SP_U8, the value must be an even number. Value range: [0, 4095] |
cropStartPosH |
Input |
Vertical coordinate of the crop start. For YUV420SP_U8, the value must be an even number. Value range: [0, 4095] |
cropSizeW |
Input |
Width of the crop ROI. Value range: [1, 4096] |
cropSizeH |
Input |
Height of the crop ROI. Value range: [1, 4096] |
batchIndex |
Input |
Index of batch for image cropping. Value range: [0, batchSize) batchSize is set when data of the aclmdlAIPP type is created by the aclmdlCreateAIPP call. |
Returns
The value 0 indicates success, and other values indicate failure. For details, see aclError.