summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-06-16 03:24:11 +0200
committerStanislaw Halik <sthalik@misaki.pl>2014-06-16 03:24:11 +0200
commit68be87bc0a611fc374f10a1e9ba1d8cfda0979c4 (patch)
treea93752b390ab7298fb2ccad8bc3c4f2de6b38f4d
parent4d3df8df632d9230389fa2ffec6c4b28fa2985ff (diff)
accela: ignore whether frame is idempotent or not
-rw-r--r--ftnoir_filter_accela/ftnoir_filter_accela.cpp22
-rw-r--r--ftnoir_filter_accela/ftnoir_filter_accela.h2
2 files changed, 1 insertions, 23 deletions
diff --git a/ftnoir_filter_accela/ftnoir_filter_accela.cpp b/ftnoir_filter_accela/ftnoir_filter_accela.cpp
index 9fcf4b92..c9965f2d 100644
--- a/ftnoir_filter_accela/ftnoir_filter_accela.cpp
+++ b/ftnoir_filter_accela/ftnoir_filter_accela.cpp
@@ -31,7 +31,6 @@ void FTNoIR_Filter::FilterHeadPoseData(const double* target_camera_position,
for (int i = 0; i < 6; i++)
{
new_camera_position[i] = target_camera_position[i];
- last_input[i] = target_camera_position[i];
for (int j = 0; j < 3; j++)
last_output[j][i] = target_camera_position[i];
}
@@ -40,27 +39,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] != last_input[i])
- {
- new_frame = true;
- break;
- }
- }
-
- if (!new_frame)
- {
- for (int i = 0; i < 6; i++)
- new_camera_position[i] = last_output[0][i];
- return;
- }
-
- for (int i = 0; i < 6; i++)
- last_input[i] = target_camera_position[i];
-
for (int i=0;i<6;i++)
{
const double vec = target_camera_position[i] - last_output[0][i];
diff --git a/ftnoir_filter_accela/ftnoir_filter_accela.h b/ftnoir_filter_accela/ftnoir_filter_accela.h
index 8cf7fe66..125c1a39 100644
--- a/ftnoir_filter_accela/ftnoir_filter_accela.h
+++ b/ftnoir_filter_accela/ftnoir_filter_accela.h
@@ -48,7 +48,7 @@ public:
private:
settings s;
bool first_run;
- double last_input[6], last_output[3][6];
+ double last_output[3][6];
};
class FilterControls: public QWidget, public IFilterDialog