This repository was archived by the owner on Jun 26, 2024. It is now read-only.
This repository was archived by the owner on Jun 26, 2024. It is now read-only.
How to convert from old version #9
Open
Description
Hey, I'm working on updating a project that used your older version of this (https://github.com/arntanguy/sgsmooth), and I'm wanting to switch it over to use this version instead. However, I've found that I have no clue how I'm supposed to get the same outcome I used to get by using this library.
Here's what I used to have:
vector<double> data = {...}; // ~900 items
int window_size = 91;
int degree = 3;
for (int i = 0; i < filter_passes; i++) {
data = sgsmooth(data, window_size, degree);
}
// data is now smoothed
I initially was going to use filter.filter(data)
, but then I found out that returned a double
instead of a vector<double>
, and I'm not sure what to do with that.
Any help would be appreciated, especially since I'm not too familiar with the actual math behind the smoothing.