Subversion Repositories seema-scanner

Rev

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