Subversion Repositories seema-scanner

Rev

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