Subversion Repositories seema-scanner

Rev

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