Subversion Repositories seema-scanner

Rev

Rev 248 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 248 Rev 255
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
# Supported OS: Ubuntu 18.04
8
# Supported OS: Ubuntu 18.04
9
#
9
#
10
# Dependencies: Qt 5, OpenCV 3.x, PCL 1.8.1 and VTK 8 from ppa
10
# Dependencies: Qt 5, OpenCV 3.x, PCL 1.8.1 and VTK 8 from ppa
11
#
11
#
12
# Image Analysis and Computer Graphics, DTU, 2018
12
# Image Analysis and Computer Graphics, DTU, 2018
13
#
13
#
14
#------------------------------------------------------------
14
#------------------------------------------------------------
15
 
15
 
16
QT += core gui testlib
16
QT += core gui testlib
17
 
17
 
18
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
18
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
19
 
19
 
20
TARGET = SMScanner
20
TARGET = SMScanner
21
TEMPLATE = app
21
TEMPLATE = app
22
 
22
 
23
CONFIG += c++11
23
CONFIG += c++11
24
 
24
 
25
HEADERS  += SMScanner.h \
25
HEADERS  += SMScanner.h \
26
        SMVideoWidget.h \
26
        SMVideoWidget.h \
27
        SMPointCloudWidget.h \
27
        SMPointCloudWidget.h \
28
        camera/Camera.h \
28
        camera/Camera.h \
29
        projector/Projector.h \
29
        projector/Projector.h \
30
        projector/ProjectorOpenGL.h \
30
        projector/ProjectorOpenGL.h \
31
        projector/OpenGLContext.h \
31
        projector/OpenGLContext.h \
32
        cvtools.h \
32
        cvtools.h \
33
        SMCaptureWorker.h \
33
        SMCaptureWorker.h \
34
        rotationstage/RotationStage.h \
34
        rotationstage/RotationStage.h \
35
        SMPreferenceDialog.h \
35
        SMPreferenceDialog.h \
36
        SMTypes.h \
36
        SMTypes.h \
37
        SMCalibrationWorker.h \
37
        SMCalibrationWorker.h \
-
 
38
        SMExportWorker.h \
38
        #SMCalibrationWorkerArUco.h \
39
        #SMCalibrationWorkerArUco.h \
39
        SMCalibrationParameters.h \
40
        SMCalibrationParameters.h \
40
        SMReconstructionWorker.h \
41
        SMReconstructionWorker.h \
41
        #SMMeshingWorker.h \
42
        #SMMeshingWorker.h \
42
        algorithm/Algorithm.h \
43
        algorithm/Algorithm.h \
43
        algorithm/AlgorithmGrayCode.h \
44
        algorithm/AlgorithmGrayCode.h \
44
        algorithm/AlgorithmGrayCodeHorzVert.h \
45
        algorithm/AlgorithmGrayCodeHorzVert.h \
45
        algorithm/AlgorithmLineShift.h \
46
        algorithm/AlgorithmLineShift.h \
46
        algorithm/AlgorithmPhaseShiftThreeFreq.h \
47
        algorithm/AlgorithmPhaseShiftThreeFreq.h \
47
        algorithm/AlgorithmPhaseShiftTwoFreq.h \
48
        algorithm/AlgorithmPhaseShiftTwoFreq.h \
48
        algorithm/AlgorithmPhaseShiftTwoFreqHorzVert.h \
49
        algorithm/AlgorithmPhaseShiftTwoFreqHorzVert.h \
49
        algorithm/AlgorithmPhaseShiftEmbedded.h \
50
        algorithm/AlgorithmPhaseShiftEmbedded.h \
50
        algorithm/algorithmtools.h \
51
        algorithm/algorithmtools.h \
51
        SMVideoZoomWidget.h \
52
        SMVideoZoomWidget.h \
52
        SMLogDialog.h
53
        SMLogDialog.h
53
 
54
 
54
SOURCES += main.cpp\
55
SOURCES += main.cpp\
55
        SMScanner.cpp \
56
        SMScanner.cpp \
56
        SMVideoWidget.cpp \
57
        SMVideoWidget.cpp \
57
        SMPointCloudWidget.cpp \
58
        SMPointCloudWidget.cpp \
58
        camera/Camera.cpp \
59
        camera/Camera.cpp \
59
        projector/ProjectorOpenGL.cpp \
60
        projector/ProjectorOpenGL.cpp \
60
        cvtools.cpp \
61
        cvtools.cpp \
61
        SMCaptureWorker.cpp \
62
        SMCaptureWorker.cpp \
62
        rotationstage/RotationStage.cpp \
63
        rotationstage/RotationStage.cpp \
63
        SMPreferenceDialog.cpp \
64
        SMPreferenceDialog.cpp \
