1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

Merge branch 4.x

This commit is contained in:
Alexander Smorkalov
2023-10-16 21:25:56 +03:00
221 changed files with 3584 additions and 2215 deletions
+21
View File
@@ -637,4 +637,25 @@ TEST_P(Objdetect_QRCode_detectAndDecodeMulti, decode_9_qrcodes_version7)
#endif // UPDATE_QRCODE_TEST_DATA
TEST(Objdetect_QRCode_detectAndDecode, utf8_output)
{
#ifndef HAVE_QUIRC
throw SkipTestException("Quirc is required for decoding");
#else
const std::string name_current_image = "umlaut.png";
const std::string root = "qrcode/";
std::string image_path = findDataFile(root + name_current_image);
Mat src = imread(image_path);
ASSERT_FALSE(src.empty()) << "Can't read image: " << image_path;
QRCodeDetector qrcode;
std::vector<Point> corners;
Mat straight;
std::string decoded_info = qrcode.detectAndDecode(src, corners, straight);
EXPECT_FALSE(decoded_info.empty());
EXPECT_NE(decoded_info.find("M\xc3\xbcllheimstrasse"), std::string::npos);
#endif // HAVE_QUIRC
}
}} // namespace