Subversion Repositories seema-scanner

Rev

Rev 231 | Rev 248 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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