Subversion Repositories seema-scanner

Rev

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

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