Subversion Repositories seema-scanner

Rev

Rev 233 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 233 Rev 248
Line 3... Line 3...
3
# SMScanner
3
# SMScanner
4
#
4
#
5
# Control Interface and point cloud reconstruction interface
5
# Control Interface and point cloud reconstruction interface
6
# for the SeeMa Lab Structured Light Scanner.
6
# for the SeeMa Lab Structured Light Scanner.
7
#
7
#
8
# Supported OS: Ubuntu 16.04
8
# Supported OS: Ubuntu 18.04
9
#
9
#
10
# Dependencies: Qt 5, OpenCV, PCL 1.7.2
10
# Dependencies: Qt 5, OpenCV 3.x, PCL 1.8.1 and VTK 8 from ppa
11
#
11
#
12
# Image Analysis and Computer Graphics, DTU, 2017
12
# Image Analysis and Computer Graphics, DTU, 2018
13
#
13
#
14
#------------------------------------------------------------
14
#------------------------------------------------------------
15
 
15
 
16
QT += core gui testlib
16
QT += core gui testlib
17
 
17
 
Line 86... Line 86...
86
 
86
 
87
# Operating System dependant linking and including
87
# Operating System dependant linking and including
88
# Linux
88
# Linux
89
unix:!macx {
89
unix:!macx {
90
    CONFIG += link_pkgconfig
90
    CONFIG += link_pkgconfig
-
 
91
 
-
 
92
    # OpenCV
-
 
93
    PKGCONFIG += opencv
91
    # Link VTK (no pkg-config, only cmake files, hence we link manually for now)
94
    LIBS += -lopencv_ximgproc -lopencv_aruco
-
 
95
 
-
 
96
    # VTK 8
92
    INCLUDEPATH += /usr/include/vtk-6.2/
97
    INCLUDEPATH += /opt/vtk-opt/include/vtk-8.1
93
    LIBS += -lvtkViewsQt-6.2 -lvtkRenderingQt-6.2 -lvtkGUISupportQt-6.2 -lvtkRenderingCore-6.2 -lvtkCommonExecutionModel-6.2 \
-
 
94
            -lvtkCommonDataModel-6.2 -lvtkCommonMath-6.2 -lvtkCommonCore-6.2 -lvtkIOImage-6.2 -lvtkCommonColor-6.2
98
    LIBS += -L/opt/vtk-opt/lib -lvtkIOImage-8.1 -lvtkCommonExecutionModel-8.1 -lvtkCommonDataModel-8.1 -lvtkCommonMath-8.1 -lvtkCommonCore-8.1 -lvtkRenderingCore-8.1 -lvtkRenderingOpenGL2-8.1 -lvtkFiltersCore-8.1 -lvtkGUISupportQt-8.1
95
    # PCL pkg-config workaround
99
    QMAKE_RPATHDIR += /opt/vtk-opt/lib/
96
    LIBS += -lboost_system # -lpcl_visualization -lpcl_common -lpcl_io -lpcl_search -lpcl_surface
100
    QMAKE_RPATHLINKDIR += /opt/vtk-opt/lib
-
 
101
 
97
    # PKG-config libs
102
    # PCL
98
    INCLUDEPATH += /usr/include/pcl-1.8 /usr/include/eigen3/
103
    INCLUDEPATH += /opt/pcl-opt/include/pcl-1.8
99
    PKGCONFIG += gl x11 opencv pcl_visualization-1.8 pcl_surface-1.8 pcl_search-1.8 \
104
    LIBS += -lboost_system -L/opt/pcl-opt/lib -lpcl_visualization -lpcl_registration -lpcl_common -lpcl_features -lpcl_visualization -lpcl_io -lpcl_tracking -lpcl_filters -lpcl_sample_consensus -lpcl_surface -lpcl_search -lpcl_kdtree -lpcl_octree -lflann -lflann_cpp -lOpenNI -lOpenNI2
100
                 pcl_filters-1.8 pcl_kdtree-1.8 pcl_tracking-1.8 flann eigen3
105
    #PKGCONFIG += pcl_common-1.8 pcl_visualization-1.8 pcl_search-1.8 pcl_filters-1.8 pcl_kdtree-1.8 pcl_tracking-1.8 pcl_tracking-1.8 pcl_sample_consensus-1.8 pcl_surface-1.8
-
 
106
    QMAKE_RPATHDIR += /opt/pcl-opt/lib/
-
 
107
    QMAKE_RPATHLINKDIR += /opt/pcl-opt/lib
-
 
108
 
-
 
109
    # Eigen
-
 
110
    PKGCONFIG += eigen3
-
 
111
 
101
    # Ceres
112
    # Ceres
102
    CONFIG += c++11
113
    CONFIG += c++11
103
    LIBS += -fopenmp # -ltbb -ltbbmalloc -ltbbmalloc_proxy
114
    LIBS += -fopenmp # -ltbb -ltbbmalloc -ltbbmalloc_proxy
104
    LIBS += -lceres -lglog
115
    LIBS += -lceres -lglog
105
    #LIBS += -lcholmod
116
    #LIBS += -lcholmod
106
    QMAKE_CXXFLAGS += -fopenmp
117
    QMAKE_CXXFLAGS += -fopenmp
107
}
118
}
108
 
