Commit 92633766 authored by Thiago Santini's avatar Thiago Santini

Temporary changes for the Belvedere experiment

parent ba515798
......@@ -62,13 +62,13 @@ QCameraViewfinderSettings Camera::getViewfinderSettings(const QCameraInfo camera
// Recommend based on known cameras
QString description = cameraInfo.description();
if (description == "Pupil Cam1 ID0") {
recommended.setMaximumFrameRate(120);
recommended.setMinimumFrameRate(120);
recommended.setMaximumFrameRate(90);
recommended.setMinimumFrameRate(90);
recommended.setResolution(640, 480);
recommended.setPixelFormat( QVideoFrame::Format_Jpeg);
} else if (description == "Pupil Cam1 ID1") {
recommended.setMaximumFrameRate(120);
recommended.setMinimumFrameRate(120);
recommended.setMaximumFrameRate(90);
recommended.setMinimumFrameRate(90);
recommended.setResolution(640, 480);
recommended.setPixelFormat( QVideoFrame::Format_Jpeg);
} else if (description == "Pupil Cam1 ID2") {
......
......@@ -11,17 +11,19 @@ void CommandManager::keyPress(QKeyEvent *event)
switch (event->key()) {
case Qt::Key_C:
case Qt::Key_PageDown:
emit enableMarkerCollection();
break;
case Qt::Key_S:
case Qt::Key_PageUp:
emit toggleCalibration();
emit enableMarkerCollection();
break;
//case Qt::Key_S:
//case Qt::Key_PageUp:
// emit toggleCalibration();
// break;
case Qt::Key_R:
case Qt::Key_B:
emit toggleRecording();
break;
case Qt::Key_F:
case Qt::Key_PageUp:
emit freezeCameraImages();
break;
default:
......@@ -37,8 +39,10 @@ void CommandManager::keyRelease(QKeyEvent *event)
case Qt::Key_C:
case Qt::Key_PageDown:
emit disableMarkerCollection();
emit toggleCalibration();
break;
case Qt::Key_F:
case Qt::Key_PageUp:
emit unfreezeCameraImages();
break;
default:
......
......@@ -163,7 +163,7 @@ public:
collectionMarkerSizeMeters(0.10),
processingDownscalingFactor(2),
undistort(false),
markerDetectionMethod("aruco")
markerDetectionMethod("")
{
}
......
......@@ -18,7 +18,7 @@ MainWindow::MainWindow(QWidget *parent) :
ui(new Ui::MainWindow)
{
ui->setupUi(this);
//#define EYEREC
#define EYEREC
#ifdef EYEREC
createExtraMenus();
......
......@@ -37,6 +37,12 @@ void PupilTrackingMethod::registerPupil( const Timestamp &ts, Pupil &pupil ) {
// previousPupil = TrackedPupil();
}
void PupilTrackingMethod::predictMaxPupilDiameter() {
predictedMaxPupilDiameter = 1.5*pupilDiameterKf.predict().ptr<float>(0)[0];
if (previousPupils.size() < 20)
predictedMaxPupilDiameter = -1;
}
void PupilTrackingMethod::run(const Timestamp &ts, const cv::Mat &frame, const cv::Rect &roi, Pupil &pupil, PupilDetectionMethod &pupilDetectionMethod)
{
cv::Size frameSize = { frame.cols, frame.rows };
......
......@@ -68,11 +68,7 @@ protected:
cv::KalmanFilter pupilDiameterKf;
float predictedMaxPupilDiameter = -1;
void predictMaxPupilDiameter() {
predictedMaxPupilDiameter = 1.5*pupilDiameterKf.predict().ptr<float>(0)[0];
if (previousPupils.size() < 20)
predictedMaxPupilDiameter = -1;
}
void predictMaxPupilDiameter();
void registerPupil(const Timestamp &ts, Pupil &pupil);
void reset();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment