VpcCrop

Function Usage

Implements image cropping. Before calling this API, call Init() or Init(MxbaseDvppChannelMode dvppChannelMode) to initialize this function.

Prototype

APP_ERROR VpcCrop (  
    DvppDataInfo& inputDataInfo ,  
    DvppDataInfo& outputDataInfo ,  
    CropRoiConfig& cropConfig  
);

Parameter Description

Parameter

Input/Output

Description

inputDataInfo

Input

Data to be cropped

outputDataInfo

Output

Data after cropping

cropConfig

Input

Image cropping configuration

Restrictions:

  • The value of cropConfig.x1 must be greater than that of cropConfig.x0 and cannot exceed the image width. The minimum width of the cropped image is 10 and the maximum width is the same as the image width.
  • The value of cropConfig.y1 must be greater than that of cropConfig.y0 and cannot exceed the image height. The minimum height of the cropped image is 6 and the maximum height is the same as the image height.

Return Parameter Description

Data Structure

Description

APP_ERROR

Error code returned during program execution. For details, see the MxBase/ErrorCode/ErrorCode.h file.