Skip to content
Snippets Groups Projects
Commit 3bbdd584 authored by simon.fanetti's avatar simon.fanetti
Browse files

add black screen for the camera profil + instructions for the beamer location routine

parent 320851f0
No related branches found
No related tags found
No related merge requests found
......@@ -13,30 +13,55 @@
<property name="windowTitle">
<string>Dialog</string>
</property>
<widget class="QLabel" name="lblInstructions">
<widget class="QPushButton" name="btnLock">
<property name="geometry">
<rect>
<x>220</x>
<y>300</y>
<width>89</width>
<height>25</height>
</rect>
</property>
<property name="text">
<string>Lock</string>
</property>
</widget>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>40</x>
<y>40</y>
<width>121</width>
<width>201</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>Consignes :</string>
<string>Instructions :</string>
</property>
</widget>
<widget class="QPushButton" name="btnLock">
<widget class="QTextEdit" name="txtInstructions">
<property name="geometry">
<rect>
<x>220</x>
<y>260</y>
<width>89</width>
<height>25</height>
<x>60</x>
<y>70</y>
<width>421</width>
<height>181</height>
</rect>
</property>
<property name="text">
<string>Lock</string>
<property name="readOnly">
<bool>true</bool>
</property>
<property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;- A red corss is displayed from the selected output at step 2&lt;br /&gt;- Match the position of the cross with your white target&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;- When you are ready, press the button to validate a point&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;- Repeat this process 3 times for each cross you see (there will be 3 different crosses)&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Note :&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;For each point you validate, change the height of your target to not save the same position twice in the process.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</widget>
......
#include "camerafocus.h"
#include "ui_camerafocus.h"
CameraFocus::CameraFocus(SandboxSetup *sandbox, QWidget *parent) :
CameraFocus::CameraFocus(SandboxSetup *sandbox, MonitorGui *_mg, QWidget *parent) :
SubApp("Camera focus", "Error", parent),
ui(new Ui::CameraFocus)
{
ui->setupUi(this);
setup = sandbox;
mg = _mg;
blackScreen = new QtFullScreen(mg->getResolution(), true, this);
setup->loadFrameProcessProfil();
initCameraParams();
......@@ -17,17 +19,22 @@ CameraFocus::CameraFocus(SandboxSetup *sandbox, QWidget *parent) :
CameraFocus::~CameraFocus()
{
delete frameTimer;
delete blackScreen;
delete ui;
}
void CameraFocus::showEvent(QShowEvent *event){
QWidget::showEvent(event);
cv::Mat black = cv::Mat(1, 1, CV_8UC3, cv::Scalar(0, 0, 0));
blackScreen->setGeometry(mg->getResolution());
blackScreen->imShow(black);
frameTimer->start(100);
}
void CameraFocus::closeEvent(QCloseEvent *event){
frameTimer->stop();
blackScreen->close();
QWidget::closeEvent(event);
}
......
......@@ -5,7 +5,8 @@
#include <QTimer>
#include <QAbstractButton>
#include <sandboxSetup.h>
#include "monitorgui.h"
#include "qtfullscreen.h"
#include "subapp.h"
namespace Ui {
......@@ -17,7 +18,7 @@ class CameraFocus : public SubApp
Q_OBJECT
public:
explicit CameraFocus(SandboxSetup *sandbox, QWidget *parent = 0);
explicit CameraFocus(SandboxSetup *sandbox, MonitorGui *_mg, QWidget *parent = 0);
~CameraFocus();
void valideRoutine();
......@@ -50,7 +51,9 @@ protected:
private:
Ui::CameraFocus *ui;
SandboxSetup *setup;
MonitorGui *mg;
QTimer *frameTimer;
QtFullScreen *blackScreen;
FrameProcessProfil defaultProfil;
bool displayConstrasts = false;
......
......@@ -57,25 +57,8 @@
</layout>
</widget>
</widget>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>40</x>
<y>350</y>
<width>441</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>Note : Set your screens in mirror mode</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
<zorder>frame</zorder>
<zorder>btnTakePicture</zorder>
<zorder>label</zorder>
</widget>
<resources/>
<connections/>
......
......@@ -15,7 +15,7 @@ MainWindow::MainWindow(QWidget *parent) :
init = new InitCamera(setup);
mg = new MonitorGui(setup);
pg = new ProjectionGui(setup, mg);
cf = new CameraFocus(setup);
cf = new CameraFocus(setup, mg);
cm = new CroppingMask(setup, mg);
bl = new BeamerLocationGui(setup, mg);
scfg = new SaveConfigGui(setup);
......
......@@ -49,7 +49,7 @@
<property name="geometry">
<rect>
<x>40</x>
<y>340</y>
<y>440</y>
<width>331</width>
<height>21</height>
</rect>
......@@ -83,17 +83,17 @@
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>80</x>
<y>420</y>
<width>361</width>
<x>40</x>
<y>360</y>
<width>441</width>
<height>61</height>
</rect>
</property>
<property name="text">
<string>Project a blue screen on the previously selected output to setup your beamer</string>
<string>Project a blue screen on the previously selected output to help you setup your beamer manually</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>true</bool>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment