昇腾社区首页
中文
注册

函数:set_aipp_dtc_pixel_mean

产品支持情况

产品

是否支持

Atlas A3 训练系列产品 / Atlas A3 推理系列产品

Atlas A2 训练系列产品 / Atlas 800I A2 推理产品 /A200I A2 Box 异构组件

Atlas 训练系列产品

Atlas 推理系列产品

Atlas 200I/500 A2 推理产品

Atlas 200/300/500 推理产品

功能说明

动态AIPP场景下,设置通道的均值。

函数原型

  • C函数原型
    1
    aclError aclmdlSetAIPPDtcPixelMean(aclmdlAIPP *aippParmsSet, int16_t dtcPixelMeanChn0, int16_t dtcPixelMeanChn1, int16_t dtcPixelMeanChn2, int16_t dtcPixelMeanChn3, uint64_t batchIndex)
    
  • python函数
    1
    ret = acl.mdl.set_aipp_dtc_pixel_mean(aipp_parms_set, dtc_pixel_mean_chn0, dtc_pixel_mean_chn1, dtc_pixel_mean_chn2, dtc_pixel_mean_chn3, batch_index)
    

参数说明

参数名

说明

aipp_parms_set

int,动态AIPP参数对象的指针地址,需提前调用acl.mdl.create_aipp接口创建aclmdlAIPP类型的数据。

dtc_pixel_mean_chn0

int,通道0的均值,取值范围:[0, 255]。

dtc_pixel_mean_chn1

int,通道1的均值,取值范围:[0, 255]。

dtc_pixel_mean_chn2

int,通道2的均值,取值范围:[0, 255]。

dtc_pixel_mean_chn3

int,通道3的均值,如果只有3个通道,则该参数传默认值0。取值范围:[0, 255]。

batch_index

int,指定对第几个Batch上的图片设置通道均值,默认为0,取值范围:[0, batch_size),batch_size是在调用acl.mdl.create_aipp接口创建aclmdlAIPP类型的数据时设置。

返回值说明

返回值

说明

ret

int,错误码

  • 返回0表示成功。
  • 返回其它值表示失败。