Subversion Repositories seema-scanner

Rev

Rev 7 | Rev 9 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7 Rev 8
1
#------------------------------------------------------------
1
#------------------------------------------------------------
2
#
2
#
3
# SMScanner
3
# SMScanner
4
#
4
#
5
# Control Interface and point cloud construction interface
5
# Control Interface and point cloud construction interface
6
# for the SeeMa Lab Structured Light Scanner.
6
# for the SeeMa Lab Structured Light Scanner.
7
#
7
#
8
# Image Analysis and Computer Graphics, DTU, 2014
8
# Image Analysis and Computer Graphics, DTU, 2014
9
#
9
#
10
#------------------------------------------------------------
10
#------------------------------------------------------------
11
 
11
 
12
QT       += core gui
12
QT       += core gui
13
 
13
 
14
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
14
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
15
 
15
 
16
TARGET = SMScanner
16
TARGET = SMScanner
17
TEMPLATE = app
17
TEMPLATE = app
18
 
18
 
19
HEADERS  += SMScanner.h \
19
HEADERS  += SMScanner.h \
20
        SMVideoWidget.h \
20
        SMVideoWidget.h \
21
        SMPointCloudWidget.h \
21
        SMPointCloudWidget.h \
22
        camera/Camera.h \
22
        camera/Camera.h \
23
        projector/Projector.h \
23
        projector/Projector.h \
24
        projector/OpenGLContext.h \
24
        projector/OpenGLContext.h \
25
        codec/Codec.h \
25
        codec/Codec.h \
26
        codec/CodecGrayCode.h \
26
        codec/CodecGrayCode.h \
27
        codec/CodecPhaseShift2x3.h \
27
        codec/CodecPhaseShift2x3.h \
28
        triangulator/Triangulator.h \
28
        triangulator/Triangulator.h \
29
        cvtools.h \
29
        cvtools.h \
30
        SMCalibrationParams.h \
30
        SMCalibrationParams.h \
31
        SMCaptureWorker.h \
31
        SMCaptureWorker.h \
32
        SMTriangulationWorker.h \
32
        SMTriangulationWorker.h
33
        SMPreferenceDialog.h
-
 
34
 
33
 
35
SOURCES += main.cpp\
34
SOURCES += main.cpp\
36
        SMScanner.cpp \
35
        SMScanner.cpp \
37
        SMVideoWidget.cpp \
36
        SMVideoWidget.cpp \
38
        SMPointCloudWidget.cpp \
37
        SMPointCloudWidget.cpp \
39
        camera/Camera.cpp \
38
        camera/Camera.cpp \
40
        codec/CodecGrayCode.cpp \
39
        codec/CodecGrayCode.cpp \
41
        codec/CodecPhaseShift2x3.cpp \
40
        codec/CodecPhaseShift2x3.cpp \
42
        triangulator/Triangulator.cpp \
41
        triangulator/Triangulator.cpp \
43
        cvtools.cpp \
42
        cvtools.cpp \
44
        SMCalibrationParams.cpp \
43
        SMCalibrationParams.cpp \
45
        SMCaptureWorker.cpp \
44
        SMCaptureWorker.cpp \
46
        SMTriangulationWorker.cpp \
45
        SMTriangulationWorker.cpp
47
        SMPreferenceDialog.cpp
-
 
48
 
46
 
49
 
47
 
50
FORMS    += SMScanner.ui \
48
FORMS    += SMScanner.ui \
51
    SMAboutDialog.ui \
49
    SMAboutDialog.ui
52
        SMPreferenceDialog.ui
-
 
53
 
50
 
54
INCLUDEPATH += camera/ projector/ codec/ triangulator/
51
INCLUDEPATH += camera/ projector/ codec/ triangulator/
55
 
52
 
56
 
53
 
