|
|
|
|
|
by mattiasfestin
1935 days ago
|
|
This is a form of compression that is made to preserve chart visual looks, if I understand it right. There is no analysis on how it bias the data with the down sample. My instinct is the algorithm looks too specialized for this one task (which is good sometimes, if used for the right task). As a thought could you not use a FFT to the frequency domain and remove the high frequency data. And then retransform it back to the time domain. Fourier transforms are used all over the place, and FFT libs are usually well optimized and can even be hardware accelerated. Without checking it, the cut off frequency would be determined by the Nyquist–Shannon sampling theorem. And should be dependent of the width of the graph in pixels. So if the graph is resized, then recompute the new down sampled timeseries from the new Nyquist–Shannon sampling limit of the new width. A sliding DFT can also be used for streaming data for realtime. |
|