Subversion Repositories seema-scanner

Rev

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