Subversion Repositories seema-scanner

Rev

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

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