Skip to content

Commit 62cc7ce

Browse files
applied marios patch
1 parent 5419937 commit 62cc7ce

File tree

5 files changed

+35
-4
lines changed

5 files changed

+35
-4
lines changed

qtTest/fscontrolpanel.ui

+5
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,11 @@
326326
<string> Select a camera from the menu!</string>
327327
</property>
328328
</widget>
329+
<zorder>cameraLabel</zorder>
330+
<zorder>groupBox</zorder>
331+
<zorder>groupBox_2</zorder>
332+
<zorder>groupBox_3</zorder>
333+
<zorder>viewfinder</zorder>
329334
</widget>
330335
<customwidgets>
331336
<customwidget>

qtTest/fswebcam.cpp

+15
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,13 @@ cv::Mat FSWebCam::getFrame()
2626
{
2727
frameTaken = false;
2828
isCapturingImage = true;
29+
30+
#ifdef LINUX
31+
imageCapture->capture();
32+
#else
2933
imageCapture->capture("./");
34+
#endif
35+
3036
//qDebug() << "preparing to take frame";
3137
//wait until camera has taken picture, then return
3238
while(!frameTaken){
@@ -55,8 +61,13 @@ void FSWebCam::setCamera(const QByteArray &cameraDevice)
5561
qDebug() << imageCapture->supportedResolutions();
5662
qDebug() << imageSettings.resolution();
5763
//QImageEncoderSettings imageSettings;
64+
65+
#ifdef LINUX
66+
#else
5867
imageSettings.setCodec("image/jpeg");
5968
imageSettings.setResolution(1280, 960);
69+
#endif
70+
6071
imageCapture->setEncodingSettings(imageSettings);
6172

6273
camera->setViewfinder(FSController::getInstance()->controlPanel->ui->viewfinder );
@@ -108,7 +119,11 @@ void FSWebCam::imageSaved(int id, const QString &fileName)
108119
img2.width(),
109120
CV_8UC3,
110121
(uchar*)img2.bits(), img2.bytesPerLine());
122+
#ifdef LINUX
123+
frame = mat.clone();
124+
#else
111125
frame = mat;
126+
#endif
112127
cv::cvtColor(mat,frame, CV_RGB2BGR);
113128
frameTaken = true;
114129
isCapturingImage = false;

qtTest/mainwindow.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414

1515
#include <boost/bind.hpp>
1616

17+
#ifdef LINUX
18+
#include <boost/filesystem.hpp>
19+
#endif
20+
1721
MainWindow::MainWindow(QWidget *parent) :
1822
QMainWindow(parent),
1923
hwTimer(new QBasicTimer),
@@ -58,7 +62,7 @@ void MainWindow::setupMenu()
5862
connect(savePointCloudAction,SIGNAL(triggered()),this, SLOT(savePointCloud()));
5963
ui->menuFile->addAction(savePointCloudAction);
6064

61-
QAction* exportSTLAction = new QAction("Export .stl...", this);
65+
QAction* exportSTLAction = new QAction("Export .STL...", this);
6266
connect(exportSTLAction,SIGNAL(triggered()),this, SLOT(exportSTL()));
6367
ui->menuFile->addAction(exportSTLAction);
6468

qtTest/mainwindow.ui

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
</spacer>
9494
</item>
9595
<item>
96-
<spacer name="horizontalSpacer_2">
96+
<spacer name="horizontalSpacer_4">
9797
<property name="orientation">
9898
<enum>Qt::Horizontal</enum>
9999
</property>
@@ -134,7 +134,7 @@
134134
<item>
135135
<widget class="QLabel" name="label">
136136
<property name="text">
137-
<string>Quality: </string>
137+
<string>Resolution </string>
138138
</property>
139139
</widget>
140140
</item>

qtTest/qtTest.pro

+8-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ macx {
100100

101101
INCLUDEPATH += /usr/local/Cellar/eigen/3.1.2/include/eigen3
102102
INCLUDEPATH += /usr/local/Cellar/flann/1.7.1/include
103-
INCLUDEPATH += /usr/local/Cellar/boost/1.51.0/include/boost
103+
INCLUDEPATH += /usr/local/Cellar/boost/1.51.0/include/boost
104104

105105
LIBS += -L/usr/local/Cellar/boost/1.51.0 \
106106
-lboost_chrono-mt \
@@ -140,7 +140,14 @@ linux-g++ {
140140
#PKGCONFIG += opencv
141141
#INCLUDEPATH += /usr/local/include/opencv2/
142142

143+
DEFINES += LINUX
144+
143145
INCLUDEPATH += /usr/include/eigen3/
146+
INCLUDEPATH += /usr/include/boost/
147+
148+
LIBS += -L/usr/lib/ \
149+
-lboost_system \
150+
-lboost_filesystem \
144151

145152
LIBS += -L/usr/local/lib/ \
146153
-lopencv_core \

0 commit comments

Comments
 (0)