Skip to main content

get_data()

类说明

从Device侧申请内存,获取内存指针地址的值。

父主题: DeviceMemory类

DeviceMemory(int size)

函数功能

从Device侧申请内存。

输入参数说明

参数名类型说明
sizeint申请内存的大小,单位Byte。

返回参数说明

DeviceMemory对象。

父主题: DeviceMemory类

get_data()

函数功能

获取对象中内存指针的值。

返回参数说明

返回值类型说明
Outputint返回对象内存指针中的值。

父主题: DeviceMemory类

模块说明

dvpp模块预计于2024年退出,建议使用ImageProcessor类

父主题: dvpp模块

read_image(inputPath, deviceId, decodeFormat)

函数功能

解码读取图片。

输入输出格式及对齐方式请参见decode(inputPath, decodeFormat)

输入参数说明

参数名类型说明
inputPathstring图片路径。
deviceIdintDevice设备的ID号。
decodeFormatimage_format枚举类输入图片的解码格式。

返回参数说明

Image对象。

抛异常接口

创建ImageProcessor失败、图片解码失败,抛出runtime异常。

父主题: dvpp模块

resize(inputImage, resize, interpolation)

函数功能

图像缩放。输入输出范围及对齐方式请参见resize(inputImage, resize, interpolation)

输入参数说明

参数名类型说明
inputImageImage类输入缩放前的Image类。
resizeSize类输入图像缩放的宽高。
interpolationInterpolation参数枚举类输入图像的缩放方式,默认为“HUAWEI_HIGH_ORDER_FILTER” 。

返回参数说明

Image对象。

抛异常接口

创建ImageProcessor失败、图片缩放失败,抛出runtime异常。

父主题: dvpp模块

在线提单