Subversion Repositories seema-scanner

Rev

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