Subversion Repositories seema-scanner

Rev

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

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