Subversion Repositories seema-scanner

Rev

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