summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_filter_ewma2
diff options
context:
space:
mode:
authorDonovan Baarda <abo@minkirri.apana.org.au>2014-10-15 17:22:48 +1100
committerDonovan Baarda <abo@minkirri.apana.org.au>2014-10-15 17:22:48 +1100
commiteb4ff50cfab9fe229f85236c9bca76951dd2893d (patch)
tree20987a0e9aa89404541c808d21cc38f7bbff565f /ftnoir_filter_ewma2
parent051a2e4392bc75b246cc5cb897ae0bbb1f92042e (diff)
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.
Diffstat (limited to 'ftnoir_filter_ewma2')
-rw-r--r--ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp18
1 files changed, 0 insertions, 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.