diff options
-rw-r--r-- | ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp | 2 | ||||
-rw-r--r-- | ftnoir_filter_ewma2/ftnoir_filter_ewma2.h | 1 |
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];
|