Subversion Repositories seema-scanner

Rev

Rev 200 | Rev 207 | 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)
85
    INCLUDEPATH += /usr/include/vtk-6.2/
86
    LIBS += -lvtkViewsQt-6.2 -lvtkRenderingQt-6.2 -lvtkGUISupportQt-6.2 -lvtkRenderingCore-6.2 -lvtkCommonExecutionModel-6.2 \
87
            -lvtkCommonDataModel-6.2 -lvtkCommonMath-6.2 -lvtkCommonCore-6.2 -lvtkIOImage-6.2 -lvtkCommonColor-6.2
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
91
    INCLUDEPATH += /usr/local/include/pcl-1.7 /usr/include/eigen3/
108 jakw 92
    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 93
    # Ceres
94
    CONFIG += c++11
95
    LIBS += -lceres -lglog
2 jakw 96
}
70 jakw 97
 
98
 
2 jakw 99
# Windows
100
win32 {
101
    # Boost join
102
    DEFINES += DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED
103
 
104
    # opencv
105
    INCLUDEPATH += "$$(OPENCV_INCLUDE_DIR)/" #C:\opencv\build\include
106
 
107
    CONFIG(debug,debug|release){
108
    #debug
109
    LIBS += -L"$$(OPENCV_DIR)" \ #C:\opencv\build\x64\vc10\lib
110
            -lopencv_core247d \
111
            -lopencv_highgui247d \
112
            -lopencv_imgproc247d \
113
            -lopencv_calib3d247d
114
    } else {
115
    #release
116
    LIBS += -L"$$(OPENCV_DIR)" \
117
            -lopencv_core247 \
118
            -lopencv_highgui247 \
119
            -lopencv_imgproc247 \
120
            -lopencv_calib3d247
121
    }
122
 
123
    # pcl
124
    INCLUDEPATH += "$$(PCL_INCLUDE_DIR)/" #C:\Program Files\PCL\include\pcl-1.7
125
 
126
    CONFIG(debug,debug|release){
127
    #debug
128
    LIBS += -L"$$(PCL_DIR)" \ #C:\Program Files\PCL\lib
129
            -lpcl_visualization_debug \
130
            -lpcl_io_debug \
131
            -lpcl_common_debug \
132
            -lpcl_features_debug \
133
            -lpcl_filters_debug \
134
            -lpcl_io_debug \
135
            -lpcl_io_ply_debug \
136
            -lpcl_kdtree_debug \
137
            -lpcl_keypoints_debug \
138
            -lpcl_octree_debug \
139
            -lpcl_registration_debug \
140
            -lpcl_sample_consensus_debug \
141
            -lpcl_search_debug \
142
            -lpcl_segmentation_debug \
143
            -lpcl_surface_debug \
144
            -lpcl_tracking_debug \
145
            -lpcl_visualization_debug
146
    } else {
147
    # release
148
    LIBS += -L"$$(PCL_DIR)" \
149
            -lpcl_visualization_release \
150
            -lpcl_io_release \
151
            -lpcl_common_release \
152
            -lpcl_features_release \
153
            -lpcl_filters_release \
154
            -lpcl_io_release \
155
            -lpcl_io_ply_release \
156
            -lpcl_kdtree_release \
157
            -lpcl_keypoints_release \
158
            -lpcl_octree_release \
159
            -lpcl_registration_release \
160
            -lpcl_sample_consensus_release \
161
            -lpcl_search_release \
162
            -lpcl_segmentation_release \
163
            -lpcl_surface_release \
164
            -lpcl_tracking_release \
165
            -lpcl_visualization_release
166
    }
167
 
168
    # pcl dependencies
169
    INCLUDEPATH += "$$(BOOST_ROOT)/include" \
170
                   "$$(EIGEN_ROOT)/include" \
171
                   "$$(FLANN_ROOT)/include"
172
    LIBS += -L"$$(BOOST_ROOT)/lib" -lboost_system-vc100-mt-1_50 -lboost_system-vc100-mt-gd-1_50
173
 
174
    # vtk
175
    INCLUDEPATH += "$$(VTK_INCLUDE_DIR)" #C:\Program Files\VTK\include\vtk-5.10
176
 
177
    CONFIG(debug,debug|release){
178
    #debug
179
    LIBS += -L"$$(VTK_DIR)" \ #C:\Program Files\VTK\lib\vtk-5.10
180
            -lvtkGraphics-gd \
181
            -lQVTK-gd \
182
            -lvtkCommon-gd \
183
            -lvtkFiltering-gd \
184
            -lvtkRendering-gd \
185
            -lvtkIO-gd \
186
            -lvtkpng-gd \
187
            -lvtksys-gd \
188
            -lvtktiff-gd \
189
            -lvtkjpeg-gd \
190
            -lvtkexpat-gd \
191
            -lvtkzlib-gd
192
    } else {
193
    # release
194
    LIBS += -L"$$(VTK_DIR)" \
195
            -lvtkGraphics \
196
            -lQVTK \
197
            -lvtkCommon \
198
            -lvtkFiltering \
199
            -lvtkRendering \
200
            -lvtkIO \
201
            -lvtkpng \
202
            -lvtksys \
203
            -lvtktiff \
204
            -lvtkjpeg \
205
            -lvtkexpat \
206
            -lvtkzlib
207
    }
208
 
4 jakw 209
}
210
# Mac OS X
211
macx {
212
    INCLUDEPATH += /opt/local/include/vtk-5.10/
213
    LIBS += -L/opt/local/lib/vtk-5.10/ -lQVTK -lvtkCommon -lvtkFiltering -lvtkRendering -lvtkIO -lvtkGraphics
214
    LIBS += -L/opt/local/lib/ -lboost_system-mt
215
    CONFIG += link_pkgconfig
216
    PKGCONFIG += opencv pcl_visualization-1.7 pcl_filters-1.7 pcl_search-1.7 pcl_registration-1.7
217
    DEFINES += BOOST_TT_HAS_OPERATOR_HPP_INCLUDED
218
}
2 jakw 219
 
