comparison mupdf-source/thirdparty/zxing-cpp/example/ZXingOpenCV.cpp @ 3:2c135c81b16c

MERGE: upstream PyMuPDF 1.26.4 with MuPDF 1.26.7
author Franz Glasner <fzglas.hg@dom66.de>
date Mon, 15 Sep 2025 11:44:09 +0200
parents b50eed0cc0ef
children
comparison
equal deleted inserted replaced
0:6015a75abc2d 3:2c135c81b16c
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 }