×
MENU
Resource Base
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.

texture-image-sample

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.

binary-before-texture-detect

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.

binary-after-texture-detect

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"],
        "TextureDetectionModes":[
            {
                "Mode":"TDM_GENERAL_WIDTH_CONCENTRATION", 
                "Sensitivity":5
            }
        ]
    },
    "Version": "3.0"
}

This page is compatible for:

Version 7.5

Is this page helpful?

YesYes NoNo

latest version

    • Latest Version
    • version 8.1.2
    • version 8.0
    • version 7.6
    • version 7.5
    Change +
    © 2003–2020 Dynamsoft. All rights reserved.
    Privacy Statement / Site Map / Home / Purchase / Support