Subversion Repositories seema-scanner

Rev

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

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