Dev Center
Table of contents

Thanks for downloading Dynamsoft Barcode Reader Package!

Your download will start shortly. If your download does not begin, click here to retry.

How to deal with image textures

In some scenes, the background of the picture may appear textured, such as a pattern background, screen stripes, etc., which may have an adverse effect on DBR, such as mis location and increase in consumed time. To deal with such textures, DBR uses the parameter TextureDetectionModes. You can configure one or more Modes in TextureDetectionMode. If multiple Modes are configured, DBR will use each Mode in turn to process the image. The enumeration of TextureDetectionMode is as follows:

Name Value Notes
TDM_SKIP 0x00000000 Skip texture detection
TDM_GENERAL_WIDTH_CONCENTRATION 0x00000002 General texture detection, default
TDM_AUTO 0x00000001 At present, this is equivalent to TDM_SKIP

When TextureDetectionMode is set to TDM_GENERAL_WIDTH_CONCENTRATION, you can control the sensitivity of texture detection through the Sensitivity parameter. The larger the value of this parameter, the more obvious the texture detection effect is. The default value is 5 and the value range is [1, 9].

Texture detection is suitable for images with a textured background. Whether texture detection is required can be determined by observing the effect of the intermediate result after binarization (IRT_BINARIZED_IMAGE). Here, we use an actual picture with screen texture to demonstrate how to use this feature.


The sample picture is as above. When we do not use the texture detection function, using the intermediate result IRT_BINARIZED_IMAGE we can observe that the texture of the picture is very serious, and it surrounds the barcode area as shown below.


Now, we enable texture detection by configuring TDM_GENERAL_WIDTH_CONCENTRATION. After that, the binarized intermediate result image observed again are shown in the figure below where it ‘s evident that textures have been well handled.


If, after configuring TDM_GENERAL_WIDTH_CONCENTRATION, the texture is not processed well, you can adjust the parameter Sensitivity to make further attempts.

Sample template

    "ImageParameter": {
        "BarcodeFormatIds": ["BF_ALL"],
    "Version": "3.0"

This page is compatible for:

Version 7.5.0

Is this page helpful?

YesYes NoNo

latest version

  • Latest version
  • Version 9.0.0
  • Version 8.9.3
  • Version 8.9.0
  • Version 8.8.7
  • Version 8.8.5
  • Version 8.8.3
  • Version 8.8.0
  • Version 8.6.3
  • Version 8.6.1
  • Version 8.6.0
  • Version 8.4.0
  • Version 8.2.5
  • Version 8.2.3
  • Version 8.2.1
  • Version 8.2.0
  • Version 8.1.3
  • Version 8.1.2
  • Version 8.1.0
  • Version 8.0.0
  • Version 7.6.0
  • Version 7.5.0
Change +
© 2003–2022 Dynamsoft. All rights reserved.
Privacy Statement / Site Map / Home / Purchase / Support