From eb4ff50cfab9fe229f85236c9bca76951dd2893d Mon Sep 17 00:00:00 2001 From: Donovan Baarda Date: Wed, 15 Oct 2014 17:22:48 +1100 Subject: Remove unnecessary and faulty new_frame detection. This would only detect a non-new-frame when the camera input equalled the filtered output, which would only happen after a long period of no movement or noise. It also is not recommended for this type of filter. --- ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp b/ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp index c7169faa..d4aa62b0 100644 --- a/ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp +++ b/ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp @@ -54,24 +54,6 @@ void FTNoIR_Filter::FilterHeadPoseData(const double *target_camera_position, return; } - bool new_frame = false; - - for (int i = 0; i < 6; i++) - { - if (target_camera_position[i] != current_camera_position[i]) - { - new_frame = true; - break; - } - } - - if (!new_frame) - { - for (int i = 0; i < 6; i++) - new_camera_position[i] = current_camera_position[i]; - return; - } - // Calculate the new camera position. for (int i=0;i<6;i++) { // Calculate the current and smoothed delta. -- cgit v1.2.3