Subversion Repositories seema-scanner

Rev

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

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