Commit 5df14ff4 authored by Thiago Santini's avatar Thiago Santini

Always draw calibration/interpolation hull, regardless of auto evaluation status

parent 3f7b7be4
...@@ -232,6 +232,8 @@ void GazeEstimation::calibrate() ...@@ -232,6 +232,8 @@ void GazeEstimation::calibrate()
if (!calibrationTuples[i]->isOutlier()) if (!calibrationTuples[i]->isOutlier())
calibrationInliers.push_back(*calibrationTuples[i]); calibrationInliers.push_back(*calibrationTuples[i]);
updateInterpolationHull(calibrationInliers);
qInfo() << "Using" << calibrationInliers.size() << "/" << calibrationTuples.size() << "calibration tuples."; qInfo() << "Using" << calibrationInliers.size() << "/" << calibrationTuples.size() << "calibration tuples.";
if (calibrationInliers.size() <= 0) { if (calibrationInliers.size() <= 0) {
error = "No calibration tuples remaining."; error = "No calibration tuples remaining.";
...@@ -592,3 +594,14 @@ void GazeEstimation::setCalibrating(bool v) ...@@ -592,3 +594,14 @@ void GazeEstimation::setCalibrating(bool v)
isCalibrating = v; isCalibrating = v;
} }
void GazeEstimation::updateInterpolationHull(const std::vector<CollectionTuple> &tuples)
{
if (tuples.size() <= 0)
return;
vector<Point> points;
for (unsigned int i=0; i<tuples.size(); i++)
points.push_back( to2D(tuples[i].field.collectionMarker.center) );
convexHull(points, interpolationHull);
}
...@@ -213,6 +213,7 @@ private slots: ...@@ -213,6 +213,7 @@ private slots:
bool isPupilOutlineValid(const EyeData &cur); bool isPupilOutlineValid(const EyeData &cur);
void selectEvaluationTuples(const int g, const double dx, const double dy, const double rf); void selectEvaluationTuples(const int g, const double dx, const double dy, const double rf);
void updateInterpolationHull(const std::vector<CollectionTuple> &tuples);
void drawGazeEstimationInfo(DataTuple &dataTuple); void drawGazeEstimationInfo(DataTuple &dataTuple);
}; };
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment