Commit 1dacb0a3 authored by Thiago Santini's avatar Thiago Santini

Mixed platform

parent 69cea0e8
...@@ -47,10 +47,10 @@ SOURCES +=\ ...@@ -47,10 +47,10 @@ SOURCES +=\
$${TOP}/src/Overlay.cpp \ $${TOP}/src/Overlay.cpp \
$${TOP}/src/CommandManager.cpp \ $${TOP}/src/CommandManager.cpp \
$${TOP}/src/ERWidget.cpp \ $${TOP}/src/ERWidget.cpp \
src/pupil-tracking/PupiTtrackingMethod.cpp \
src/pupil-tracking/PuReST.cpp \ src/pupil-tracking/PuReST.cpp \
src/pupil-detection/PuRe.cpp \ src/pupil-detection/PuRe.cpp \
src/Evaluation.cpp src/Evaluation.cpp \
src/pupil-tracking/PupilTrackingMethod.cpp
HEADERS += \ HEADERS += \
$${TOP}/src/MainWindow.h\ $${TOP}/src/MainWindow.h\
......
...@@ -126,7 +126,7 @@ void EyeImageProcessor::process(Timestamp timestamp, const Mat &frame) ...@@ -126,7 +126,7 @@ void EyeImageProcessor::process(Timestamp timestamp, const Mat &frame)
data.validPupil = true; data.validPupil = true;
} }
} }
data.processingTimestamp = gTimer.elapsed() - data.timestamp; data.processingTimestamp = gTimer.elapsed() - data.timestamp;
......
...@@ -25,7 +25,8 @@ Rect PupilDetectionMethod::coarsePupilDetection(const Mat &frame, const float &m ...@@ -25,7 +25,8 @@ Rect PupilDetectionMethod::coarsePupilDetection(const Mat &frame, const float &m
// Pupil radii is based on PuRe assumptions // Pupil radii is based on PuRe assumptions
int min_r = (int) (0.5 * 0.07 * d); int min_r = (int) (0.5 * 0.07 * d);
int max_r = (int) (0.5 * 0.29 * d); int max_r = (int) (0.5 * 0.29 * d);
int r_step = (int) max<float>( 0.2f*(max_r + min_r), 1.0f); int r_step = (int) max<float>( 0.2f*(max_r + min_r), 1.0f);
// TODO: padding so we consider the borders as well! // TODO: padding so we consider the borders as well!
/* Haar-like feature suggested by Swirski. For details, see /* Haar-like feature suggested by Swirski. For details, see
...@@ -82,6 +83,9 @@ Rect PupilDetectionMethod::coarsePupilDetection(const Mat &frame, const float &m ...@@ -82,6 +83,9 @@ Rect PupilDetectionMethod::coarsePupilDetection(const Mat &frame, const float &m
if ( response < 0.5*best_response) if ( response < 0.5*best_response)
continue; continue;
if (response < 0.5 * best_response)
continue;
if (response > best_response) if (response > best_response)
best_response = response; best_response = response;
...@@ -95,7 +99,7 @@ Rect PupilDetectionMethod::coarsePupilDetection(const Mat &frame, const float &m ...@@ -95,7 +99,7 @@ Rect PupilDetectionMethod::coarsePupilDetection(const Mat &frame, const float &m
} }
} }
auto compare = [] (const pair<Rect, float> &a, const pair<Rect,float> &b) { auto compare = [] (const pair<Rect, float> &a, const pair<Rect,float> &b) {
return (a.second > b.second); return (a.second > b.second);
}; };
sort( candidates.begin(), candidates.end(), compare); sort( candidates.begin(), candidates.end(), compare);
......
...@@ -104,7 +104,7 @@ public: ...@@ -104,7 +104,7 @@ public:
virtual Pupil getNextCandidate() { return Pupil(); } virtual Pupil getNextCandidate() { return Pupil(); }
// Generic coarse pupil detection // Generic coarse pupil detection
static cv::Rect coarsePupilDetection(const cv::Mat &frame, const float &minCoverage=0.5f, const int &workingWidth=80, const int &workingHeight=60); static cv::Rect coarsePupilDetection(const cv::Mat &frame, const float &minCoverage=0.5f, const int &workingWidth=60, const int &workingHeight=40);
// Generic confidence metrics // Generic confidence metrics
static float outlineContrastConfidence(const cv::Mat &frame, const Pupil &pupil, const int &bias=5); static float outlineContrastConfidence(const cv::Mat &frame, const Pupil &pupil, const int &bias=5);
......
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