Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
EyeRec
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Thiago Santini
EyeRec
Commits
59d0f42d
Commit
59d0f42d
authored
Jun 14, 2016
by
Thiago C. Santini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small clean up
parent
6a4b6aac
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
15 deletions
+15
-15
EyeRec.pro
EyeRec.pro
+2
-2
src/ImageAcquisition.cpp
src/ImageAcquisition.cpp
+2
-2
src/utils.cpp
src/utils.cpp
+4
-6
src/utils.h
src/utils.h
+7
-5
No files found.
EyeRec.pro
View file @
59d0f42d
...
...
@@ -26,7 +26,7 @@ SOURCES += \
$$
{
TOP
}
/
src
/
GlobalTimer
.
cpp
\
$$
{
TOP
}
/
src
/
PolyFit
.
cpp
\
$$
{
TOP
}
/
src
/
CalibrationMethod
.
cpp
\
src
/
Homography
.
cpp
$$
{
TOP
}
/
src
/
Homography
.
cpp
HEADERS
+=
\
$$
{
TOP
}
/
src
/
ImageProcessing
.
h
\
...
...
@@ -64,7 +64,7 @@ HEADERS += \
$$
{
TOP
}
/
else
/
find_best_edge
.
h
\
$$
{
TOP
}
/
src
/
PolyFit
.
h
\
$$
{
TOP
}
/
src
/
CalibrationMethod
.
h
\
src
/
Homography
.
h
$$
{
TOP
}
/
src
/
Homography
.
h
FORMS
+=
\
$$
{
TOP
}
/
src
/
Gui
.
ui
...
...
src/ImageAcquisition.cpp
View file @
59d0f42d
...
...
@@ -34,14 +34,14 @@ static void updateSlave(ImageAcquisition *imageAcquisition)
if
(
imageAcquisition
->
slave
->
buffer
.
imageData
!=
NULL
)
{
tmp
=
cvarrToMat
(
&
imageAcquisition
->
slave
->
buffer
,
true
);
flip
(
tmp
,
tmp
,
settings
.
value
(
"fieldCam/flip"
).
toInt
());
// flip before undistorting
remap
(
tmp
,
tmp
,
imageAcquisition
->
map1
,
imageAcquisition
->
map2
,
cv
::
INTER_
CUBIC
);
remap
(
tmp
,
tmp
,
imageAcquisition
->
map1
,
imageAcquisition
->
map2
,
cv
::
INTER_
AREA
);
if
(
settings
.
value
(
"fieldCam/outResX"
).
toInt
()
!=
tmp
.
cols
||
settings
.
value
(
"fieldCam/outResY"
).
toInt
()
!=
tmp
.
rows
)
{
resize
(
tmp
,
tmp
,
Size
(
settings
.
value
(
"fieldCam/outResX"
).
toInt
(),
settings
.
value
(
"fieldCam/outResY"
).
toInt
()),
INTER_
CUBIC
INTER_
AREA
);
}
}
...
...
src/utils.cpp
View file @
59d0f42d
...
...
@@ -22,15 +22,15 @@ QString getNamePrefix()
void
logMessages
(
QtMsgType
type
,
const
QMessageLogContext
&
context
,
const
QString
&
msg
)
{
static
QMutex
logMutex
;
static
std
::
ofstream
log
;
static
ofstream
log
;
QMutexLocker
lock
(
&
logMutex
);
if
(
!
log
.
is_open
())
log
.
open
(
"EyeRec.log"
,
std
::
ofstream
::
app
);
log
.
open
(
"EyeRec.log"
,
ofstream
::
app
);
else
log
<<
qFormatLogMessage
(
type
,
context
,
msg
).
toStdString
()
<<
std
::
endl
;
log
<<
qFormatLogMessage
(
type
,
context
,
msg
).
toStdString
()
<<
endl
;
std
::
cout
<<
qFormatLogMessage
(
type
,
context
,
msg
).
toStdString
()
<<
std
::
endl
;
cout
<<
qFormatLogMessage
(
type
,
context
,
msg
).
toStdString
()
<<
endl
;
}
void
initBanner
()
...
...
@@ -50,5 +50,3 @@ GlobalTimer gTimer;
QString
gBinaryPath
=
""
;
QString
gCurrentSubjectName
=
""
;
QString
gFileIndexStr
=
"0000"
;
PolyFit
*
polyFit
;
src/utils.h
View file @
59d0f42d
...
...
@@ -3,6 +3,7 @@
#include <iostream>
#include <fstream>
#include <vector>
#include <QApplication>
#include <QString>
...
...
@@ -12,24 +13,25 @@
#include <QProcess>
#include <QDebug>
#include "opencv2/core.hpp"
#include "opencv2/imgproc.hpp"
#include "settings.h"
#include "GlobalTimer.h"
#include "PolyFit.h"
using
namespace
std
;
using
namespace
cv
;
QString
getTimestampStr
();
QString
getNamePrefix
();
void
initBanner
();
void
exitBanner
();
void
logMessages
(
QtMsgType
type
,
const
QMessageLogContext
&
context
,
const
QString
&
msg
);
extern
QString
gBinaryPath
;
extern
QString
gCurrentSubjectName
;
extern
QString
gFileIndexStr
;
extern
GlobalTimer
gTimer
;
// Only valid after first frame has been received!
extern
PolyFit
*
polyFit
;
void
logMessages
(
QtMsgType
type
,
const
QMessageLogContext
&
context
,
const
QString
&
msg
);
#endif // UTILS_H
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