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 filter text in an image

When trying to read an image where a barcode is surrounded by a large number of irrelevant characters, the presence of these words may lead to incorrect positioning, and slow down the execution speed of DBR. DBR handles such scenarios by utilizing the built-in TextFilterModes.

Let us consider the following image

text filter sample

For this image, we can set TextFilterModes to TFM_GENERAL_CONTOUR and observe through the intermediate result, IRT_TEXT_ZONE. For easier demonstration purposes, we have merged the result of the IRT_TEXT_ZONE onto the binarized result. As it shown in the following images, the algorithm has recognized almost all the characters.

text zone img

Next, these words are excluded, and we are left with the optimized image as shown below

binary img after text filter

The process of text filtering will not be performed when using the positioning methods LM_CONNECTED_BLOCKS and LM_SCAN_DIRECTLY. Therefore, if DBR only performs LM_CONNECTED_BLOCKS and LM_SCAN_DIRECTLY positioning, the intermediate result IRT_TEXT_ZONE will be empty data.

Sample Template


This page is compatible for:

Version 7.5.0

Is this page helpful?

YesYes NoNo

latest version

  • Latest version
  • 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