cv.accumulateWeighted - MATLAB File Help |
Updates a running average
dst = cv.accumulateWeighted(src, dst, alpha)
dst = cv.accumulateWeighted(..., 'OptionName',optionValue, ...)
uint8
, uint16
, single
, or double
, with
any number of channelssingle
or double
.The function calculates the weighted sum of the input image src
and the
accumulator dst
so that dst
becomes a running average of a frame
sequence:
dst(x,y) = (1-alpha)*dst(x,y) + alpha*src(x,y) if mask(x,y)~=0
That is, alpha
regulates the update speed (how fast the accumulator
"forgets" about earlier images). The function supports multi-channel images.
Each channel is processed independently.