feat: pass fps dynamically
This commit is contained in:
@@ -40,15 +40,13 @@ TEST(HelloTest, Zong_SSF_Test5_a1) {
|
||||
//std::cerr << "before stage 2" << std::endl;
|
||||
|
||||
// Stage 2: sum slope function
|
||||
const size_t upslope_width = 4;
|
||||
SsfFilter f_ssf(upslope_width);
|
||||
SsfFilter f_ssf(FPS);
|
||||
auto ssf = apply_filter(f_ssf, y_neg);
|
||||
|
||||
//std::cerr << "before stage 3" << std::endl;
|
||||
|
||||
// Stage 3: threshold detection
|
||||
const size_t len_refr = (size_t) (FPS / (MAX_BPM / 60));
|
||||
DebugSsfStepDetectorThreshold f_ssd_thr(len_refr);
|
||||
DebugSsfStepDetectorThreshold f_ssd_thr(FPS);
|
||||
auto ssf_threshold = apply_filter(f_ssd_thr, ssf);
|
||||
|
||||
//std::cerr << "before writing results 1 and doing step detection" << std::endl;
|
||||
@@ -57,7 +55,7 @@ TEST(HelloTest, Zong_SSF_Test5_a1) {
|
||||
npy_save("test5/ssf_a1_ssf.npy", ssf);
|
||||
npy_save("test5/ssf_a1_ssf_threshold.npy", ssf_threshold);
|
||||
|
||||
SsfStepDetector f_ssd(len_refr);
|
||||
SsfStepDetector f_ssd(FPS);
|
||||
auto steps = apply_filter(f_ssd, ssf);
|
||||
|
||||
//std::cerr << "before writing results 2" << std::endl;
|
||||
|
||||
Reference in New Issue
Block a user