64
        SMCalibrationWorker.cpp \
65
        SMCalibrationWorker.cpp \
-
 
66
        SMExportWorker.cpp \
65
        #SMCalibrationWorkerArUco.cpp \
67
        #SMCalibrationWorkerArUco.cpp \
66
        SMCalibrationParameters.cpp \
68
        SMCalibrationParameters.cpp \
67
        SMReconstructionWorker.cpp \
69
        SMReconstructionWorker.cpp \
68
        #SMMeshingWorker.cpp \
70
        #SMMeshingWorker.cpp \
69
        algorithm/AlgorithmGrayCode.cpp \
71
        algorithm/AlgorithmGrayCode.cpp \
70
        algorithm/AlgorithmGrayCodeHorzVert.cpp \
72
        algorithm/AlgorithmGrayCodeHorzVert.cpp \
71
        algorithm/AlgorithmLineShift.cpp \
73
        algorithm/AlgorithmLineShift.cpp \
72
        algorithm/AlgorithmPhaseShiftThreeFreq.cpp \
74
        algorithm/AlgorithmPhaseShiftThreeFreq.cpp \
73
        algorithm/AlgorithmPhaseShiftTwoFreq.cpp \
75
        algorithm/AlgorithmPhaseShiftTwoFreq.cpp \
74
        algorithm/AlgorithmPhaseShiftTwoFreqHorzVert.cpp \
76
        algorithm/AlgorithmPhaseShiftTwoFreqHorzVert.cpp \
75
        algorithm/AlgorithmPhaseShiftEmbedded.cpp \
77
        algorithm/AlgorithmPhaseShiftEmbedded.cpp \
76
        SMVideoZoomWidget.cpp \
78
        SMVideoZoomWidget.cpp \
77
    SMLogDialog.cpp
79
    SMLogDialog.cpp
78
 
80
 
79
FORMS    += SMScanner.ui \
81
FORMS    += SMScanner.ui \
80
        SMAboutDialog.ui \
82
        SMAboutDialog.ui \
81
        SMPreferenceDialog.ui \
83
        SMPreferenceDialog.ui \
82
    SMLogDialog.ui
84
    SMLogDialog.ui
83
 
85
 
84
INCLUDEPATH += camera/ projector/ algorithm/ triangulator/ rotationstage/ calibration/
86
INCLUDEPATH += camera/ projector/ algorithm/ triangulator/ rotationstage/ calibration/
85
 
87
 
86
 
88
 