119
 
109
 
-
 
110
# Windows
-
 
111
win32 {
-
 
112
    # Boost join
-
 
113
    DEFINES += DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED
-
 
114
 
-
 
115
    # opencv
-
 
116
    INCLUDEPATH += "$$(OPENCV_INCLUDE_DIR)/" #C:\opencv\build\include
-
 
117
 
-
 
118
    CONFIG(debug,debug|release){
-
 
119
    #debug
-
 
120
    LIBS += -L"$$(OPENCV_DIR)" \ #C:\opencv\build\x64\vc10\lib
-
 
121
            -lopencv_core247d \
-
 
122
            -lopencv_highgui247d \
-
 
123
            -lopencv_imgproc247d \
-
 
124
            -lopencv_calib3d247d
-
 
125
    } else {
-
 
126
    #release
-
 
127
    LIBS += -L"$$(OPENCV_DIR)" \
-
 
128
            -lopencv_core247 \
-
 
129
            -lopencv_highgui247 \
-
 
130
            -lopencv_imgproc247 \
-
 
131
            -lopencv_calib3d247
-
 
132
    }
-
 
133
 
-
 
134
    # pcl
-
 
135
    INCLUDEPATH += "$$(PCL_INCLUDE_DIR)/" #C:\Program Files\PCL\include\pcl-1.7
-
 
136
 
-
 
137
    CONFIG(debug,debug|release){
-
 
138
    #debug
-
 
139
    LIBS += -L"$$(PCL_DIR)" \ #C:\Program Files\PCL\lib
-
 
140
            -lpcl_visualization_debug \
-
 
141
            -lpcl_io_debug \
-
 
142
            -lpcl_common_debug \
-
 
143
            -lpcl_features_debug \
-
 
144
            -lpcl_filters_debug \
-
 
145
            -lpcl_io_debug \
-
 
146
            -lpcl_io_ply_debug \
-
 
147
            -lpcl_kdtree_debug \
-
 
148
            -lpcl_keypoints_debug \
-
 
149
            -lpcl_octree_debug \
-
 
150
            -lpcl_registration_debug \
-
 
151
            -lpcl_sample_consensus_debug \
-
 
152
            -lpcl_search_debug \
-
 
153
            -lpcl_segmentation_debug \
-
 
154
            -lpcl_surface_debug \
-
 
155
            -lpcl_tracking_debug \
-
 
156
            -lpcl_visualization_debug
-
 
157
    } else {
-
 
158
    # release
-
 
159
    LIBS += -L"$$(PCL_DIR)" \
-
 
160
            -lpcl_visualization_release \
-
 
161
            -lpcl_io_release \
-
 
162
            -lpcl_common_release \
-
 
163
            -lpcl_features_release \
-
 
164
            -lpcl_filters_release \
-
 
165
            -lpcl_io_release \
-
 
166
            -lpcl_io_ply_release \
-
 
167
            -lpcl_kdtree_release \
-
 
168
            -lpcl_keypoints_release \
-
 
169
            -lpcl_octree_release \
-
 
170
            -lpcl_registration_release \
-
 
171
            -lpcl_sample_consensus_release \
-
 
172
            -lpcl_search_release \
-
 
173
            -lpcl_segmentation_release \
-
 
174
            -lpcl_surface_release \
-
 
175
            -lpcl_tracking_release \
-
 
176
            -lpcl_visualization_release
-
 
177
    }
-
 
178
 
-
 
179
    # pcl dependencies
-
 
180
    INCLUDEPATH += "$$(BOOST_ROOT)/include" \
-
 
181
                   "$$(EIGEN_ROOT)/include" \
-
 
182
                   "$$(FLANN_ROOT)/include"
-
 
183
    LIBS += -L"$$(BOOST_ROOT)/lib" -lboost_system-vc100-mt-1_50 -lboost_system-vc100-mt-gd-1_50
-
 
184
 
-
 
185
    # vtk
-
 
186
    INCLUDEPATH += "$$(VTK_INCLUDE_DIR)" #C:\Program Files\VTK\include\vtk-5.10
-
 
187
 
-
 
188
    CONFIG(debug,debug|release){
-
 
189
    #debug
-
 
190
    LIBS += -L"$$(VTK_DIR)" \ #C:\Program Files\VTK\lib\vtk-5.10
-
 
191
            -lvtkGraphics-gd \
-
 
192
            -lQVTK-gd \
-
 
193
            -lvtkCommon-gd \
-
 
194
            -lvtkFiltering-gd \
-
 
195
            -lvtkRendering-gd \
-
 
196
            -lvtkIO-gd \
-
 
197
            -lvtkpng-gd \
-
 
198
            -lvtksys-gd \
-
 
199
            -lvtktiff-gd \
-
 
200
            -lvtkjpeg-gd \
-
 
201
            -lvtkexpat-gd \
-
 
202
            -lvtkzlib-gd
-
 
203
    } else {
-
 
204
    # release
-
 
205
    LIBS += -L"$$(VTK_DIR)" \
-
 
206
            -lvtkGraphics \
-
 
207
            -lQVTK \
-
 
208
            -lvtkCommon \
-
 
209
            -lvtkFiltering \
-
 
210
            -lvtkRendering \
-
 
211
            -lvtkIO \
-
 
212
            -lvtkpng \
-
 
213
            -lvtksys \
-
 
214
            -lvtktiff \
-
 
215
            -lvtkjpeg \
-
 
216
            -lvtkexpat \
-
 
217
            -lvtkzlib
-
 
218
    }
-
 
219
 
-
 
220
}
-
 
