mirror of
https://github.com/cemu-project/vcpkg.git
synced 2024-11-24 19:59:43 +00:00
[zxing-cpp] improve compatibility with modern OpenCV (#6370)
This commit is contained in:
parent
9c33de2d07
commit
4825f3ba61
30
ports/zxing-cpp/0001-opencv4-compat.patch
Normal file
30
ports/zxing-cpp/0001-opencv4-compat.patch
Normal file
@ -0,0 +1,30 @@
|
||||
diff --git a/opencv-cli/src/main.cpp b/opencv-cli/src/main.cpp
|
||||
index 63b6fd3..430dda6 100755
|
||||
--- a/opencv-cli/src/main.cpp
|
||||
+++ b/opencv-cli/src/main.cpp
|
||||
@@ -135,14 +135,14 @@ int main(int argc, char** argv) {
|
||||
|
||||
}
|
||||
|
||||
- if (!videoCapture.set(CV_CAP_PROP_FRAME_WIDTH, captureWidth)) {
|
||||
+ if (!videoCapture.set(cv::CAP_PROP_FRAME_WIDTH, captureWidth)) {
|
||||
|
||||
// Log
|
||||
cerr << "Failed to set frame width: " << captureWidth << " (ignoring)" << endl;
|
||||
|
||||
}
|
||||
|
||||
- if (!videoCapture.set(CV_CAP_PROP_FRAME_HEIGHT, captureHeight)) {
|
||||
+ if (!videoCapture.set(cv::CAP_PROP_FRAME_HEIGHT, captureHeight)) {
|
||||
|
||||
// Log
|
||||
cerr << "Failed to set frame height: " << captureHeight << " (ignoring)" << endl;
|
||||
@@ -166,7 +166,7 @@ int main(int argc, char** argv) {
|
||||
if (result) {
|
||||
|
||||
// Convert to grayscale
|
||||
- cvtColor(image, grey, CV_BGR2GRAY);
|
||||
+ cvtColor(image, grey, cv::COLOR_BGR2GRAY);
|
||||
|
||||
try {
|
||||
|
@ -1,4 +1,4 @@
|
||||
Source: zxing-cpp
|
||||
Version: 3.3.3-2
|
||||
Version: 3.3.3-3
|
||||
Build-Depends: opencv[core]
|
||||
Description: Barcode detection and decoding library.
|
||||
|
@ -8,6 +8,8 @@ vcpkg_from_github(
|
||||
REF 5aad4744a3763d814df98a18886979893e638274
|
||||
SHA512 a079ad47171224de4469e76bf0779b6ebc9c6dfb3604bd5dbf5e6e5f321d9e6255f689daa749855f8400023602f1773214013c006442e9b32dd4b8146c888c02
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
0001-opencv4-compat.patch
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
|
Loading…
Reference in New Issue
Block a user