Signal Processing Asked by user674907 on November 5, 2021
Can you give some filter that is averaging an image over $N$ samples in a recursive way that only needs one frame buffer?
$frac{1}{N} sum_{k=1}^{N} y_{k}(m,n)$
I can only imagine filters that need $N-1$ frame buffers.
This is a form the recursive averaging filter: say $v_k = frac{1}{N}sum_{n=k-N+1}^{k} y_n$ is the average at $k$ over the $N$ passed frames (the notation applies to every pixel value $y$, independantly). Then:
$$v_{k+1} = frac{1}{N}sum_{n=k-N}^{k+1} y_n = frac{1}{N}(y_{k+1}-y_{k-N+1})+v_{k}$$
so you can bufferize the pixel ($y_{k-N+1}$) that leaves the $N$-length frame only. If b
is a single buffer of the past $N$th input, then the output o
could be written as:
o += (i-b)/N
The following diagram comes from Implementing a moving average (boxcar) filter, which provides full details about the algorithm.
Answered by Laurent Duval on November 5, 2021
Don't fully understand the question; your formula already describes your solution:
Done!
(Note: depending on the data type, might be advantageous to multiply every pixel with $frac1N$ before addition/move to the framebuffer pixel)
Answered by Marcus Müller on November 5, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP