Subversion Repositories seema-scanner

Rev

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

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