How to filter out a jumpy signal / filtering out spikes (and predicating the direction)?

Hi all,

I get a noisy, but also jumpy signal from some tracking data which I’m trying to get more smooth but still as fast reactive as possible. The flickering works perfect to reduce with the OneEuroFilter. But when it loses the tracking, the signal jumps to 0,0

I get an okayish result to filter out the jumps/spikes builing a framedifference switch replacing it for some frames with an older signal sampled from 5 frames before.

But somehow I am sure there’s a better way to do it? Any suggestions?

I was also trying to use the Levin-Node for predication of the movement instead of the sampled still position, but did not get how to use it so far.

Patch Based on the “How to filter out a noisy signal”-HelpPatch:
Filtering Out a Jumpy Signal or Spikes.vl (54.1 KB)

Thanks a lot for any suggestions.

How to filter out a jumpy signal or spikes in a signal

White circle: original signal
Blue circle: normal damper (just for better visibitity of the jumps)
Green circle: OneEuroFilter
Red circle: OneEuroFilter plus my approach (Framedifference Switch with Framedelayed sampled frame)

Can you S+H the input to stop the resetting to 0 on signal loss, and disable the graphic, if needed, to stop the jumps?

That’s actually what i am doing, so the graphic is just to visualize the signal.
The red circle is the result whoch is kinf of okay, but not perfect, as still of course it’s interrupted when moving the cursor. I was just asking myself if this is the best way to do it.

1 Like