首页 > 其他分享 >动态计算平均值

动态计算平均值

时间:2023-10-12 21:33:22浏览次数:41  
标签:index 平均值 weight ++ 计算 动态 pixel size

\[weight=0 \\ mean = \frac {meam*weight+curVal}{weight+1} \]

int weight = 0;
Vec3i pixel = {0,0,0};
for(size_t index=0; index < singlePairFish->fishImgs.size(); index++){
  pixel = (pixel * weight + curPixel) / (weight + 1);
  weight++;


}

标签:index,平均值,weight,++,计算,动态,pixel,size
From: https://www.cnblogs.com/xiaohuidi/p/17760630.html

相关文章