Using exponential smoothing with NaN values
Posted
by Eric
on Stack Overflow
See other posts from Stack Overflow
or by Eric
Published on 2010-05-07T21:14:33Z
Indexed on
2010/05/07
21:18 UTC
Read the original article
Hit count: 239
I have a sample of some kind that can create somewhat noisy output. The sample is the result of some image processing from a camera, which indicates the heading of a blob of a certain color. It is an angle from around -45° to +45°, or a NaN
, which means that the blob is not actually in view.
In order to combat the noisy data, I felt that exponential smoothing would do the trick. However, I'm not sure how to handle the NaN
values.
On the one hand, involving them in the math would result in a NaN
average, which would then prevent any meaningful results. On the other hand, ignoring NaN
values completely would mean that a "no-detection" scenario would never be reported. And just to complicate things, the data is also noisy in that it can get false NaN
value, which ideally would be smoothed somehow to prevent random noise.
Any ideas about how I could implement such an exponential smoother?
© Stack Overflow or respective owner