Subversion Repositories seema-scanner

Rev

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

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