Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Thiago Santini
EyeRecToo
Commits
74bcbc3a
Commit
74bcbc3a
authored
Dec 23, 2017
by
Thiago Santini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds quality requirements for the calibration
parent
2f5a0af8
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
146 additions
and
12 deletions
+146
-12
EyeRecToo/src/GazeEstimation.cpp
EyeRecToo/src/GazeEstimation.cpp
+23
-4
EyeRecToo/src/GazeEstimation.h
EyeRecToo/src/GazeEstimation.h
+22
-6
EyeRecToo/src/GazeEstimationWidget.cpp
EyeRecToo/src/GazeEstimationWidget.cpp
+31
-1
EyeRecToo/src/GazeEstimationWidget.h
EyeRecToo/src/GazeEstimationWidget.h
+3
-0
EyeRecToo/src/GazeEstimationWidget.ui
EyeRecToo/src/GazeEstimationWidget.ui
+67
-1
No files found.
EyeRecToo/src/GazeEstimation.cpp
View file @
74bcbc3a
...
...
@@ -204,9 +204,14 @@ void GazeEstimation::calibrate()
interpolationHull
.
clear
();
evaluationRegions
.
clear
();
QString
error
=
"No gaze estimation method available."
;
if
(
!
gazeEstimationMethod
)
QString
error
=
""
;
if
(
!
gazeEstimationMethod
)
{
error
=
"No gaze estimation method available."
;
error
=
"No calibration tuples available."
;
qInfo
()
<<
error
;
emit
calibrationFinished
(
false
,
error
);
return
;
}
calibrationTuples
.
clear
();
...
...
@@ -253,6 +258,20 @@ void GazeEstimation::calibrate()
return
;
}
evaluate
();
if
(
centralHullCoverage
<
cfg
.
minCentralAreaCoverage
)
error
.
append
(
"Calibration didn't cover enough of the central area. "
);
if
(
peripheralHullCoverage
<
cfg
.
minPeriphericAreaCoverage
)
error
.
append
(
"Calibration didn't cover enough of the peripheric area. "
);
if
(
100
*
meanEvaluationError
>
cfg
.
maxReprojectionError
)
error
.
append
(
"Reprojection error is too high. "
);
if
(
!
error
.
isEmpty
())
{
qInfo
()
<<
error
;
emit
calibrationFinished
(
false
,
error
);
calibrated
=
false
;
return
;
}
autoVisualizationTimer
.
restart
();
emit
calibrationFinished
(
true
,
""
);
}
...
...
EyeRecToo/src/GazeEstimation.h
View file @
74bcbc3a
...
...
@@ -80,7 +80,10 @@ public:
inputType
(
GazeEstimationMethod
::
BINOCULAR_MEAN_POR
),
gazeEstimationMethod
(
"POLY_X_Y_XY_XX_YY_XYY_YXX_XXYY"
),
visualize
(
true
),
visualizationTimeS
(
5
)
visualizationTimeS
(
5
),
minCentralAreaCoverage
(
0.8
f
),
minPeriphericAreaCoverage
(
0.1
f
),
maxReprojectionError
(
4.
f
)
{}
/*
...
...
@@ -113,6 +116,10 @@ public:
double
verticalStride
;
double
rangeFactor
;
// Quality check
float
minCentralAreaCoverage
;
float
minPeriphericAreaCoverage
;
float
maxReprojectionError
;
void
save
(
QSettings
*
settings
)
{
...
...
@@ -134,6 +141,11 @@ public:
settings
->
setValue
(
"CalibMe/horizontalStride"
,
horizontalStride
);
settings
->
setValue
(
"CalibMe/verticalStride"
,
verticalStride
);
settings
->
setValue
(
"CalibMe/rangeFactor"
,
rangeFactor
);
// Quality check
settings
->
setValue
(
"quality/minCentralAreaCoverage"
,
minCentralAreaCoverage
);
settings
->
setValue
(
"quality/minPeriphericAreaCoverage"
,
minPeriphericAreaCoverage
);
settings
->
setValue
(
"quality/maxReprojectionError"
,
maxReprojectionError
);
}
void
load
(
QSettings
*
settings
)
...
...
@@ -156,6 +168,10 @@ public:
set
(
settings
,
"CalibMe/horizontalStride"
,
horizontalStride
);
set
(
settings
,
"CalibMe/verticalStride"
,
verticalStride
);
set
(
settings
,
"CalibMe/rangeFactor"
,
rangeFactor
);
set
(
settings
,
"quality/minCentralAreaCoverage"
,
minCentralAreaCoverage
);
set
(
settings
,
"quality/minPeriphericAreaCoverage"
,
minPeriphericAreaCoverage
);
set
(
settings
,
"quality/maxReprojectionError"
,
maxReprojectionError
);
}
};
...
...
EyeRecToo/src/GazeEstimationWidget.cpp
View file @
74bcbc3a
...
...
@@ -134,6 +134,18 @@ GazeEstimationWidget::GazeEstimationWidget(QWidget *parent) :
ui
->
visualizationTimeSpinBox
->
setValue
(
cfg
.
visualizationTimeS
);
ui
->
visualizationTimeSpinBox
->
blockSignals
(
false
);
ui
->
minCentralCoverage
->
blockSignals
(
true
);
ui
->
minCentralCoverage
->
setValue
(
cfg
.
minCentralAreaCoverage
);
ui
->
minCentralCoverage
->
blockSignals
(
false
);
ui
->
minPeriphericCoverage
->
blockSignals
(
true
);
ui
->
minPeriphericCoverage
->
setValue
(
cfg
.
minPeriphericAreaCoverage
);
ui
->
minPeriphericCoverage
->
blockSignals
(
false
);
ui
->
maxReprojectionError
->
blockSignals
(
true
);
ui
->
maxReprojectionError
->
setValue
(
cfg
.
maxReprojectionError
);
ui
->
maxReprojectionError
->
blockSignals
(
false
);
statusBarLabel
=
new
QLabel
();
ui
->
statusBar
->
addPermanentWidget
(
statusBarLabel
,
1000
);
...
...
@@ -468,3 +480,21 @@ void GazeEstimationWidget::updateStatus(bool status, QString msg)
}
void
GazeEstimationWidget
::
on_minCentralCoverage_editingFinished
()
{
cfg
.
minCentralAreaCoverage
=
ui
->
minCentralCoverage
->
value
();
updateConfig
();
}
void
GazeEstimationWidget
::
on_minPeriphericCoverage_editingFinished
()
{
cfg
.
minPeriphericAreaCoverage
=
ui
->
minPeriphericCoverage
->
value
();
updateConfig
();
}
void
GazeEstimationWidget
::
on_maxReprojectionError_editingFinished
()
{
cfg
.
maxReprojectionError
=
ui
->
maxReprojectionError
->
value
();
updateConfig
();
}
EyeRecToo/src/GazeEstimationWidget.h
View file @
74bcbc3a
...
...
@@ -92,6 +92,9 @@ private slots:
void
on_visualizationGroupBox_toggled
(
bool
arg1
);
void
on_visualizationTimeSpinBox_valueChanged
(
int
arg1
);
void
on_minCentralCoverage_editingFinished
();
void
on_minPeriphericCoverage_editingFinished
();
void
on_maxReprojectionError_editingFinished
();
};
#endif // GAZEESTIMATIONWIDGET_H
EyeRecToo/src/GazeEstimationWidget.ui
View file @
74bcbc3a
...
...
@@ -7,7 +7,7 @@
<x>
0
</x>
<y>
0
</y>
<width>
254
</width>
<height>
629
</height>
<height>
735
</height>
</rect>
</property>
<property
name=
"focusPolicy"
>
...
...
@@ -456,6 +456,72 @@
</layout>
</widget>
</item>
<item>
<widget
class=
"QGroupBox"
name=
"qualityGroup"
>
<property
name=
"title"
>
<string>
Success Requirements
</string>
</property>
<layout
class=
"QFormLayout"
name=
"formLayout_4"
>
<item
row=
"0"
column=
"0"
>
<widget
class=
"QLabel"
name=
"maxReprojectionErrorLabel"
>
<property
name=
"text"
>
<string>
Min. Central Coverage
</string>
</property>
</widget>
</item>
<item
row=
"0"
column=
"1"
>
<widget
class=
"QDoubleSpinBox"
name=
"minCentralCoverage"
>
<property
name=
"decimals"
>
<number>
2
</number>
</property>
<property
name=
"maximum"
>
<double>
1.000000000000000
</double>
</property>
<property
name=
"singleStep"
>
<double>
0.050000000000000
</double>
</property>
</widget>
</item>
<item
row=
"1"
column=
"0"
>
<widget
class=
"QLabel"
name=
"minPeriphericCoverageLabel"
>
<property
name=
"text"
>
<string>
Min. Peripheric Coverage
</string>
</property>
</widget>
</item>
<item
row=
"2"
column=
"0"
>
<widget
class=
"QLabel"
name=
"minCentralCoverageLabel"
>
<property
name=
"text"
>
<string>
Max. Reprojection Error
</string>
</property>
</widget>
</item>
<item
row=
"1"
column=
"1"
>
<widget
class=
"QDoubleSpinBox"
name=
"minPeriphericCoverage"
>
<property
name=
"decimals"
>
<number>
2
</number>
</property>
<property
name=
"maximum"
>
<double>
1.000000000000000
</double>
</property>
<property
name=
"singleStep"
>
<double>
0.050000000000000
</double>
</property>
</widget>
</item>
<item
row=
"2"
column=
"1"
>
<widget
class=
"QDoubleSpinBox"
name=
"maxReprojectionError"
>
<property
name=
"maximum"
>
<double>
99.000000000000000
</double>
</property>
<property
name=
"singleStep"
>
<double>
0.250000000000000
</double>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment