Subversion Repositories seema-scanner

Rev

Rev 200 | Rev 207 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 200 Rev 201
1
#------------------------------------------------------------
1
#------------------------------------------------------------
2
#
2
#
3
# SMScanner
3
# SMScanner
4
#
4
#
5
# Control Interface and point cloud reconstruction interface
5
# Control Interface and point cloud reconstruction interface
6
# for the SeeMa Lab Structured Light Scanner.
6
# for the SeeMa Lab Structured Light Scanner.
7
#
7
#
8
# Supported OS: Ubuntu 16.04
8
# Supported OS: Ubuntu 16.04
9
#
9
#
10
# Dependencies: Qt 5, OpenCV, PCL 1.7.2
10
# Dependencies: Qt 5, OpenCV, PCL 1.7.2
11
#
11
#
12
# Image Analysis and Computer Graphics, DTU, 2017
12
# Image Analysis and Computer Graphics, DTU, 2017
13
#
13
#
14
#------------------------------------------------------------
14
#------------------------------------------------------------
15
 
15
 
16
QT += core gui testlib
16
QT += core gui testlib
17
 
17
 
18
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
18
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
19
 
19
 
20
TARGET = SMScanner
20
TARGET = SMScanner
21
TEMPLATE = app
21
TEMPLATE = app
22
 
22
 
23
HEADERS  += SMScanner.h \
23
HEADERS  += SMScanner.h \
24
        SMVideoWidget.h \
24
        SMVideoWidget.h \
25
        SMPointCloudWidget.h \
25
        SMPointCloudWidget.h \
26
        camera/Camera.h \
26
        camera/Camera.h \
27
        projector/Projector.h \
27
        projector/Projector.h \
28
        projector/ProjectorOpenGL.h \
28
        projector/ProjectorOpenGL.h \
29
        projector/OpenGLContext.h \
29
        projector/OpenGLContext.h \
30
        cvtools.h \
30
        cvtools.h \
31
        SMCaptureWorker.h \
31
        SMCaptureWorker.h \
32
        rotationstage/RotationStage.h \
32
        rotationstage/RotationStage.h \
33
        SMPreferenceDialog.h \
33
        SMPreferenceDialog.h \
34
        SMTypes.h \
34
        SMTypes.h \
35
        SMCalibrationWorker.h \
35
        SMCalibrationWorker.h \
36
        #SMCalibrationWorkerArUco.h \
36
        #SMCalibrationWorkerArUco.h \
37
        SMCalibrationParameters.h \
37
        SMCalibrationParameters.h \
38
        SMReconstructionWorker.h \
38
        SMReconstructionWorker.h \
39
        algorithm/Algorithm.h \
39
        algorithm/Algorithm.h \
40
        algorithm/AlgorithmGrayCode.h \
40
        algorithm/AlgorithmGrayCode.h \
41
        algorithm/AlgorithmGrayCodeHorzVert.h \
41
        algorithm/AlgorithmGrayCodeHorzVert.h \
42
        algorithm/AlgorithmLineShift.h \
42
        algorithm/AlgorithmLineShift.h \
43
        algorithm/AlgorithmPhaseShiftThreeFreq.h \
43
        algorithm/AlgorithmPhaseShiftThreeFreq.h \
44
        algorithm/AlgorithmPhaseShiftTwoFreq.h \
44
        algorithm/AlgorithmPhaseShiftTwoFreq.h \
45
        algorithm/AlgorithmPhaseShiftTwoFreqHorzVert.h \
45
        algorithm/AlgorithmPhaseShiftTwoFreqHorzVert.h \
46
        algorithm/AlgorithmPhaseShiftEmbedded.h \
46
        algorithm/AlgorithmPhaseShiftEmbedded.h \
47
        algorithm/algorithmtools.h
47
        algorithm/algorithmtools.h \
-
 
48
    SMVideoZoomWidget.h
48
 
49
 
