ConvertFormat

函数功能

ImageProcessor类的色域转换接口,使用该接口申请的Image内存无需用户管理,由内部管理释放。当前接口仅能够在Atlas 推理系列产品环境上调用。

相关使用流程请参考色域转换

函数原型

1
APP_ERROR ImageProcessor::ConvertFormat(const Image& inputImage, const ImageFormat  outputFormat, Image& outputImage);

参数说明

参数名

输入/输出

说明

inputImage

输入

输入转换前的Image类。

Decode接口和其他VPC接口获取的Image类可以直接作为输入。

输入图片宽高范围应该在32 * 6 ~ 4096 * 4096之间。

outputFormat

输入

色域转换的目标格式,支持YUV_SP_420、YVU_SP_420、RGB_888、BGR_888。

outputImage

输出

转换输出Image图像。

返回参数说明

数据结构

说明

APP_ERROR

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