Subversion Repositories seema-scanner

Rev

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

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