220
 
4 jakw 221
# Compile with system dependent OpenGL Context code
222
unix:!macx{
36 jakw 223
    SOURCES += projector/OpenGLContext.Xscreens.cpp
224
    LIBS += -lXxf86vm
2 jakw 225
}
4 jakw 226
win32{
227
    SOURCES += projector/OpenGLContext.Win.cpp
228
}
229
macx{
230
    CONFIG += objective_c
231
    OBJECTIVE_SOURCES += projector/OpenGLContext.Mac.mm
232
    LIBS += -framework Cocoa -framework OpenGL
233
}
2 jakw 234
 
4 jakw 235
 
8 jakw 236
# Compile with camera driver bindings
237
 
4 jakw 238
# Point Grey flycapture
239
unix:!macx:exists(/usr/include/flycapture/FlyCapture2.h){
240
    INCLUDEPATH += /usr/include/flycapture
241
    DEFINES += WITH_CAMERAPOINTGREY
242
    LIBS += -lflycapture
243
}
244
win32:exists("C:/Program Files/Point Grey Research/FlyCapture2/include/FlyCapture2.h"){
245
    DEFINES += WITH_CAMERAPOINTGREY
246
    INCLUDEPATH += "C:/Program Files/Point Grey Research/FlyCapture2/include/"
247
    LIBS += -L"C:/Program Files/Point Grey Research/FlyCapture2/lib64" -lFlyCapture2
248
}
2 jakw 249
contains(DEFINES, WITH_CAMERAPOINTGREY) {
250
    HEADERS += camera/CameraPointGrey.h
251
    SOURCES += camera/CameraPointGrey.cpp
252
}
253
 
9 jakw 254
# Compile with rotation stage driver
255
SOURCES += rotationstage/ArcusPerformaxDriver.c
256
unix:!macx{
257
    PKGCONFIG += libusb-1.0
258
}