Issue:
Blurry QR codes and barcodes pose a significant challenge to effective scanning. The images of the codes may be taken in low resolution or motion.
Solution:
There are some parameters we can adjust to improve the reading rate.
- Set the
deblurLevel
to 9 (0 - 9) so that it will try to spend extra effort to read blurred barcodes. - Set the
ExpectedBarcodesCount
to a higher value like999
so that it will try all the available image processing methods. - Set
ImagePreprocessingModes
to preprocess the image. - Set
ScaleUpModes
to scale up modules if their size is too small.
JSON Template:
{
"ImageParameter": {
"BarcodeFormatIds": [
"BF_ALL"
],
"BarcodeFormatIds_2": [
"BF2_NULL"
],
"DeblurLevel": 9,
"Description": "",
"ExpectedBarcodesCount": 999,
"ImagePreprocessingModes": [
{
"LibraryFileName": "",
"LibraryParameters": "",
"Mode": "IPM_GENERAL"
},
{
"LibraryFileName": "",
"LibraryParameters": "",
"Mode": "IPM_GRAY_EQUALIZE",
"Sensitivity": 5
},
{
"LibraryFileName": "",
"LibraryParameters": "",
"Mode": "IPM_GRAY_SMOOTH",
"SmoothBlockSizeX": 3,
"SmoothBlockSizeY": 3
}
],
"ScaleUpModes":["SUM_LINEAR_INTERPOLATION(0,4,6)"],
"Name": "Settings",
"Timeout": 99999
},
"Version": "3.0"
}
Binarized image produced by Dynamsoft Barcode Reader:
Template for Dynamsoft Barcode Reader:
JavaScript Code Snippet to Use the Template:
barcodeReader.initRuntimeSettingsWithString(template);
Image Source:
https://boofcv.org/index.php?title=Performance:QrCode