57
# Operating System dependant linking and including
54
# Operating System dependant linking and including
58
# Linux
55
# Linux
59
unix:!macx {
56
unix:!macx {
60
    CONFIG += link_pkgconfig
57
    CONFIG += link_pkgconfig
61
    # Link VTK and Boost (no pkg-config)
58
    # Link VTK and Boost (no pkg-config)
62
    INCLUDEPATH += /usr/include/vtk-5.8/
59
    INCLUDEPATH += /usr/include/vtk-5.8/
63
    LIBS += -lQVTK -lvtkCommon -lvtkFiltering -lvtkRendering -lvtkIO -lvtkGraphics
60
    LIBS += -lQVTK -lvtkCommon -lvtkFiltering -lvtkRendering -lvtkIO -lvtkGraphics
64
    # PCL pkg-config workaround
61
    # PCL pkg-config workaround
65
    LIBS += -lboost_system -lpcl_visualization -lpcl_common -lpcl_io -lpcl_search -lpcl_surface
62
    LIBS += -lboost_system -lpcl_visualization -lpcl_common -lpcl_io -lpcl_search -lpcl_surface
66
    # PKG-config libs
63
    # PKG-config libs
67
    INCLUDEPATH += /usr/local/include/pcl-1.7 /usr/include/eigen3/
64
    INCLUDEPATH += /usr/local/include/pcl-1.7 /usr/include/eigen3/
68
    PKGCONFIG += gl glu x11 xrandr 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
65
    PKGCONFIG += gl glu x11 xrandr 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
69
}
66
}
70
# Windows
67
# Windows
71
win32 {
68
win32 {
72
    # Boost join
69
    # Boost join
73
    DEFINES += DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED
70
    DEFINES += DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED
74
 
71
 
75
    # opencv
72
    # opencv
76
    INCLUDEPATH += "$$(OPENCV_INCLUDE_DIR)/" #C:\opencv\build\include
73
    INCLUDEPATH += "$$(OPENCV_INCLUDE_DIR)/" #C:\opencv\build\include
77
 
74
 
78
    CONFIG(debug,debug|release){
75
    CONFIG(debug,debug|release){
79
    #debug
76
    #debug
80
    LIBS += -L"$$(OPENCV_DIR)" \ #C:\opencv\build\x64\vc10\lib
77
    LIBS += -L"$$(OPENCV_DIR)" \ #C:\opencv\build\x64\vc10\lib
81
            -lopencv_core247d \
78
            -lopencv_core247d \
82
            -lopencv_highgui247d \
79
            -lopencv_highgui247d \
83
            -lopencv_imgproc247d \
80
            -lopencv_imgproc247d \
84
            -lopencv_calib3d247d
81
            -lopencv_calib3d247d
85
    } else {
82
    } else {
86
    #release
83
    #release
87
    LIBS += -L"$$(OPENCV_DIR)" \
84
    LIBS += -L"$$(OPENCV_DIR)" \
88
            -lopencv_core247 \
85
            -lopencv_core247 \
89
            -lopencv_highgui247 \
86
            -lopencv_highgui247 \
90
            -lopencv_imgproc247 \
87
            -lopencv_imgproc247 \
91
            -lopencv_calib3d247
88
            -lopencv_calib3d247
92
    }
89
    }
93
 
90
 
94
    # pcl
91
    # pcl
95
    INCLUDEPATH += "$$(PCL_INCLUDE_DIR)/" #C:\Program Files\PCL\include\pcl-1.7
92
    INCLUDEPATH += "$$(PCL_INCLUDE_DIR)/" #C:\Program Files\PCL\include\pcl-1.7
96
 
93
 
97
    CONFIG(debug,debug|release){
94
    CONFIG(debug,debug|release){
98
    #debug
95
    #debug
99
    LIBS += -L"$$(PCL_DIR)" \ #C:\Program Files\PCL\lib
96
    LIBS += -L"$$(PCL_DIR)" \ #C:\Program Files\PCL\lib
100
            -lpcl_visualization_debug \
97
            -lpcl_visualization_debug \
101
            -lpcl_io_debug \
98
            -lpcl_io_debug \
102
            -lpcl_common_debug \
99
            -lpcl_common_debug \
103
            -lpcl_features_debug \
100
            -lpcl_features_debug \
104
            -lpcl_filters_debug \
101
            -lpcl_filters_debug \
105
            -lpcl_io_debug \
102
            -lpcl_io_debug \
106
            -lpcl_io_ply_debug \
103
            -lpcl_io_ply_debug \
107
            -lpcl_kdtree_debug \
104
            -lpcl_kdtree_debug \
108
            -lpcl_keypoints_debug \
105
            -lpcl_keypoints_debug \
109
            -lpcl_octree_debug \
106
            -lpcl_octree_debug \
110
            -lpcl_registration_debug \
107
            -lpcl_registration_debug \
111
            -lpcl_sample_consensus_debug \
108
            -lpcl_sample_consensus_debug \
112
            -lpcl_search_debug \
109
            -lpcl_search_debug \
113
            -lpcl_segmentation_debug \
110
            -lpcl_segmentation_debug \
114
            -lpcl_surface_debug \
111
            -lpcl_surface_debug \
115
            -lpcl_tracking_debug \
112
            -lpcl_tracking_debug \
116
            -lpcl_visualization_debug
113
            -lpcl_visualization_debug
117
    } else {
114
    } else {
118
    # release
115
    # release
119
    LIBS += -L"$$(PCL_DIR)" \
116
    LIBS += -L"$$(PCL_DIR)" \
120
            -lpcl_visualization_release \
117
            -lpcl_visualization_release \
121
            -lpcl_io_release \
118
            -lpcl_io_release \
122
            -lpcl_common_release \
119
            -lpcl_common_release \
123
            -lpcl_features_release \
120
            -lpcl_features_release \
124
            -lpcl_filters_release \
121
            -lpcl_filters_release \
125
            -lpcl_io_release \
122
            -lpcl_io_release \
126
            -lpcl_io_ply_release \
123
            -lpcl_io_ply_release \
127
            -lpcl_kdtree_release \
124
            -lpcl_kdtree_release \
128
            -lpcl_keypoints_release \
125
            -lpcl_keypoints_release \
129
            -lpcl_octree_release \
126
            -lpcl_octree_release \
130
            -lpcl_registration_release \
127
            -lpcl_registration_release \
131
            -lpcl_sample_consensus_release \
128
            -lpcl_sample_consensus_release \
132
            -lpcl_search_release \
129
            -lpcl_search_release \
133
            -lpcl_segmentation_release \
130
            -lpcl_segmentation_release \
134
            -lpcl_surface_release \
131
            -lpcl_surface_release \
135
            -lpcl_tracking_release \
132
            -lpcl_tracking_release \
136
            -lpcl_visualization_release
133
            -lpcl_visualization_release
137
    }
134
    }
138
 
135
 
139
    # pcl dependencies
136
    # pcl dependencies
140
    INCLUDEPATH += "$$(BOOST_ROOT)/include" \
137
    INCLUDEPATH += "$$(BOOST_ROOT)/include" \
141
                   "$$(EIGEN_ROOT)/include" \
138
                   "$$(EIGEN_ROOT)/include" \
142
                   "$$(FLANN_ROOT)/include"
139
                   "$$(FLANN_ROOT)/include"
143
    LIBS += -L"$$(BOOST_ROOT)/lib" -lboost_system-vc100-mt-1_50 -lboost_system-vc100-mt-gd-1_50
140
    LIBS += -L"$$(BOOST_ROOT)/lib" -lboost_system-vc100-mt-1_50 -lboost_system-vc100-mt-gd-1_50
144
 
141
 
145
    # vtk
142
    # vtk
146
    INCLUDEPATH += "$$(VTK_INCLUDE_DIR)" #C:\Program Files\VTK\include\vtk-5.10
143
    INCLUDEPATH += "$$(VTK_INCLUDE_DIR)" #C:\Program Files\VTK\include\vtk-5.10
147
 
144
 
148
    CONFIG(debug,debug|release){
145
    CONFIG(debug,debug|release){
149
    #debug
146
    #debug
150
    LIBS += -L"$$(VTK_DIR)" \ #C:\Program Files\VTK\lib\vtk-5.10
147
    LIBS += -L"$$(VTK_DIR)" \ #C:\Program Files\VTK\lib\vtk-5.10
151
            -lvtkGraphics-gd \
148
            -lvtkGraphics-gd \
152
            -lQVTK-gd \
149
            -lQVTK-gd \
153
            -lvtkCommon-gd \
150
            -lvtkCommon-gd \
154
            -lvtkFiltering-gd \
151
            -lvtkFiltering-gd \
155
            -lvtkRendering-gd \
152
            -lvtkRendering-gd \
156
            -lvtkIO-gd \
153
            -lvtkIO-gd \
157
            -lvtkpng-gd \
154
            -lvtkpng-gd \
158
            -lvtksys-gd \
155
            -lvtksys-gd \
159
            -lvtktiff-gd \
156
            -lvtktiff-gd \
160
            -lvtkjpeg-gd \
157
            -lvtkjpeg-gd \
161
            -lvtkexpat-gd \
158
            -lvtkexpat-gd \
162
            -lvtkzlib-gd
159
            -lvtkzlib-gd
163
    } else {
160
    } else {
164
    # release
161
    # release
165
    LIBS += -L"$$(VTK_DIR)" \
162
    LIBS += -L"$$(VTK_DIR)" \
166
            -lvtkGraphics \
163
            -lvtkGraphics \
167
            -lQVTK \
164
            -lQVTK \
168
            -lvtkCommon \
165
            -lvtkCommon \
169
            -lvtkFiltering \
166
            -lvtkFiltering \
170
            -lvtkRendering \
167
            -lvtkRendering \
171
            -lvtkIO \
168
            -lvtkIO \
172
            -lvtkpng \
169
            -lvtkpng \
173
            -lvtksys \
170
            -lvtksys \
174
            -lvtktiff \
171
            -lvtktiff \
175
            -lvtkjpeg \
172
            -lvtkjpeg \
176
            -lvtkexpat \
173
            -lvtkexpat \
177
            -lvtkzlib
174
            -lvtkzlib
178
    }
175
    }
179
 
176
 
180
}
177
}
181
# Mac OS X
178
# Mac OS X
182
macx {
179
macx {
183
    INCLUDEPATH += /opt/local/include/vtk-5.10/
180
    INCLUDEPATH += /opt/local/include/vtk-5.10/
184
    LIBS += -L/opt/local/lib/vtk-5.10/ -lQVTK -lvtkCommon -lvtkFiltering -lvtkRendering -lvtkIO -lvtkGraphics
181
    LIBS += -L/opt/local/lib/vtk-5.10/ -lQVTK -lvtkCommon -lvtkFiltering -lvtkRendering -lvtkIO -lvtkGraphics
185
    LIBS += -L/opt/local/lib/ -lboost_system-mt
182
    LIBS += -L/opt/local/lib/ -lboost_system-mt
186
    CONFIG += link_pkgconfig
183
    CONFIG += link_pkgconfig
187
    PKGCONFIG += opencv pcl_visualization-1.7 pcl_filters-1.7 pcl_search-1.7 pcl_registration-1.7
184
    PKGCONFIG += opencv pcl_visualization-1.7 pcl_filters-1.7 pcl_search-1.7 pcl_registration-1.7
188
    DEFINES += BOOST_TT_HAS_OPERATOR_HPP_INCLUDED
185
    DEFINES += BOOST_TT_HAS_OPERATOR_HPP_INCLUDED
189
}
186
}
190
 
