From 30b23b82ded6468c7953611a1dac782d10e86605 Mon Sep 17 00:00:00 2001 From: Fam Zheng Date: Sun, 23 Mar 2025 00:03:35 -0700 Subject: [PATCH] qrtool: Use adaptiveThreshold to find roi --- alg/qrtool.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alg/qrtool.cpp b/alg/qrtool.cpp index 58c873c..3e51845 100644 --- a/alg/qrtool.cpp +++ b/alg/qrtool.cpp @@ -302,7 +302,7 @@ static void get_bin(Mat &orig, Mat &out) convertScaleAbs(gray, gray, 2); // bilateralFilter(gray, filtered, 9, 150, 150, BORDER_DEFAULT); medianBlur(gray, gray, 9); - threshold(gray, out, 128, 255, THRESH_BINARY); + adaptiveThreshold(gray, out, 255, ADAPTIVE_THRESH_GAUSSIAN_C, THRESH_BINARY, 11, 2); } static