summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-08-01 18:10:53 +0200
committerStanislaw Halik <sthalik@misaki.pl>2013-08-01 18:10:53 +0200
commit8e691f0697cf76b004b4f6a69a41b7a0054af1ed (patch)
treecb4590ea97664e6e70504a4ee8b0017ad4da6b7a
parent8c9858285b1d6e070b9020a7e28dd1ce3dc2b60b (diff)
Fix ewma2 bitrot (by dbaarda)
-rw-r--r--ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp2
-rw-r--r--ftnoir_filter_ewma2/ftnoir_filter_ewma2.h1
2 files changed, 1 insertions, 2 deletions
diff --git a/ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp b/ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp
index 019da00b..3de1794a 100644
--- a/ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp
+++ b/ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp
@@ -123,7 +123,7 @@ void FTNoIR_Filter::FilterHeadPoseData(double *current_camera_position, double *
// if (newTarget) {
for (int i=0;i<6;i++)
{
- alpha[i]=1.0/(kMinSmoothing+((1.0-pow(norm_output_delta[i],kSmoothingScaleCurve))*smoothing_frames_range));
+ alpha[i]=1.0/(kMinSmoothing+((1.0-pow(norm_output_delta[i],kSmoothingScaleCurve))*(kMaxSmoothing - kMinSmoothing)));
smoothed_alpha[i]=(alpha_smoothing*alpha[i])+((1.0f-alpha_smoothing)*prev_alpha[i]);
}
// }
diff --git a/ftnoir_filter_ewma2/ftnoir_filter_ewma2.h b/ftnoir_filter_ewma2/ftnoir_filter_ewma2.h
index 910fc7c1..28824d2d 100644
--- a/ftnoir_filter_ewma2/ftnoir_filter_ewma2.h
+++ b/ftnoir_filter_ewma2/ftnoir_filter_ewma2.h
@@ -50,7 +50,6 @@ private:
double newHeadPose; // Structure with new headpose
bool first_run;
- double smoothing_frames_range;
double alpha_smoothing;
double prev_alpha[6];
double alpha[6];