Subversion Repositories seema-scanner

Rev

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