0
$\begingroup$

I have a motion signal that you can think of as a sequence of pairs (x,y); what would be the best approach to decimate this sequence at real time? I haven't found anything similar on the web and I'm still learning about dsp.

Thanks

$\endgroup$
  • $\begingroup$ Why do you need to decimate measured data? $\endgroup$ – Gluttton Mar 24 '15 at 20:33
  • $\begingroup$ For compression of course. The data as it has many (almost) duplicates, I need to resample the signal at runtime without much quality loss or aliasing. $\endgroup$ – Ramalho Mar 24 '15 at 21:20
  • $\begingroup$ I mean.. realtime. $\endgroup$ – Ramalho Mar 24 '15 at 22:24
1
$\begingroup$

Use predictive coding. If your predictor manages to guess current position based on previous recorded positions with reasonable accuracy — you can omit the recording of current position. Same predictor will also help you to reconstruct the original path.

What predictor you should use is based on the tracked object's nature. You may use a Kalman filter for example. Or you may use something really simple such as 'assume object always stays at the same place. If we are moving — record it'. Or 'assume object always travels along the straight line', etc.

If your predictor will do a good job, you can additionally use Huffman coding — small corrections of prediction errors will have shorter bit sequences, significant corrections — longer bit sequences. It will save you a huge amount of space with near-to-perfect reconstruction.

$\endgroup$
  • $\begingroup$ It's gps data! I came with an idea, splitting the signal in rectangular windows and taking the median of each window. Can you come up with a good reason to not follow this, reasonable simple approach? Thks for your feedback. I was already considering applying a kalman filter for tracking in case of signal loss, nice idea. $\endgroup$ – Ramalho Mar 25 '15 at 8:49
  • $\begingroup$ I can't, it's basically what I've proposed, with predictor "assume we always stay in the same window. If we are not - record it." The generalized approach can help you do better, if your object is more predictable than that. $\endgroup$ – Yuri Nenakhov Mar 25 '15 at 16:51
0
$\begingroup$

If the (x,y) are in depended you could decimate each separately. may be the best way for you will be to run a rough low pass filter (-.5, 1, -.5) or more aggressive one and than select every other value. If you do not know enough about characteristics of the 2D signal, you might benefit from attempting several tests with various filters before decimation. Just remember that a basic assumption is that your signal is in the lower end of the spectrum.

$\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.