From: <pl...@pi...> - 2007-07-01 07:43:23
|
Hi, I'll just throw this idea as a new topic since Daniel and Ethan are touching on this in the "Small technicality on dynarray" discussion but that thread is getting a bit long for me to add an /off. I think it would be very useful to add lanczos filter as an interpolation method. The existing splines are fine but have a strong tendancy to extend well outside the path of the existing data when the data has a lot of fluctuations, a common situation. Although the implementation is correct this can be very misleading when viewing data presented with this sort of "smoothing". Far from averaging out variations it often exagerates excursions and can give a visual impression of oscillations that are not truely in the data. Current devel version of Gimp contains such interpolation which is applied separatly in x and y and could probably be easily integrated into gnuplot. Each data point is derived from a weighted mean of 7 surrounding points in the source data using a precalculated look-up of the Lanczos function. It effectively applies a windowed sinc function which provides a good quality lowpass filter, the technique is convolution with an approximation to the Fourrier transform of a step function in the frequency domain. For example, the results on image processing make a better job of removing staircasing and pixelisation than the bicubic interpolation based on Catmull-Rom splines. I can give more detail and precise reference to the source if you want to follow up the idea. regards, Peter. |