qrtool: Use adaptiveThreshold to find roi

This commit is contained in:
Fam Zheng 2025-03-23 00:03:35 -07:00
parent 03a25595a2
commit 30b23b82de

View File

@ -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