Subversion Repositories seema-scanner

Rev

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