< Back

DataMatrix Code with Red-Striped Background

Issue:

Barcodes printed on a textured background are more difficult to decode. For example, the barcodes in the sample image are printed on a red-striped backgroud, which affects the binarization result.

Solution:

We can increase the weight of the red channel during the binarization process to reduce the impact of the red stripes.

JSON Template:

{
  "ImageParameter": {
    "ExpectedBarcodesCount": 2,
    "ColourConversionModes": [
      {
        "BlueChannelWeight": 0,
        "GreenChannelWeight": 0,
        "LibraryFileName": "",
        "LibraryParameters": "",
        "Mode": "CICM_GENERAL",
        "RedChannelWeight": 1000
      }
    ],
    "Description": "",
    "Name": "Settings",
   
    "Timeout": 3500
  },
  "Version": "3.0"
}

×

Binarized image produced by Dynamsoft Barcode Reader:

Template for Dynamsoft Barcode Reader:

JavaScript Code Snippet:

barcodeReader.initRuntimeSettingsWithString(template);
Multiple
Clean
Tainted
Other
Data Matrix