49
SOURCES += main.cpp\
50
SOURCES += main.cpp\
50
        SMScanner.cpp \
51
        SMScanner.cpp \
51
        SMVideoWidget.cpp \
52
        SMVideoWidget.cpp \
52
        SMPointCloudWidget.cpp \
53
        SMPointCloudWidget.cpp \
53
        camera/Camera.cpp \
54
        camera/Camera.cpp \
54
        projector/ProjectorOpenGL.cpp \
55
        projector/ProjectorOpenGL.cpp \
55
        cvtools.cpp \
56
        cvtools.cpp \
56
        SMCaptureWorker.cpp \
57
        SMCaptureWorker.cpp \
57
        rotationstage/RotationStage.cpp \
58
        rotationstage/RotationStage.cpp \
58
        SMPreferenceDialog.cpp \
59
        SMPreferenceDialog.cpp \
59
        SMCalibrationWorker.cpp \
60
        SMCalibrationWorker.cpp \
60
        #SMCalibrationWorkerArUco.cpp \
61
        #SMCalibrationWorkerArUco.cpp \
61
        SMCalibrationParameters.cpp \
62
        SMCalibrationParameters.cpp \
62
        SMReconstructionWorker.cpp \
63
        SMReconstructionWorker.cpp \
63
        algorithm/AlgorithmGrayCode.cpp \
64
        algorithm/AlgorithmGrayCode.cpp \
64
        algorithm/AlgorithmGrayCodeHorzVert.cpp \
65
        algorithm/AlgorithmGrayCodeHorzVert.cpp \
65
        algorithm/AlgorithmLineShift.cpp \
66
        algorithm/AlgorithmLineShift.cpp \
66
        algorithm/AlgorithmPhaseShiftThreeFreq.cpp \
67
        algorithm/AlgorithmPhaseShiftThreeFreq.cpp \
67
        algorithm/AlgorithmPhaseShiftTwoFreq.cpp \
68
        algorithm/AlgorithmPhaseShiftTwoFreq.cpp \
68
        algorithm/AlgorithmPhaseShiftTwoFreqHorzVert.cpp \
69
        algorithm/AlgorithmPhaseShiftTwoFreqHorzVert.cpp \
69
        algorithm/AlgorithmPhaseShiftEmbedded.cpp
70
        algorithm/AlgorithmPhaseShiftEmbedded.cpp \
-
 
71
    SMVideoZoomWidget.cpp
70
 
72
 
71
FORMS    += SMScanner.ui \
73
FORMS    += SMScanner.ui \
72
        SMAboutDialog.ui \
74
        SMAboutDialog.ui \
73
        SMPreferenceDialog.ui
75
        SMPreferenceDialog.ui
74
 
76
 
75
INCLUDEPATH += camera/ projector/ algorithm/ triangulator/ rotationstage/ calibration/
77
INCLUDEPATH += camera/ projector/ algorithm/ triangulator/ rotationstage/ calibration/
76
 
78
 
77
 
79
 
78
# Operating System dependant linking and including
80
# Operating System dependant linking and including
79
# Linux
81
# Linux
80
unix:!macx {
82
unix:!macx {
81
    CONFIG += link_pkgconfig
83
    CONFIG += link_pkgconfig
82
    # Link VTK (no pkg-config, only cmake files, hence we link manually for now)
84
    # Link VTK (no pkg-config, only cmake files, hence we link manually for now)
83
    INCLUDEPATH += /usr/include/vtk-6.2/
85
    INCLUDEPATH += /usr/include/vtk-6.2/
84
    LIBS += -lvtkViewsQt-6.2 -lvtkRenderingQt-6.2 -lvtkGUISupportQt-6.2 -lvtkRenderingCore-6.2 -lvtkCommonExecutionModel-6.2 \
86
    LIBS += -lvtkViewsQt-6.2 -lvtkRenderingQt-6.2 -lvtkGUISupportQt-6.2 -lvtkRenderingCore-6.2 -lvtkCommonExecutionModel-6.2 \
85
            -lvtkCommonDataModel-6.2 -lvtkCommonMath-6.2 -lvtkCommonCore-6.2 -lvtkIOImage-6.2 -lvtkCommonColor-6.2
87
            -lvtkCommonDataModel-6.2 -lvtkCommonMath-6.2 -lvtkCommonCore-6.2 -lvtkIOImage-6.2 -lvtkCommonColor-6.2
86
    # PCL pkg-config workaround
88
    # PCL pkg-config workaround
87
    LIBS += -lboost_system -lpcl_visualization -lpcl_common -lpcl_io -lpcl_search -lpcl_surface
89
    LIBS += -lboost_system -lpcl_visualization -lpcl_common -lpcl_io -lpcl_search -lpcl_surface
88
    # PKG-config libs
90
    # PKG-config libs
89
    INCLUDEPATH += /usr/local/include/pcl-1.7 /usr/include/eigen3/
91
    INCLUDEPATH += /usr/local/include/pcl-1.7 /usr/include/eigen3/
90
    PKGCONFIG += gl glu x11 opencv pcl_registration-1.7 pcl_visualization-1.7 pcl_surface-1.7 pcl_search-1.7 pcl_filters-1.7 pcl_kdtree-1.7 pcl_tracking-1.7 flann eigen3
92
    PKGCONFIG += gl glu x11 opencv pcl_registration-1.7 pcl_visualization-1.7 pcl_surface-1.7 pcl_search-1.7 pcl_filters-1.7 pcl_kdtree-1.7 pcl_tracking-1.7 flann eigen3
91
    # Ceres
93
    # Ceres
92
    CONFIG += c++11
94
    CONFIG += c++11
93
    LIBS += -lceres -lglog
95
    LIBS += -lceres -lglog
94
}
96
}
95
 
97
 
96
 
98
 
