Mercurial > hgrepos > Python2 > PyMuPDF
comparison mupdf-source/thirdparty/zxing-cpp/example/ZXingOpenCV.cpp @ 2:b50eed0cc0ef upstream
ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4.
The directory name has changed: no version number in the expanded directory now.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Mon, 15 Sep 2025 11:43:07 +0200 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 1:1d09e1dec1d9 | 2:b50eed0cc0ef |
|---|---|
| 1 /* | |
| 2 * Copyright 2021 Axel Waggershauser | |
| 3 */ | |
| 4 // SPDX-License-Identifier: Apache-2.0 | |
| 5 | |
| 6 #include "ZXingOpenCV.h" | |
| 7 | |
| 8 #include <iostream> | |
| 9 | |
| 10 using namespace cv; | |
| 11 | |
| 12 int main() | |
| 13 { | |
| 14 namedWindow("Display window"); | |
| 15 | |
| 16 Mat image; | |
| 17 VideoCapture cap(0); | |
| 18 | |
| 19 if (!cap.isOpened()) | |
| 20 std::cout << "cannot open camera"; | |
| 21 else | |
| 22 while (waitKey(25) != 27) { | |
| 23 cap >> image; | |
| 24 auto barcodes = ReadBarcodes(image); | |
| 25 for (auto& barcode : barcodes) | |
| 26 DrawBarcode(image, barcode); | |
| 27 imshow("Display window", image); | |
| 28 } | |
| 29 | |
| 30 return 0; | |
| 31 } |
