feat: iterate on SsfStepDetector
* use SSF signal instead of accelerometer signal
* use higher BEAT_CORR_THR_{12} for SSF signal
* add absolute SSF_THRESHOLD to ignore small accelero bumps
* compute ssf_threshold according to detected SSF peaks, not the mean (more robust vs. noise)
This commit is contained in:
@@ -113,7 +113,7 @@ double clip(double val, double a_min, double a_max) {
|
||||
}
|
||||
|
||||
// two-dimensional mean of a collection of signals
|
||||
void mean(std::vector<double> &out, std::vector<std::vector<double> >& m) {
|
||||
template<class T> void mean_tpl(std::vector<double> &out, T& m) {
|
||||
if (m.empty()) {
|
||||
out.resize(0);
|
||||
return;
|
||||
@@ -132,4 +132,11 @@ void mean(std::vector<double> &out, std::vector<std::vector<double> >& m) {
|
||||
}
|
||||
}
|
||||
|
||||
void mean(std::vector<double> &out, std::vector<std::vector<double> >& m) {
|
||||
mean_tpl(out, m);
|
||||
}
|
||||
void mean(std::vector<double> &out, std::deque<std::vector<double> >& m) {
|
||||
mean_tpl(out, m);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user