Subversion Repositories seema-scanner

Rev

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

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