Padding

The Atlas 200/300/500 inference product is not supported.

Function Usage

Image padding API of the ImageProcessor class. The memory allocated by this API does not need to be managed or destroyed by users.

For details, see Padding.

Prototype

1
APP_ERROR ImageProcessor::Padding(const Image& inputImage, Dim &padDim, const Color& color, const BorderType borderType, Image& outputImage);

Parameters

Parameter

Input/Output

Description

inputImage

Input

Input Image class before padding. The Image class obtained by the Decode API and other VPC APIs can be directly used as inputs. If the user-defined Image class is used, set the original and aligned image widths and heights.

padDim

Input

Padding size of the input image.

color

Input

Input 3-channel color values for padding. This parameter is valid only when borderType is set to BORDER_CONSTANT.

borderType

Input

Input padding method. For details, see BorderType.

outputImage

Output

Image class after padding.

Response Parameters

Data Structure

Description

APP_ERROR

For details about the returned error codes, see APP_ERROR Description.