< Back

Barcode with Shadow

Issue: It’s very common that an image taken may present some shadows. The barcode area with uneven lighting is a very challenging decoding situation that many scanners fail to read.

Solution: Dynamsoft Barcode Reader provides an adaptive binarization mode BM_LOCAL_BLOCK which caters to different lighting areas in the image in order to successfully decode these challenging barcodes.

JSON Template:

{
  "ImageParameter" : {
    "BinarizationModes": [
      {
        "BlockSizeX": 0,
        "BlockSizeY": 0,
        "EnableFillBinaryVacancy": 1,
        "ImagePreprocessingModesIndex": -1,
        "LibraryFileName": "",
        "LibraryParameters": "",
        "Mode": "BM_LOCAL_BLOCK",
        "ThresholdCompensation": 10
      }
    ],
    "Name": "Settings"
  },
  "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

Single
Low light
Uneven lighting
Other
QR Code