87
# Operating System dependant linking and including
89
# Operating System dependant linking and including
88
# Linux
90
# Linux
89
unix:!macx {
91
unix:!macx {
90
    CONFIG += link_pkgconfig
92
    CONFIG += link_pkgconfig
91
 
93
 
92
    # OpenCV
94
    # OpenCV
93
    PKGCONFIG += opencv
95
    PKGCONFIG += opencv
94
    LIBS += -lopencv_ximgproc -lopencv_aruco
96
    LIBS += -lopencv_ximgproc -lopencv_aruco
95
 
97
 
96
    # VTK 8
98
    # VTK 8
97
    INCLUDEPATH += /opt/vtk-opt/include/vtk-8.1
99
    INCLUDEPATH += /opt/vtk-opt/include/vtk-8.1
98
    LIBS += -L/opt/vtk-opt/lib -lvtkIOImage-8.1 -lvtkCommonExecutionModel-8.1 -lvtkCommonDataModel-8.1 -lvtkCommonMath-8.1 -lvtkCommonCore-8.1 -lvtkRenderingCore-8.1 -lvtkRenderingOpenGL2-8.1 -lvtkFiltersCore-8.1 -lvtkGUISupportQt-8.1
100
    LIBS += -L/opt/vtk-opt/lib -lvtkIOImage-8.1 -lvtkCommonExecutionModel-8.1 -lvtkCommonDataModel-8.1 -lvtkCommonMath-8.1 -lvtkCommonCore-8.1 -lvtkRenderingCore-8.1 -lvtkRenderingOpenGL2-8.1 -lvtkFiltersCore-8.1 -lvtkGUISupportQt-8.1
99
    QMAKE_RPATHDIR += /opt/vtk-opt/lib/
101
    QMAKE_RPATHDIR += /opt/vtk-opt/lib/
100
    QMAKE_RPATHLINKDIR += /opt/vtk-opt/lib
102
    QMAKE_RPATHLINKDIR += /opt/vtk-opt/lib
101
 
103
 
102
    # PCL
104
    # PCL
103
    INCLUDEPATH += /opt/pcl-opt/include/pcl-1.8
105
    INCLUDEPATH += /opt/pcl-opt/include/pcl-1.8
104
    LIBS += -lboost_system -L/opt/pcl-opt/lib -lpcl_visualization -lpcl_registration -lpcl_common -lpcl_features -lpcl_visualization -lpcl_io -lpcl_tracking -lpcl_filters -lpcl_sample_consensus -lpcl_surface -lpcl_search -lpcl_kdtree -lpcl_octree -lflann -lflann_cpp -lOpenNI -lOpenNI2
106
    LIBS += -lboost_system -L/opt/pcl-opt/lib -lpcl_visualization -lpcl_registration -lpcl_common -lpcl_features -lpcl_visualization -lpcl_io -lpcl_tracking -lpcl_filters -lpcl_sample_consensus -lpcl_surface -lpcl_search -lpcl_kdtree -lpcl_octree -lflann -lflann_cpp -lOpenNI -lOpenNI2
105
    #PKGCONFIG += pcl_common-1.8 pcl_visualization-1.8 pcl_search-1.8 pcl_filters-1.8 pcl_kdtree-1.8 pcl_tracking-1.8 pcl_tracking-1.8 pcl_sample_consensus-1.8 pcl_surface-1.8
107
    #PKGCONFIG += pcl_common-1.8 pcl_visualization-1.8 pcl_search-1.8 pcl_filters-1.8 pcl_kdtree-1.8 pcl_tracking-1.8 pcl_tracking-1.8 pcl_sample_consensus-1.8 pcl_surface-1.8
106
    QMAKE_RPATHDIR += /opt/pcl-opt/lib/
108
    QMAKE_RPATHDIR += /opt/pcl-opt/lib/
107
    QMAKE_RPATHLINKDIR += /opt/pcl-opt/lib
109
    QMAKE_RPATHLINKDIR += /opt/pcl-opt/lib
108
 
110
 
109
    # Eigen
111
    # Eigen
110
    PKGCONFIG += eigen3
112
    PKGCONFIG += eigen3
111
 
113
 
112
    # Ceres
114
    # Ceres
113
    CONFIG += c++11
115
    CONFIG += c++11
114
    LIBS += -fopenmp # -ltbb -ltbbmalloc -ltbbmalloc_proxy
116
    LIBS += -fopenmp # -ltbb -ltbbmalloc -ltbbmalloc_proxy
115
    LIBS += -lceres -lglog
117
    LIBS += -lceres -lglog
116
    #LIBS += -lcholmod
118
    #LIBS += -lcholmod
117
    QMAKE_CXXFLAGS += -fopenmp
119
    QMAKE_CXXFLAGS += -fopenmp
118
}
120
}
119
 
121
 
120
# Compile with system dependent OpenGL Context code
122
# Compile with system dependent OpenGL Context code
121
unix:!macx{
123
unix:!macx{
122
    SOURCES += projector/OpenGLContext.Xscreens.cpp
124
    SOURCES += projector/OpenGLContext.Xscreens.cpp
123
    LIBS += -lXxf86vm
125
    LIBS += -lXxf86vm
124
 
126
 
125
    # OpenGL/X11
127
    # OpenGL/X11
126
    PKGCONFIG += gl glu x11
128
    PKGCONFIG += gl glu x11
127
}
129
}
128
 
130
 
129
# Compile with camera driver bindings
131
# Compile with camera driver bindings
130
 
132
 
131
# Point Grey flycapture
133
# Point Grey flycapture
132
unix:!macx:exists(/usr/include/flycapture/FlyCapture2.h){
134
unix:!macx:exists(/usr/include/flycapture/FlyCapture2.h){
133
    INCLUDEPATH += /usr/include/flycapture
135
    INCLUDEPATH += /usr/include/flycapture
134
    DEFINES += WITH_CAMERAPOINTGREY
136
    DEFINES += WITH_CAMERAPOINTGREY
135
    LIBS += -lflycapture
137
    LIBS += -lflycapture
136
}
138
}
137
contains(DEFINES, WITH_CAMERAPOINTGREY) {
139
contains(DEFINES, WITH_CAMERAPOINTGREY) {
138
    HEADERS += camera/CameraPointGrey.h
140
    HEADERS += camera/CameraPointGrey.h
139
    SOURCES += camera/CameraPointGrey.cpp
141
    SOURCES += camera/CameraPointGrey.cpp
140
}
142
}
141
 
143
 
142
# Compile with rotation stage driver
144
# Compile with rotation stage driver
143
SOURCES += rotationstage/ArcusPerformaxDriver.c
145
SOURCES += rotationstage/ArcusPerformaxDriver.c
144
unix:!macx{
146
unix:!macx{
145
    PKGCONFIG += libusb-1.0
147
    PKGCONFIG += libusb-1.0
146
}
148
}
147
 
149