221
# Mac OS X
-
 
222
macx {
-
 
223
    INCLUDEPATH += /opt/local/include/vtk-5.10/
-
 
224
    LIBS += -L/opt/local/lib/vtk-5.10/ -lQVTK -lvtkCommon -lvtkFiltering -lvtkRendering -lvtkIO -lvtkGraphics
-
 
225
    LIBS += -L/opt/local/lib/ -lboost_system-mt
-
 
226
    CONFIG += link_pkgconfig
-
 
227
    PKGCONFIG += opencv pcl_visualization-1.7 pcl_filters-1.7 pcl_search-1.7 pcl_registration-1.7
-
 
228
    DEFINES += BOOST_TT_HAS_OPERATOR_HPP_INCLUDED
-
 
229
}
-
 
230
 
-
 
231
 
-
 
232
# Compile with system dependent OpenGL Context code
120
# Compile with system dependent OpenGL Context code
233
unix:!macx{
121
unix:!macx{
234
    SOURCES += projector/OpenGLContext.Xscreens.cpp
122
    SOURCES += projector/OpenGLContext.Xscreens.cpp
235
    LIBS += -lXxf86vm
123
    LIBS += -lXxf86vm
236
}
-
 
237
win32{
-
 
238
    SOURCES += projector/OpenGLContext.Win.cpp
-
 
239
}
-
 
240
macx{
-
 
241
    CONFIG += objective_c
-
 
242
    OBJECTIVE_SOURCES += projector/OpenGLContext.Mac.mm
-
 
243
    LIBS += -framework Cocoa -framework OpenGL
-
 
244
}
-
 
245
 
124
 
-
 
125
    # OpenGL/X11
-
 
126
    PKGCONFIG += gl glu x11
-
 
127
}
246
 
128
 
247
# Compile with camera driver bindings
129
# Compile with camera driver bindings
248
 
130
 
249
# Point Grey flycapture
131
# Point Grey flycapture
250
unix:!macx:exists(/usr/include/flycapture/FlyCapture2.h){
132
unix:!macx:exists(/usr/include/flycapture/FlyCapture2.h){
251
    INCLUDEPATH += /usr/include/flycapture
133
    INCLUDEPATH += /usr/include/flycapture
252
    DEFINES += WITH_CAMERAPOINTGREY
134
    DEFINES += WITH_CAMERAPOINTGREY
253
    LIBS += -lflycapture
135
    LIBS += -lflycapture
254
}
136
}
255
win32:exists("C:/Program Files/Point Grey Research/FlyCapture2/include/FlyCapture2.h"){
-
 
256
    DEFINES += WITH_CAMERAPOINTGREY
-
 
257
    INCLUDEPATH += "C:/Program Files/Point Grey Research/FlyCapture2/include/"
-
 
258
    LIBS += -L"C:/Program Files/Point Grey Research/FlyCapture2/lib64" -lFlyCapture2
-
 
259
}
-
 
260
contains(DEFINES, WITH_CAMERAPOINTGREY) {
137
contains(DEFINES, WITH_CAMERAPOINTGREY) {
261
    HEADERS += camera/CameraPointGrey.h
138
    HEADERS += camera/CameraPointGrey.h
262
    SOURCES += camera/CameraPointGrey.cpp
139
    SOURCES += camera/CameraPointGrey.cpp
263
}
140
}
264
 
141