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
874e7056
Commit
874e7056
authored
Oct 19, 2017
by
Thiago Santini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reloads config after calibration
parent
cd6ca352
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
10 deletions
+14
-10
EyeRecToo/src/CameraWidget.cpp
EyeRecToo/src/CameraWidget.cpp
+1
-0
EyeRecToo/src/EyeImageProcessor.h
EyeRecToo/src/EyeImageProcessor.h
+4
-4
EyeRecToo/src/FieldImageProcessor.cpp
EyeRecToo/src/FieldImageProcessor.cpp
+1
-3
EyeRecToo/src/ImageProcessor.cpp
EyeRecToo/src/ImageProcessor.cpp
+7
-3
EyeRecToo/src/ImageProcessor.h
EyeRecToo/src/ImageProcessor.h
+1
-0
No files found.
EyeRecToo/src/CameraWidget.cpp
View file @
874e7056
...
...
@@ -436,6 +436,7 @@ void CameraWidget::onCameraCalibrationFinished(bool success)
// TODO: at some point we might consider storing this with a unique camera ID instead of this generic one
QString
fileName
=
gCfgDir
+
"/"
+
id
+
"Calibration.xml"
;
QMetaObject
::
invokeMethod
(
cameraCalibration
,
"store"
,
Qt
::
QueuedConnection
,
Q_ARG
(
QString
,
fileName
));
QMetaObject
::
invokeMethod
(
imageProcessor
,
"updateConfig"
,
Qt
::
QueuedConnection
);
}
void
CameraWidget
::
drawROI
(
QPainter
&
painter
)
...
...
EyeRecToo/src/EyeImageProcessor.h
View file @
874e7056
...
...
@@ -213,7 +213,7 @@ public:
QComboBox
*
pupilDetectionComboBox
;
signals:
void
updateConfig
();
void
updateConfig
();
public
slots
:
void
showOptions
(
QPoint
pos
)
...
...
@@ -243,7 +243,7 @@ public slots:
cfg
.
pupilDetectionMethod
=
pupilDetectionComboBox
->
currentData
().
toString
();
cfg
.
save
(
settings
);
emit
updateConfig
();
}
}
private:
QPushButton
*
applyButton
;
...
...
@@ -267,8 +267,8 @@ signals:
public
slots
:
void
process
(
Timestamp
t
,
const
cv
::
Mat
&
frame
);
void
updateConfig
();
void
newROI
(
QPointF
sROI
,
QPointF
eROI
);
void
updateConfig
();
void
newROI
(
QPointF
sROI
,
QPointF
eROI
);
private:
QString
id
;
...
...
EyeRecToo/src/FieldImageProcessor.cpp
View file @
874e7056
...
...
@@ -158,9 +158,7 @@ void FieldImageProcessor::sanitizeCameraParameters(Size size)
* 1) Move camera parameters logic to the Camera instead so it's
* considered for the eye cameras as well.
*
* 2) Force update after a camera calibration has been performed.
*
* 3) Drop the logic for resizing the intrinsic parameters since it's not
* 2) Drop the logic for resizing the intrinsic parameters since it's not
* throughly tested.
*
*/
...
...
EyeRecToo/src/ImageProcessor.cpp
View file @
874e7056
...
...
@@ -40,10 +40,12 @@ void ImageProcessor::create()
connect
(
this
,
SIGNAL
(
process
(
Timestamp
,
const
cv
::
Mat
&
)),
eyeProcessor
,
SLOT
(
process
(
Timestamp
,
const
cv
::
Mat
&
))
);
connect
(
this
,
SIGNAL
(
newROI
(
QPointF
,
QPointF
)),
eyeProcessor
,
SLOT
(
newROI
(
QPointF
,
QPointF
))
);
eyeProcessor
,
SLOT
(
newROI
(
QPointF
,
QPointF
))
);
connect
(
this
,
SIGNAL
(
updateConfig
()),
eyeProcessor
,
SLOT
(
updateConfig
())
);
connect
(
eyeProcessor
,
SIGNAL
(
newData
(
EyeData
)),
this
,
SIGNAL
(
newData
(
EyeData
))
);
this
,
SIGNAL
(
newData
(
EyeData
))
);
// GUI
connect
(
this
,
SIGNAL
(
showOptions
(
QPoint
)),
...
...
@@ -55,7 +57,7 @@ void ImageProcessor::create()
eyeProcessorUI
->
pupilDetectionComboBox
->
addItem
(
name
,
name
);
}
connect
(
eyeProcessorUI
,
SIGNAL
(
updateConfig
()),
eyeProcessor
,
SLOT
(
updateConfig
())
);
eyeProcessor
,
SLOT
(
updateConfig
())
);
break
;
case
Field
:
fieldProcessor
=
new
FieldImageProcessor
(
id
);
...
...
@@ -63,6 +65,8 @@ void ImageProcessor::create()
fieldProcessor
,
SLOT
(
process
(
Timestamp
,
const
cv
::
Mat
&
))
);
connect
(
this
,
SIGNAL
(
newROI
(
QPointF
,
QPointF
)),
fieldProcessor
,
SLOT
(
newROI
(
QPointF
,
QPointF
))
);
connect
(
this
,
SIGNAL
(
updateConfig
()),
fieldProcessor
,
SLOT
(
updateConfig
())
);
connect
(
fieldProcessor
,
SIGNAL
(
newData
(
FieldData
)),
this
,
SIGNAL
(
newData
(
FieldData
))
);
...
...
EyeRecToo/src/ImageProcessor.h
View file @
874e7056
...
...
@@ -25,6 +25,7 @@ signals:
void
newROI
(
QPointF
sROI
,
QPointF
eROI
);
void
newData
(
EyeData
data
);
void
newData
(
FieldData
data
);
void
updateConfig
();
public
slots
:
void
create
();
...
...
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