0
$\begingroup$

On page 22 of the slide, the 1D array is [1, 1, 1, 1, 1], but the dots are uneven. Then why their values are the same? What's the value of the point that the arrow is pointing at? Though it gives Moving average in 1D: [1, 1, 1, 1, 1]/5, what exactly is that value?

$\endgroup$
5
  • $\begingroup$ [1,1,1,1,1] are the filter coefficients, not the data. You filter your input data with the [1,1,1,1,1] filter to get the output. $\endgroup$ – Ben Jul 12 '20 at 21:39
  • 1
    $\begingroup$ Oh, I see. If the input data is [a,b,c,d,e], then the output should be something like (a·1+b·1+c·1+d·1+e·1)/5, isn't it? $\endgroup$ – user8314628 Jul 12 '20 at 21:43
  • 1
    $\begingroup$ FIltering is performed with a convolution, not a simple addition $\endgroup$ – Ben Jul 12 '20 at 21:47
  • $\begingroup$ Would you mind giving an example? $\endgroup$ – user8314628 Jul 12 '20 at 21:48
  • 1
    $\begingroup$ There are examples in the link you sent... After page 22 $\endgroup$ – Ben Jul 13 '20 at 12:59
0
$\begingroup$

The illustration is showing your data (labelled as "original") and the result of convolving your moving average filter with your data (labelled as "smoothed"). The filter/kernel is [1 1 1 1 1]/5 and gives each of the five samples equal weight. Effectively, it takes the average of the five samples it overlaps with during each step of the convolution process. It can also be written as [0.2 0.2 0.2 0.2 0.2] or [1/5 1/5 1/5 1/5 1/5]. The values in this filter are the same, but you can also choose different values depending on what you wish to accomplish. In the next slide, they give the filter [1 4 6 4 1]/16. This filter gives more weight or importance to the samples that are near the center of the filter.

I hope this helps.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.