97
# Windows
99
# Windows
98
win32 {
100
win32 {
99
    # Boost join
101
    # Boost join
100
    DEFINES += DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED
102
    DEFINES += DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED
101
 
103
 
102
    # opencv
104
    # opencv
103
    INCLUDEPATH += "$$(OPENCV_INCLUDE_DIR)/" #C:\opencv\build\include
105
    INCLUDEPATH += "$$(OPENCV_INCLUDE_DIR)/" #C:\opencv\build\include
104
 
106
 
105
    CONFIG(debug,debug|release){
107
    CONFIG(debug,debug|release){
106
    #debug
108
    #debug
107
    LIBS += -L"$$(OPENCV_DIR)" \ #C:\opencv\build\x64\vc10\lib
109
    LIBS += -L"$$(OPENCV_DIR)" \ #C:\opencv\build\x64\vc10\lib
108
            -lopencv_core247d \
110
            -lopencv_core247d \
109
            -lopencv_highgui247d \
111
            -lopencv_highgui247d \
110
            -lopencv_imgproc247d \
112
            -lopencv_imgproc247d \
111
            -lopencv_calib3d247d
113
            -lopencv_calib3d247d
112
    } else {
114
    } else {
113
    #release
115
    #release
114
    LIBS += -L"$$(OPENCV_DIR)" \
116
    LIBS += -L"$$(OPENCV_DIR)" \
115
            -lopencv_core247 \
117
            -lopencv_core247 \
116
            -lopencv_highgui247 \
118
            -lopencv_highgui247 \
117
            -lopencv_imgproc247 \
119
            -lopencv_imgproc247 \
118
            -lopencv_calib3d247
120
            -lopencv_calib3d247
119
    }
121
    }
120
 
122
 
121
    # pcl
123
    # pcl
122
    INCLUDEPATH += "$$(PCL_INCLUDE_DIR)/" #C:\Program Files\PCL\include\pcl-1.7
124
    INCLUDEPATH += "$$(PCL_INCLUDE_DIR)/" #C:\Program Files\PCL\include\pcl-1.7
123
 
125
 
124
    CONFIG(debug,debug|release){
126
    CONFIG(debug,debug|release){
125
    #debug
127
    #debug
126
    LIBS += -L"$$(PCL_DIR)" \ #C:\Program Files\PCL\lib
128
    LIBS += -L"$$(PCL_DIR)" \ #C:\Program Files\PCL\lib
127
            -lpcl_visualization_debug \
129
            -lpcl_visualization_debug \
128
            -lpcl_io_debug \
130
            -lpcl_io_debug \
129
            -lpcl_common_debug \
131
            -lpcl_common_debug \
130
            -lpcl_features_debug \
132
            -lpcl_features_debug \
131
            -lpcl_filters_debug \
133
            -lpcl_filters_debug \
132
            -lpcl_io_debug \
134
            -lpcl_io_debug \
133
            -lpcl_io_ply_debug \
135
            -lpcl_io_ply_debug \
134
            -lpcl_kdtree_debug \
136
            -lpcl_kdtree_debug \
135
            -lpcl_keypoints_debug \
137
            -lpcl_keypoints_debug \
136
            -lpcl_octree_debug \
138
            -lpcl_octree_debug \
137
            -lpcl_registration_debug \
139
            -lpcl_registration_debug \
138
            -lpcl_sample_consensus_debug \
140
            -lpcl_sample_consensus_debug \
139
            -lpcl_search_debug \
141
            -lpcl_search_debug \
140
            -lpcl_segmentation_debug \
142
            -lpcl_segmentation_debug \
141
            -lpcl_surface_debug \
143
            -lpcl_surface_debug \
142
            -lpcl_tracking_debug \
144
            -lpcl_tracking_debug \
143
            -lpcl_visualization_debug
145
            -lpcl_visualization_debug
144
    } else {
146
    } else {
145
    # release
147
    # release
146
    LIBS += -L"$$(PCL_DIR)" \
148
    LIBS += -L"$$(PCL_DIR)" \
147
            -lpcl_visualization_release \
149
            -lpcl_visualization_release \
148
            -lpcl_io_release \
150
            -lpcl_io_release \
149
            -lpcl_common_release \
151
            -lpcl_common_release \
150
            -lpcl_features_release \
152
            -lpcl_features_release \
151
            -lpcl_filters_release \
153
            -lpcl_filters_release \
152
            -lpcl_io_release \
154
            -lpcl_io_release \
153
            -lpcl_io_ply_release \
155
            -lpcl_io_ply_release \
154
            -lpcl_kdtree_release \
156
            -lpcl_kdtree_release \
155
            -lpcl_keypoints_release \
157
            -lpcl_keypoints_release \
156
            -lpcl_octree_release \
158
            -lpcl_octree_release \
157
            -lpcl_registration_release \
159
            -lpcl_registration_release \
158
            -lpcl_sample_consensus_release \
160
            -lpcl_sample_consensus_release \
159
            -lpcl_search_release \
161
            -lpcl_search_release \
160
            -lpcl_segmentation_release \
162
            -lpcl_segmentation_release \
161
            -lpcl_surface_release \
163
            -lpcl_surface_release \
162
            -lpcl_tracking_release \
164
            -lpcl_tracking_release \
163
            -lpcl_visualization_release
165
            -lpcl_visualization_release
164
    }
166
    }
165
 
167
 
166
    # pcl dependencies
168
    # pcl dependencies
167
    INCLUDEPATH += "$$(BOOST_ROOT)/include" \
169
    INCLUDEPATH += "$$(BOOST_ROOT)/include" \
168
                   "$$(EIGEN_ROOT)/include" \
170
                   "$$(EIGEN_ROOT)/include" \
169
                   "$$(FLANN_ROOT)/include"
171
                   "$$(FLANN_ROOT)/include"
170
    LIBS += -L"$$(BOOST_ROOT)/lib" -lboost_system-vc100-mt-1_50 -lboost_system-vc100-mt-gd-1_50
172
    LIBS += -L"$$(BOOST_ROOT)/lib" -lboost_system-vc100-mt-1_50 -lboost_system-vc100-mt-gd-1_50
171
 
173
 
172
    # vtk
174
    # vtk
173
    INCLUDEPATH += "$$(VTK_INCLUDE_DIR)" #C:\Program Files\VTK\include\vtk-5.10
175
    INCLUDEPATH += "$$(VTK_INCLUDE_DIR)" #C:\Program Files\VTK\include\vtk-5.10
174
 
176
 
175
    CONFIG(debug,debug|release){
177
    CONFIG(debug,debug|release){
176
    #debug
178
    #debug
177
    LIBS += -L"$$(VTK_DIR)" \ #C:\Program Files\VTK\lib\vtk-5.10
179
    LIBS += -L"$$(VTK_DIR)" \ #C:\Program Files\VTK\lib\vtk-5.10
178
            -lvtkGraphics-gd \
180
            -lvtkGraphics-gd \
179
            -lQVTK-gd \
181
            -lQVTK-gd \
180
            -lvtkCommon-gd \
182
            -lvtkCommon-gd \
181
            -lvtkFiltering-gd \
183
            -lvtkFiltering-gd \
182
            -lvtkRendering-gd \
184
            -lvtkRendering-gd \
183
            -lvtkIO-gd \
185
            -lvtkIO-gd \
184
            -lvtkpng-gd \
186
            -lvtkpng-gd \
185
            -lvtksys-gd \
187
            -lvtksys-gd \
186
            -lvtktiff-gd \
188
            -lvtktiff-gd \
187
            -lvtkjpeg-gd \
189
            -lvtkjpeg-gd \
188
            -lvtkexpat-gd \
190
            -lvtkexpat-gd \
189
            -lvtkzlib-gd
191
            -lvtkzlib-gd
190
    } else {
192
    } else {
191
    # release
193
    # release
192
    LIBS += -L"$$(VTK_DIR)" \
194
    LIBS += -L"$$(VTK_DIR)" \
193
            -lvtkGraphics \
195
            -lvtkGraphics \
194
            -lQVTK \
196
            -lQVTK \
195
            -lvtkCommon \
197
            -lvtkCommon \
196
            -lvtkFiltering \
198
            -lvtkFiltering \
197
            -lvtkRendering \
199
            -lvtkRendering \
198
            -lvtkIO \
200
            -lvtkIO \
199
            -lvtkpng \
201
            -lvtkpng \
200
            -lvtksys \
202
            -lvtksys \
201
            -lvtktiff \
203
            -lvtktiff \
202
            -lvtkjpeg \
204
            -lvtkjpeg \
203
            -lvtkexpat \
205
            -lvtkexpat \
204
            -lvtkzlib
206
            -lvtkzlib
205
    }
207
    }
206
 
208
 
207
}
209
}
208
# Mac OS X
210
# Mac OS X
209
macx {
211
macx {
210
    INCLUDEPATH += /opt/local/include/vtk-5.10/
212
    INCLUDEPATH += /opt/local/include/vtk-5.10/
211
    LIBS += -L/opt/local/lib/vtk-5.10/ -lQVTK -lvtkCommon -lvtkFiltering -lvtkRendering -lvtkIO -lvtkGraphics
213
    LIBS += -L/opt/local/lib/vtk-5.10/ -lQVTK -lvtkCommon -lvtkFiltering -lvtkRendering -lvtkIO -lvtkGraphics
212
    LIBS += -L/opt/local/lib/ -lboost_system-mt
214
    LIBS += -L/opt/local/lib/ -lboost_system-mt
213
    CONFIG += link_pkgconfig
215
    CONFIG += link_pkgconfig
214
    PKGCONFIG += opencv pcl_visualization-1.7 pcl_filters-1.7 pcl_search-1.7 pcl_registration-1.7
216
    PKGCONFIG += opencv pcl_visualization-1.7 pcl_filters-1.7 pcl_search-1.7 pcl_registration-1.7
215
    DEFINES += BOOST_TT_HAS_OPERATOR_HPP_INCLUDED
217
    DEFINES += BOOST_TT_HAS_OPERATOR_HPP_INCLUDED
216
}
218
}
217
 
