Subversion Repositories seema-scanner

Rev

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