Subversion Repositories seema-scanner

Rev

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