Padding

Atlas 200/300/500 推理产品暂不支持。

函数功能

ImageProcessor类的图像补边接口,使用该接口申请的Image内存无需用户管理,由内部管理释放。

相关使用流程请参考补边

函数原型

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

参数说明

参数名

输入/输出

说明

inputImage

输入

输入补边前的Image类。Decode接口和其他VPC接口获取的Image类可以直接作为输入。若是用户自定义构造的Image类,则需要设置图像宽高和图像对齐后的宽高。

padDim

输入

输入图像补边的尺寸。

color

输入

输入补边三通道颜色值,仅在“borderType”设置为“BORDER_CONSTANT”时有效。

borderType

输入

输入补边方式,具体实现请参见BorderType

outputImage

输出

输出缩放后的Image类。

返回参数说明

数据结构

说明

APP_ERROR

程序执行返回的错误码,请参考APP_ERROR说明