padding
函数功能
ImageProcessor类的图像处理补边接口,输入输出格式、分辨率范围请参见Padding。
函数原型
padding(inputImage: Image, padDim: Dim, color: Color, borderType: borderType)
输入参数说明
参数名 |
类型 |
说明 |
---|---|---|
inputImage |
Image类 |
输入补边前的Image类。 |
padDim |
Dim类 |
输入图像补边的尺寸。 |
color |
Color类 |
输入补边三通道颜色,仅在“borderType”设置为“BORDER_CONSTANT”时有效。 |
borderType |
borderType参数枚举类 |
输入补边方式。具体请参见borderType补边方式枚举类型。 |
返回参数说明
返回补边后的Image类。
抛异常接口
补边失败,抛出runtime异常。
父主题: ImageProcessor