-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVideo.pro
165 lines (149 loc) · 6.14 KB
/
Video.pro
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
#
# Adapt the following parameters depending on your platform and the installed libraries (OpenCV + ZBar)
#
unix {
# Path to global OpenCV installation directory
MY_OPENCV_DIR = /Users/dechamps/Documents/Codes/Libraries/opencv-4.5.2/install
#
# If you don't have the OpenCV object detect library, comment the following 2 lines
CONFIG += objdetect
# (Macro) Path to the directory containing the cascade classifier files for face detection
DEFINES += OPENCV_HAARCASCADES_DIR=\\\"/Users/dechamps/Documents/Codes/Libraries/opencv-4.5.2/install/share/opencv4/haarcascades/\\\"
#
# If you don't have the OpenCV extra module Face, comment the following line
CONFIG += face
# https://github.com/kurnianggoro/GSOC2017/blob/master/data/lbfmodel.yaml
# (Macro) Path to the directory containing the facemark file "lbfmodel.yaml"
DEFINES += OPENCV_FACEMARK_DIR=\\\"/Users/dechamps/Documents/Codes/Libraries/opencv-4.5.2/install/share/opencv4/lbfmodel/\\\"
#
# If you don't have the ZBar library, comment the following line
CONFIG += zbar
MY_ZBAR_DIR = /Users/dechamps/Documents/Codes/Cpp/Images/Libraries/zbar-0.10/install
#
#
CONFIG += tesseract
MY_TESSERACT_DIR = /Users/dechamps/Documents/Codes/Libraries/tesseract-4.1.1/install
DEFINES += TESSERACT_DATA=\\\"/Users/dechamps/Documents/Codes/Libraries/tesseract-4.1.1/tessdata-master/\\\"
DEFINES += TESSERACT_DNN=\\\"/Users/dechamps/Documents/Codes/Libraries/opencv-4.5.2/install/share/opencv4/dnn/frozen_east_text_detection.pb\\\"
#
}
win32 {
# Path to global OpenCV installation directory
MY_OPENCV_DIR = D:\Libraries\opencv-4.5.2\build\install
#
# If you don't have the OpenCV object detect library, comment the following 2 lines
CONFIG += objdetect
# (Macro) Path to the directory containing the cascade classifier files for face detection
DEFINES += OPENCV_HAARCASCADES_DIR=\\\"D:/Libraries/opencv-4.5.2/build/install/etc/haarcascades/\\\"
#
# If you don't have the OpenCV extra module Face, comment the following line
CONFIG += face
# https://github.com/kurnianggoro/GSOC2017/blob/master/data/lbfmodel.yaml
# (Macro) Path to the directory containing the facemark file "lbfmodel.yaml"
DEFINES += OPENCV_FACEMARK_DIR=\\\"D:/Libraries/opencv-4.5.2/build/install/etc/facemark/\\\"
#
# If you don't have the ZBar library, comment the following line
#CONFIG += zbar
#MY_ZBAR_DIR =
}
# If you don't have the OpenCV stiching library, comment the following line
CONFIG += stitching
#
# If you don't have the OpenCV extra module Xphoto, comment the following line
CONFIG += xphoto
#
############# DO NOT MODIFY BELOW THIS LINE #############
#
stitching: DEFINES+=withstitching
objdetect: DEFINES+=withobjdetect
xphoto: DEFINES+=withxphoto
zbar: DEFINES+=withzbar
face: DEFINES+=withface
tesseract: DEFINES+=withtesseract
QT = core gui multimedia concurrent
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = Video
TEMPLATE = app
# Resource collection
RESOURCES = images.qrc
SOURCES = main.cpp \
dialog_choose_camera.cpp \
myimage.cpp \
mainwindow.cpp \
dialog_blur.cpp \
dialog_edge.cpp \
dialog_threshold.cpp \
dialog_transformation.cpp \
dialog_histogram.cpp \
dialog_object_detection.cpp \
dialog_motion_detection.cpp \
secondarywindow.cpp \
dialog_photo.cpp \
capturevideo.cpp
stitching: SOURCES+=dialog_panorama.cpp
tesseract: SOURCES += window_tesseract.cpp
HEADERS += myimage.h \
dialog_choose_camera.h \
mainwindow.h \
dialog_blur.h \
dialog_edge.h \
dialog_threshold.h \
dialog_transformation.h \
dialog_histogram.h \
dialog_object_detection.h \
dialog_motion_detection.h \
secondarywindow.h \
dialog_photo.h \
capturevideo.h
stitching: HEADERS += dialog_panorama.h
tesseract: HEADERS += window_tesseract.h
# Include the header from ZBar
zbar: INCLUDEPATH += $${MY_ZBAR_DIR}/include
tesseract: INCLUDEPATH += $${MY_TESSERACT_DIR}/include
win32 {
message("Windows build")
# Path to OpenCV include directory
INCLUDEPATH += $${MY_OPENCV_DIR}\include
# Required OpenCV libraries
LIBS = $${MY_OPENCV_DIR}\x64\vc15\lib\opencv_imgcodecs452.lib \
$${MY_OPENCV_DIR}\x64\vc15\lib\opencv_core452.lib \
$${MY_OPENCV_DIR}\x64\vc15\lib\opencv_highgui452.lib \
$${MY_OPENCV_DIR}\x64\vc15\lib\opencv_videoio452.lib \
$${MY_OPENCV_DIR}\x64\vc15\lib\opencv_imgproc452.lib \
$${MY_OPENCV_DIR}\x64\vc15\lib\opencv_video452.lib \
$${MY_OPENCV_DIR}\x64\vc15\lib\opencv_photo452.lib
stitching: LIBS += $${MY_OPENCV_DIR}\x64\vc15\lib\opencv_stitching452.lib
objdetect: LIBS += $${MY_OPENCV_DIR}\x64\vc15\lib\opencv_objdetect452.lib
xphoto: LIBS += $${MY_OPENCV_DIR}\x64\vc15\lib\opencv_xphoto452.lib
face: LIBS += $${MY_OPENCV_DIR}\x64\vc15\lib\opencv_face452.lib
zbar: LIBS += $${MY_ZBAR_DIR}\lib\libzbar-0.lib
tesseract: LIBS += $${MY_TESSERACT_DIR}\lib\tesseract41.lib $${MY_OPENCV_DIR}\x64\vc15\lib\opencv_dnn452.lib
}
unix {
message("Unix build")
# Path to OpenCV include directory
INCLUDEPATH += $${MY_OPENCV_DIR}/include/opencv4
# Compilator flags
QMAKE_CXXFLAGS += -std=c++11
# Linker flags
QMAKE_LFLAGS += -Wl,-rpath,$${MY_OPENCV_DIR}/lib
# Include libraries from ZBar
zbar: QMAKE_LFLAGS += -Wl,-rpath,$${MY_ZBAR_DIR}/lib
# Include libraries from Tesseract
zbar: QMAKE_LFLAGS += -Wl,-rpath,$${MY_TESSERACT_DIR}/lib
# Required OpenCV libraries
LIBS = -L$${MY_OPENCV_DIR}/lib
LIBS += -lopencv_imgcodecs \
-lopencv_core \
-lopencv_highgui \
-lopencv_videoio \
-lopencv_imgproc \
-lopencv_video\
-lopencv_photo
stitching: LIBS += -lopencv_stitching
objdetect: LIBS += -lopencv_objdetect
xphoto: LIBS += -lopencv_xphoto
face: LIBS += -lopencv_face
tesseract: LIBS += -lopencv_dnn -L$${MY_TESSERACT_DIR}/lib -ltesseract
zbar: LIBS += -L$${MY_ZBAR_DIR}/lib -lzbar
}