Subversion Repositories seema-scanner

Rev

Rev 108 | Rev 123 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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