Subversion Repositories seema-scanner

Rev

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

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