219
 
218
 
220
 
219
# Compile with system dependent OpenGL Context code
221
# Compile with system dependent OpenGL Context code
220
unix:!macx{
222
unix:!macx{
221
    SOURCES += projector/OpenGLContext.Xscreens.cpp
223
    SOURCES += projector/OpenGLContext.Xscreens.cpp
222
    LIBS += -lXxf86vm
224
    LIBS += -lXxf86vm
223
}
225
}
224
win32{
226
win32{
225
    SOURCES += projector/OpenGLContext.Win.cpp
227
    SOURCES += projector/OpenGLContext.Win.cpp
226
}
228
}
227
macx{
229
macx{
228
    CONFIG += objective_c
230
    CONFIG += objective_c
229
    OBJECTIVE_SOURCES += projector/OpenGLContext.Mac.mm
231
    OBJECTIVE_SOURCES += projector/OpenGLContext.Mac.mm
230
    LIBS += -framework Cocoa -framework OpenGL
232
    LIBS += -framework Cocoa -framework OpenGL
231
}
233
}
232
 
234
 
233
 
235
 
234
# Compile with camera driver bindings
236
# Compile with camera driver bindings
235
 
237
 
236
# Point Grey flycapture
238
# Point Grey flycapture
237
unix:!macx:exists(/usr/include/flycapture/FlyCapture2.h){
239
unix:!macx:exists(/usr/include/flycapture/FlyCapture2.h){
238
    INCLUDEPATH += /usr/include/flycapture
240
    INCLUDEPATH += /usr/include/flycapture
239
    DEFINES += WITH_CAMERAPOINTGREY
241
    DEFINES += WITH_CAMERAPOINTGREY
240
    LIBS += -lflycapture
242
    LIBS += -lflycapture
241
}
243
}
242
win32:exists("C:/Program Files/Point Grey Research/FlyCapture2/include/FlyCapture2.h"){
244
win32:exists("C:/Program Files/Point Grey Research/FlyCapture2/include/FlyCapture2.h"){
243
    DEFINES += WITH_CAMERAPOINTGREY
245
    DEFINES += WITH_CAMERAPOINTGREY
244
    INCLUDEPATH += "C:/Program Files/Point Grey Research/FlyCapture2/include/"
246
    INCLUDEPATH += "C:/Program Files/Point Grey Research/FlyCapture2/include/"
245
    LIBS += -L"C:/Program Files/Point Grey Research/FlyCapture2/lib64" -lFlyCapture2
247
    LIBS += -L"C:/Program Files/Point Grey Research/FlyCapture2/lib64" -lFlyCapture2
246
}
248
}
247
contains(DEFINES, WITH_CAMERAPOINTGREY) {
249
contains(DEFINES, WITH_CAMERAPOINTGREY) {
248
    HEADERS += camera/CameraPointGrey.h
250
    HEADERS += camera/CameraPointGrey.h
249
    SOURCES += camera/CameraPointGrey.cpp
251
    SOURCES += camera/CameraPointGrey.cpp
250
}
252
}
251
 
253
 
252
# Compile with rotation stage driver
254
# Compile with rotation stage driver
253
SOURCES += rotationstage/ArcusPerformaxDriver.c
255
SOURCES += rotationstage/ArcusPerformaxDriver.c
254
unix:!macx{
256
unix:!macx{
255
    PKGCONFIG += libusb-1.0
257
    PKGCONFIG += libusb-1.0
256
}
258
}
257
 
259