diff options
-rw-r--r-- | ftnoir_filter_accela/ftnoir_filter_accela.cpp | 6 | ||||
-rw-r--r-- | ftnoir_filter_accela/ftnoir_filter_accela.h | 7 |
2 files changed, 7 insertions, 6 deletions
diff --git a/ftnoir_filter_accela/ftnoir_filter_accela.cpp b/ftnoir_filter_accela/ftnoir_filter_accela.cpp index a53f689e..0eb7ea7b 100644 --- a/ftnoir_filter_accela/ftnoir_filter_accela.cpp +++ b/ftnoir_filter_accela/ftnoir_filter_accela.cpp @@ -46,7 +46,6 @@ void FTNoIR_Filter::loadSettings() { iniFile.beginGroup ( "Accela" );
kMagicNumber = iniFile.value ( "Reduction", 100 ).toFloat();
kZoomSlowness = iniFile.value("zoom-slowness", 0).toFloat();
- kSmoothingFactor = iniFile.value("smoothing-factor", 1).toFloat();
iniFile.endGroup ();
}
@@ -68,7 +67,10 @@ void FTNoIR_Filter::FilterHeadPoseData(double *current_camera_position, if (first_run)
{
for (int i = 0; i < 6; i++)
+ {
new_camera_position[i] = target[i];
+ current_camera_position[i] = target[i];
+ }
first_run=false;
return;
@@ -86,7 +88,7 @@ void FTNoIR_Filter::FilterHeadPoseData(double *current_camera_position, double start = prev_output[i];
double vec = e2 - start;
int sign = vec < 0 ? -1 : 1;
- double x = fabs(vec) / kSmoothingFactor;
+ double x = fabs(vec);
QList<QPointF> points = (i >= 3 ? functionConfig : translationFunctionConfig).getPoints();
int extrapolatep = 0;
double ratio;
diff --git a/ftnoir_filter_accela/ftnoir_filter_accela.h b/ftnoir_filter_accela/ftnoir_filter_accela.h index 2e954c37..637d1a5d 100644 --- a/ftnoir_filter_accela/ftnoir_filter_accela.h +++ b/ftnoir_filter_accela/ftnoir_filter_accela.h @@ -48,17 +48,16 @@ public: FTNoIR_Filter();
~FTNoIR_Filter();
void FilterHeadPoseData(double *current_camera_position, double *target_camera_position, double *new_camera_position, double *last_post_filter_values);
- void Initialize() {}
+ void Initialize() {
+ first_run = true;
+ }
private:
void loadSettings(); // Load the settings from the INI-file
double newHeadPose[6]; // Structure with new headpose
bool first_run;
- double kFactor, kFactorTranslation;
- double kSensitivity, kSensitivityTranslation;
double kMagicNumber, kZoomSlowness; // Stanislaws' magic number (should be 100 according to him...)
- double kSmoothingFactor;
FunctionConfig functionConfig;
FunctionConfig translationFunctionConfig;
|