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
4314e5a5
Commit
4314e5a5
authored
Nov 20, 2017
by
Thiago Santini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improves log information
parent
5d4f0ca9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
10 deletions
+15
-10
EyeRecToo/src/CameraCalibration.cpp
EyeRecToo/src/CameraCalibration.cpp
+3
-3
EyeRecToo/src/CameraCalibration.h
EyeRecToo/src/CameraCalibration.h
+4
-2
EyeRecToo/src/CameraWidget.cpp
EyeRecToo/src/CameraWidget.cpp
+1
-1
EyeRecToo/src/utils.cpp
EyeRecToo/src/utils.cpp
+7
-4
No files found.
EyeRecToo/src/CameraCalibration.cpp
View file @
4314e5a5
...
...
@@ -62,13 +62,13 @@ void CameraCalibration::onCalibrated()
void
CameraCalibration
::
updateCalibrationStatus
(
bool
success
)
{
if
(
success
)
{
qInfo
()
<<
"Camera calibration done
. RMS Error ="
<<
rms
;
qInfo
()
<<
id
<<
"calibrated
. RMS Error ="
<<
rms
;
undistortPB
->
setEnabled
(
true
);
setRms
(
rms
);
setCoverage
(
coverage
);
sampleCountQL
->
setText
(
QString
::
number
(
sampleCount
));
}
else
{
qInfo
()
<<
"Camera
calibration failed."
;
qInfo
()
<<
id
<<
"
calibration failed."
;
undistortPB
->
setEnabled
(
false
);
setRms
();
setCoverage
();
...
...
@@ -173,7 +173,7 @@ void CameraCalibration::processSample(const Mat &frame)
if
(
found
)
{
imagePoints
.
push_back
(
pointBuf
);
sampleCount
=
imagePoints
.
size
();
sampleCount
=
(
int
)
imagePoints
.
size
();
if
(
sampleCount
==
1
)
covered
=
boundingRect
(
pointBuf
);
else
...
...
EyeRecToo/src/CameraCalibration.h
View file @
4314e5a5
...
...
@@ -30,11 +30,12 @@ class CameraCalibration : public QDialog
{
Q_OBJECT
public:
CameraCalibration
(
QWidget
*
parent
=
0
)
CameraCalibration
(
QString
id
,
QWidget
*
parent
=
0
)
:
QDialog
(
parent
),
calibrationSuccessful
(
false
),
sampleCount
(
0
),
coverage
(
0
)
coverage
(
0
),
id
(
id
)
{
this
->
setWindowModality
(
Qt
::
ApplicationModal
);
this
->
setWindowTitle
(
"Camera Calibration"
);
...
...
@@ -170,6 +171,7 @@ private:
QLabel
*
sampleCountQL
;
QLabel
*
coveredQL
;
QLabel
*
rmsQL
;
QString
id
;
QFutureWatcher
<
void
>
watcher
;
...
...
EyeRecToo/src/CameraWidget.cpp
View file @
4314e5a5
...
...
@@ -91,7 +91,7 @@ CameraWidget::CameraWidget(QString id, ImageProcessor::Type type, QWidget *paren
recorder
->
moveToThread
(
recorderThread
);
QMetaObject
::
invokeMethod
(
recorder
,
"create"
);
cameraCalibration
=
new
CameraCalibration
();
cameraCalibration
=
new
CameraCalibration
(
id
);
connect
(
cameraCalibration
,
SIGNAL
(
requestSample
()),
this
,
SLOT
(
requestCameraCalibrationSample
())
);
connect
(
cameraCalibration
,
SIGNAL
(
calibrationFinished
(
bool
)),
...
...
EyeRecToo/src/utils.cpp
View file @
4314e5a5
...
...
@@ -193,12 +193,15 @@ void loadSoundEffect(QSoundEffect &effect, QString fileName)
QStringList
searchPaths
;
searchPaths
<<
gExeDir
+
"/../EyeRecToo/effects"
<<
gExeDir
+
"/effects"
;
bool
loaded
=
false
;
for
(
int
i
=
0
;
i
<
searchPaths
.
size
();
i
++
)
{
QString
target
=
searchPaths
[
i
]
+
"/"
+
fileName
;
if
(
QFile
(
target
).
exists
())
{
qDebug
()
<<
"Loaded"
<<
target
;
if
(
QFile
(
target
).
exists
())
{
loaded
=
true
;
effect
.
setSource
(
QUrl
::
fromLocalFile
(
target
));
break
;
}
}
}
}
if
(
!
loaded
)
qWarning
()
<<
"Failed to load"
<<
fileName
;
}
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