跳到主要内容

函数:dvpp_create_resize_config

函数:dvpp_set_roi_config_top

C函数原型aclError acldvppSetRoiConfigTop(acldvppRoiConfig *config, uint32_t top)
Python函数ret = acl.media.dvpp_set_roi_config_top(roi_config, top)
函数功能设置某个区域的位置信息:上偏移。
输入说明roi_config:int,描述某个区域位置的数据。调用acl.media.dvpp_create_roi_config接口创建的数据。 top:int,上偏移。
返回值说明ret:int,错误码。
- 返回0表示成功。
- 返回其它值表示失败。

父主题: VPC功能

函数:dvpp_set_roi_config_bottom

C函数原型aclError acldvppSetRoiConfigBottom(acldvppRoiConfig *config, uint32_t bottom)
Python函数ret = acl.media.dvpp_set_roi_config_bottom(roi_config, bottom)
函数功能设置某个区域的位置信息:下偏移。
输入说明roi_config:int,描述某个区域位置的数据。调用acl.media.dvpp_create_roi_config接口创建的数据。 bottom:int,下偏移。
返回值说明ret:int,错误码。
- 返回0表示成功。
- 返回其它值表示失败。

父主题: VPC功能

函数:dvpp_create_resize_config

C函数原型acldvppResizeConfig *acldvppCreateResizeConfig()
Python函数dvpp_resize_config = acl.media.dvpp_create_resize_config()
函数功能创建acldvppResizeConfig类型的数据,表示图片缩放配置数据。同步接口。 如需销毁acldvppResizeConfig类型的数据,请参见acl.media.dvpp_destroy_resize_config。 Atlas 200/500 A2推理产品,默认缩放算法为“业界通用的Bilinear算法”。
返回值说明dvpp_resize_config:int。
- 返回非0值,表示成功。
- 返回0,表示失败。

父主题: VPC功能

函数:dvpp_destroy_resize_config

C函数原型aclError acldvppDestroyResizeConfig(acldvppResizeConfig *resizeConfig)
Python函数ret = acl.media.dvpp_destroy_resize_config(dvpp_resize_config)
函数功能销毁通过acl.media.dvpp_create_resize_config接口创建的缩放配置数据。同步接口。
输入说明dvpp_resize_config:int,指定待销毁的数据。
返回值说明ret:int,错误码。
- 返回0表示成功。
- 返回其它值表示失败。

父主题: VPC功能

函数:dvpp_set_resize_config_interpolation

C函数原型aclError acldvppSetResizeConfigInterpolation(acldvppResizeConfig *resizeConfig, uint32_t interpolation)
Python函数ret = acl.media.dvpp_set_resize_config_interpolation(dvpp_resize_config, interpolation)
函数功能设置图片缩放算法。同步接口。
输入说明dvpp_resize_config:int,指定待设置的缩放配置数据。需提前调用acl.media.dvpp_create_resize_config接口创建acldvppResizeConfig类型的数据。 interpolation:int,指定缩放算法。此处配置的缩放算法建议与训练模型时的缩放算法保持一致。 Atlas 200/500 A2推理产品,支持如下缩放算法:
- 0:默认值,表示华为自研的高阶滤波算法。
- 1:业界通用的Bilinear算法(与OpenCV-3.4.2版本算法的计算结果相同)。
- 2:业界通用的Nearest neighbor 算法(与OpenCV-3.4.2版本算法的计算结果相同)。
- 3:业界通用的Bilinear算法(与1相同)。
- 4:业界通用的Nearest neighbor算法(与2相同)。
- 5:华为自研的高阶滤波算法。 当前该缩放算法仅支持输入图片分辨率范围为10*68192*8192、输出图片分辨率的范围为10*64096*8192;输入图片格式仅支持YUV、但不包括Planner格式、也不包括YUV400、YUV440,输出图片格式仅支持YUV420SP NV12 8bit、YUV420SP NV21 8bit;宽或高的缩放范围:[1/32, 16]。
返回值说明ret:int,错误码。
- 返回0表示成功。
- 返回其它值表示失败。

父主题: VPC功能

在线提单