Subversion Repositories seema-scanner

Rev

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