\[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