资 源 简 介
Savitzky-Golay filter is well-known method for smoothing data. The most accurate description I"ve found is in Numerical Recipes. My implementation does not follow exactly theirs - it does not use FFT for instance, but still gives fairly impressive results. I"ve also prepared extensive documentation and few unit tests. In the library you can also find few helpers for data pre-processing, which you can attach to filter, to assist with common data preparation chores such as:
linearizing,
padding,
eliminating zeros,
de-trending
Please refer to docs for more.
Filter usage is fairly simple:
float[] data = new float[] { 8916.81f, 8934.24f, 9027.06f, 9160.79f, 7509.14f };float[] leftPad = new float[] { 8915.06f, 8845.53f, 9064.17f, 8942.09f, 8780.87f };double[] coeffs = SGFilter.computeSGCoefficients(5, 5, 4);ContinuousPadder padder1 = new ContinuousPadder();SGFilter sgFilt