Subversion Repositories seema-scanner

Rev

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