Img2Num C++ (Internal Developer Docs) dev
API Documentation
Loading...
Searching...
No Matches
SavitskyGolay.h
1#ifndef SAVITZKYGOLAY_H
2#define SAVITZKYGOLAY_H
3
4#include <vector>
5
6#include "internal/Point.h"
7
8struct Point;
9
11 private:
12 int window_size_;
13 int window_radius_; // half window size
14 int poly_order_;
15 std::vector<float> coeffs_;
16
17 std::vector<std::vector<float>> invert_matrix(std::vector<std::vector<float>> A);
18 void compute_coefficients();
19
20 public:
21 SavitzkyGolay(int radius, int poly_order);
22 std::vector<Point> filter(const std::vector<Point> &data);
23 std::vector<Point> filter_wrap(const std::vector<Point> &data);
24 std::vector<float> get_coeffs() const {
25 return coeffs_;
26 }
27};
28
29#endif // SAVITZKYGOLAY_H
Definition Point.h:5