187
 
191
 
188
 
192
# Compile with system dependent OpenGL Context code
189
# Compile with system dependent OpenGL Context code
193
unix:!macx{
190
unix:!macx{
194
    SOURCES += projector/OpenGLContext.Unix.cpp
191
    SOURCES += projector/OpenGLContext.Unix.cpp
195
    LIBS += -lXxf86vm
192
    LIBS += -lXxf86vm
196
}
193
}
197
win32{
194
win32{
198
    SOURCES += projector/OpenGLContext.Win.cpp
195
    SOURCES += projector/OpenGLContext.Win.cpp
199
}
196
}
200
macx{
197
macx{
201
    CONFIG += objective_c
198
    CONFIG += objective_c
202
    OBJECTIVE_SOURCES += projector/OpenGLContext.Mac.mm
199
    OBJECTIVE_SOURCES += projector/OpenGLContext.Mac.mm
203
    LIBS += -framework Cocoa -framework OpenGL
200
    LIBS += -framework Cocoa -framework OpenGL
204
#    SOURCES += projector/OpenGLContext.GLFW.cpp
201
#    SOURCES += projector/OpenGLContext.GLFW.cpp
205
#    LIBS += -L/usr/local/lib/ -lglfw3
202
#    LIBS += -L/usr/local/lib/ -lglfw3
206
}
203
}
207
 
204
 
208
 
205
 
209
# Compile with specific camera driver bindings
206
# Compile with camera driver bindings
210
# libdc1394
-
 
211
unix:!macx:exists(/usr/include/dc1394/dc1394.h) {
-
 
212
    DEFINES += WITH_CAMERAIIDC
-
 
213
    LIBS += -ldc1394
-
 
214
}
-
 
215
macx:exists(/usr/local/include/dc1394/dc1394.h) {
-
 
216
    DEFINES += WITH_CAMERAIIDC
-
 
217
    LIBS += -ldc1394
-
 
218
}
-
 
219
contains(DEFINES, WITH_CAMERAIIDC) {
-
 
220
    HEADERS += camera/CameraIIDC.h
-
 
221
    SOURCES += camera/CameraIIDC.cpp
-
 
222
}
-
 
223
# IDS Imaging libueye
-
 
224
unix:!macx:exists(/usr/include/ueye.h) {
-
 
225
    DEFINES += WITH_CAMERAIDSIMAGING
-
 
226
    LIBS += -lueye_api
-
 
227
}
-
 
228
win32:exists("C:/Program Files/IDS/uEye/Develop/include/uEye.h"){
-
 
229
    DEFINES += WITH_CAMERAIDSIMAGING
-
 
230
    INCLUDEPATH += "C:/Program Files/IDS/uEye/Develop/include/"
-
 
231
    LIBS += -L"C:/Program Files/IDS/uEye/Develop/Lib" -luEye_api_64
-
 
232
}
-
 
