Resource Base
Table of contents

TextFilterModes

TextFilterModes is used to control how to filter texts on an image. It currently consists of a single mode.

Candidate Mode List

  • TFM_GENERAL_CONTOUR

TFM_GENERAL_CONTOUR

Filters text using the general algorithm based on contour. This mode has the following arguments for further customization.

Setting Methods

As JSON Parameter

TextFilterModes as a JSON parameter is a JSON Object array defined as below.

Parent Json Object Key Name Key Value
ImageParameter TextFilterModes A JSON Object array while each Object is defined as below
Key Name Key Value Description
Mode Any one in Candidate Mode List as string (Required) Specifies a mode for text filtering.
IfEraseTextZone A number from value range of IfEraseTextZone (Optional) Sets the Argument IfEraseTextZone.
MinImageDimension A number from value range of MinImageDimension (Optional) Sets the Argument MinImageDimension.
Sensitivity A number from value range of Sensitivity (Optional) Sets the Argument Sensitivity.

Default Value

{
    "TextFilterModes": [
        {
            "Mode": "TFM_GENERAL_CONTOUR", 
            "IfEraseTextZone": 0,
            "MinImageDimension": 65536,
            "Sensitivity": 0
        }
    ]
}

JSON Parameter Example

{
    "TextFilterModes": [
        {
            "Mode": "TFM_GENERAL_CONTOUR", 
            "Sensitivity": 5
        }
    ]
}

Candidate Argument List

IfEraseTextZone

Sets whether to erase the detected text zone.

Value Type Value Range Default Value Valid For
int [0, 1] 0 TFM_GENERAL_CONTOUR

Remarks

  • 0: Do not erase the text zone.
  • 1: Erase the text zone.

MinImageDimension

Sets the minimum image dimension (in pixels) to enable text filtering.

Value Type Value Range Default Value Valid For
int [65536, 0x7fffffff] 65536 TFM_GENERAL_CONTOUR

Remarks

The library will enable the region pre-detection feature only when the image dimension is larger than the given value.

Sensitivity

Sets the sensitivity used for text filtering.

Value Type Value Range Default Value Valid For
int [0, 9] 0 TFM_GENERAL_CONTOUR

Remarks

  • 0: automatically set by the library.
  • A larger value means the library will take more effort to filter text.

This page is compatible for:

Version 1.0

Is this page helpful?

YesYes NoNo

In this article:

latest version

    • Latest version(2.2.10)
    • Version 2.x
      • Version 2.2.0
      • Version 2.0.21
      • Version 2.0.20
      • Version 2.0.11
      • Version 2.0.10
      • Version 2.0.0
    • Version 1.x
      • Version 1.0.21
      • Version 1.0.20
      • Version 1.0.12
      • Version 1.0.11
      • Version 1.0.10
      • Version 1.0.0
    Change +
    © 2003–2024 Dynamsoft. All rights reserved.
    Privacy Statement / Site Map / Home / Purchase / Support