Subversion Repositories seema-scanner

Rev

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

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