Skip to content
This repository has been archived by the owner on Jun 26, 2024. It is now read-only.

How to convert from old version #9

Open
redxtech opened this issue May 18, 2021 · 0 comments
Open

How to convert from old version #9

redxtech opened this issue May 18, 2021 · 0 comments

Comments

@redxtech
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants