Subversion Repositories seema-scanner

Rev

Rev 201 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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