Subversion Repositories seema-scanner

Rev

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

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