Subversion Repositories seema-scanner

Rev

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