233
contains(DEFINES, WITH_CAMERAIDSIMAGING) {
-
 
234
    HEADERS += camera/CameraIDSImaging.h
-
 
235
    SOURCES += camera/CameraIDSImaging.cpp
-
 
236
}
-
 
237
# XIMEA libm3api
-
 
238
unix:!macx:exists(/opt/XIMEA/include/xiApi.h){
-
 
239
    INCLUDEPATH += /opt/XIMEA/include
-
 
240
    DEFINES += WITH_CAMERAXIMEA
-
 
241
    LIBS += -lm3api
-
 
242
}
-
 
243
win32:exists("C:/XIMEA/API/xiApi.h"){
-
 
244
    DEFINES += WITH_CAMERAXIMEA
-
 
245
    INCLUDEPATH += "C:/XIMEA/API"
-
 
246
    LIBS += -L"C:/XIMEA/API/x64" -lm3apiX64
-
 
247
}
-
 
248
macx:exists(/Library/Frameworks/m3api.framework/m3api){
-
 
249
    DEFINES += WITH_CAMERAXIMEA
-
 
250
    INCLUDEPATH += /Library/Frameworks/m3api.framework/Headers/
-
 
251
    LIBS += -framework m3api
-
 
252
}
-
 
253
contains(DEFINES, WITH_CAMERAXIMEA) {
-
 
254
    HEADERS += camera/CameraXIMEA.h
-
 
255
    SOURCES += camera/CameraXIMEA.cpp
-
 
256
}
207
 
257
# Point Grey flycapture
208
# Point Grey flycapture
258
unix:!macx:exists(/usr/include/flycapture/FlyCapture2.h){
209
unix:!macx:exists(/usr/include/flycapture/FlyCapture2.h){
259
    INCLUDEPATH += /usr/include/flycapture
210
    INCLUDEPATH += /usr/include/flycapture
260
    DEFINES += WITH_CAMERAPOINTGREY
211
    DEFINES += WITH_CAMERAPOINTGREY
261
    LIBS += -lflycapture
212
    LIBS += -lflycapture
262
}
213
}
263
win32:exists("C:/Program Files/Point Grey Research/FlyCapture2/include/FlyCapture2.h"){
214
win32:exists("C:/Program Files/Point Grey Research/FlyCapture2/include/FlyCapture2.h"){
264
    DEFINES += WITH_CAMERAPOINTGREY
215
    DEFINES += WITH_CAMERAPOINTGREY
265
    INCLUDEPATH += "C:/Program Files/Point Grey Research/FlyCapture2/include/"
216
    INCLUDEPATH += "C:/Program Files/Point Grey Research/FlyCapture2/include/"
266
    LIBS += -L"C:/Program Files/Point Grey Research/FlyCapture2/lib64" -lFlyCapture2
217
    LIBS += -L"C:/Program Files/Point Grey Research/FlyCapture2/lib64" -lFlyCapture2
267
}
218
}
268
contains(DEFINES, WITH_CAMERAPOINTGREY) {
219
contains(DEFINES, WITH_CAMERAPOINTGREY) {
269
    HEADERS += camera/CameraPointGrey.h
220
    HEADERS += camera/CameraPointGrey.h
270
    SOURCES += camera/CameraPointGrey.cpp
221
    SOURCES += camera/CameraPointGrey.cpp
271
}
222
}
272
 
223
 
273
 
224
 
274
 
225
 
275
 
226