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
1dacb0a3
Commit
1dacb0a3
authored
Dec 23, 2017
by
Thiago Santini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mixed platform
parent
69cea0e8
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
6 deletions
+10
-6
EyeRecToo/EyeRecToo.pro
EyeRecToo/EyeRecToo.pro
+2
-2
EyeRecToo/src/EyeImageProcessor.cpp
EyeRecToo/src/EyeImageProcessor.cpp
+1
-1
EyeRecToo/src/pupil-detection/PupilDetectionMethod.cpp
EyeRecToo/src/pupil-detection/PupilDetectionMethod.cpp
+6
-2
EyeRecToo/src/pupil-detection/PupilDetectionMethod.h
EyeRecToo/src/pupil-detection/PupilDetectionMethod.h
+1
-1
EyeRecToo/src/pupil-tracking/PupilTrackingMethod.cpp
EyeRecToo/src/pupil-tracking/PupilTrackingMethod.cpp
+0
-0
No files found.
EyeRecToo/EyeRecToo.pro
View file @
1dacb0a3
...
...
@@ -47,10 +47,10 @@ SOURCES +=\
$$
{
TOP
}
/
src
/
Overlay
.
cpp
\
$$
{
TOP
}
/
src
/
CommandManager
.
cpp
\
$$
{
TOP
}
/
src
/
ERWidget
.
cpp
\
src
/
pupil
-
tracking
/
PupiTtrackingMethod
.
cpp
\
src
/
pupil
-
tracking
/
PuReST
.
cpp
\
src
/
pupil
-
detection
/
PuRe
.
cpp
\
src
/
Evaluation
.
cpp
src
/
Evaluation
.
cpp
\
src
/
pupil
-
tracking
/
PupilTrackingMethod
.
cpp
HEADERS
+=
\
$$
{
TOP
}
/
src
/
MainWindow
.
h
\
...
...
EyeRecToo/src/EyeImageProcessor.cpp
View file @
1dacb0a3
...
...
@@ -126,7 +126,7 @@ void EyeImageProcessor::process(Timestamp timestamp, const Mat &frame)
data
.
validPupil
=
true
;
}
}
}
data
.
processingTimestamp
=
gTimer
.
elapsed
()
-
data
.
timestamp
;
...
...
EyeRecToo/src/pupil-detection/PupilDetectionMethod.cpp
View file @
1dacb0a3
...
...
@@ -25,7 +25,8 @@ Rect PupilDetectionMethod::coarsePupilDetection(const Mat &frame, const float &m
// Pupil radii is based on PuRe assumptions
int
min_r
=
(
int
)
(
0.5
*
0.07
*
d
);
int
max_r
=
(
int
)
(
0.5
*
0.29
*
d
);
int
r_step
=
(
int
)
max
<
float
>
(
0.2
f
*
(
max_r
+
min_r
),
1.0
f
);
int
r_step
=
(
int
)
max
<
float
>
(
0.2
f
*
(
max_r
+
min_r
),
1.0
f
);
// TODO: padding so we consider the borders as well!
/* Haar-like feature suggested by Swirski. For details, see
...
...
@@ -82,6 +83,9 @@ Rect PupilDetectionMethod::coarsePupilDetection(const Mat &frame, const float &m
if
(
response
<
0.5
*
best_response
)
continue
;
if
(
response
<
0.5
*
best_response
)
continue
;
if
(
response
>
best_response
)
best_response
=
response
;
...
...
@@ -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
);
};
sort
(
candidates
.
begin
(),
candidates
.
end
(),
compare
);
...
...
EyeRecToo/src/pupil-detection/PupilDetectionMethod.h
View file @
1dacb0a3
...
...
@@ -104,7 +104,7 @@ public:
virtual
Pupil
getNextCandidate
()
{
return
Pupil
();
}
// Generic coarse pupil detection
static
cv
::
Rect
coarsePupilDetection
(
const
cv
::
Mat
&
frame
,
const
float
&
minCoverage
=
0.5
f
,
const
int
&
workingWidth
=
8
0
,
const
int
&
workingHeight
=
6
0
);
static
cv
::
Rect
coarsePupilDetection
(
const
cv
::
Mat
&
frame
,
const
float
&
minCoverage
=
0.5
f
,
const
int
&
workingWidth
=
6
0
,
const
int
&
workingHeight
=
4
0
);
// Generic confidence metrics
static
float
outlineContrastConfidence
(
const
cv
::
Mat
&
frame
,
const
Pupil
&
pupil
,
const
int
&
bias
=
5
);
...
...
EyeRecToo/src/pupil-tracking/PupiT
t
rackingMethod.cpp
→
EyeRecToo/src/pupil-tracking/Pupi
l
TrackingMethod.cpp
View file @
1dacb0a3
File moved
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