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
ae119f1c
Commit
ae119f1c
authored
Sep 11, 2018
by
Thiago Santini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Preinitialize blur matrix
parent
9fdfb9ac
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
EyeRecToo/src/pupil-detection/PuRe.cpp
EyeRecToo/src/pupil-detection/PuRe.cpp
+1
-1
EyeRecToo/src/pupil-detection/PuRe.h
EyeRecToo/src/pupil-detection/PuRe.h
+1
-1
No files found.
EyeRecToo/src/pupil-detection/PuRe.cpp
View file @
ae119f1c
...
@@ -136,7 +136,6 @@ Mat PuRe::canny(const Mat& in, const bool blurImage, const bool useL2, const int
...
@@ -136,7 +136,6 @@ Mat PuRe::canny(const Mat& in, const bool blurImage, const bool useL2, const int
* Smoothing and directional derivatives
* Smoothing and directional derivatives
* TODO: adapt sizes to image size
* TODO: adapt sizes to image size
*/
*/
Mat
blurred
;
if
(
blurImage
)
{
if
(
blurImage
)
{
Size
blurSize
(
5
,
5
);
Size
blurSize
(
5
,
5
);
GaussianBlur
(
in
,
blurred
,
blurSize
,
1.5
,
1.5
,
BORDER_REPLICATE
);
GaussianBlur
(
in
,
blurred
,
blurSize
,
1.5
,
1.5
,
BORDER_REPLICATE
);
...
@@ -715,6 +714,7 @@ Pupil PuRe::implDetect(const cv::Mat& frame, cv::Rect roi, const float& userMinP
...
@@ -715,6 +714,7 @@ Pupil PuRe::implDetect(const cv::Mat& frame, cv::Rect roi, const float& userMinP
workingSize
.
height
=
input
.
rows
;
workingSize
.
height
=
input
.
rows
;
// Preallocate stuff for edge detection
// Preallocate stuff for edge detection
blurred
=
Mat
::
zeros
(
workingSize
,
CV_8U
);
dx
=
Mat
::
zeros
(
workingSize
,
CV_32F
);
dx
=
Mat
::
zeros
(
workingSize
,
CV_32F
);
dy
=
Mat
::
zeros
(
workingSize
,
CV_32F
);
dy
=
Mat
::
zeros
(
workingSize
,
CV_32F
);
magnitude
=
Mat
::
zeros
(
workingSize
,
CV_32F
);
magnitude
=
Mat
::
zeros
(
workingSize
,
CV_32F
);
...
...
EyeRecToo/src/pupil-detection/PuRe.h
View file @
ae119f1c
...
@@ -208,7 +208,7 @@ protected:
...
@@ -208,7 +208,7 @@ protected:
void
detect
(
Pupil
&
pupil
);
void
detect
(
Pupil
&
pupil
);
// Canny
// Canny
cv
::
Mat
dx
,
dy
,
magnitude
;
cv
::
Mat
blurred
,
dx
,
dy
,
magnitude
;
cv
::
Mat
edgeType
,
edge
;
cv
::
Mat
edgeType
,
edge
;
cv
::
Mat
canny
(
const
cv
::
Mat
&
in
,
const
bool
blur
=
true
,
const
bool
useL2
=
true
,
const
int
bins
=
64
,
const
float
nonEdgePixelsRatio
=
0.7
f
,
const
float
lowHighThresholdRatio
=
0.4
f
);
cv
::
Mat
canny
(
const
cv
::
Mat
&
in
,
const
bool
blur
=
true
,
const
bool
useL2
=
true
,
const
int
bins
=
64
,
const
float
nonEdgePixelsRatio
=
0.7
f
,
const
float
lowHighThresholdRatio
=
0.4
f
);
...
...
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