Resource Base
Table of contents

Parameter Organization Structure

This article introduces the organization structure of all parameters.

Definitions

Dynamsoft Document Normalizer uses a template to organize parameters. A template is a JSON object which contains following keys:

Key Name Description
GlobalParameter A JSON Object which defines a GlobalParameter Object.
ImageParameterArray A JSON Object array which defines multiple ImageParameter Objects.
NormalizerParameterArray A JSON Object array which defines multiple NormalizerParameter Objects.

GlobalParameter Object

A GlobalParameter object contains following keys:

Key Name Description
Name (Required) A string value which specifies the name of current GlobalParameter object.
MaxTotalImageDimension (Optional) Sets the parameter MaxTotalImageDimension.

ImageParameter Object

An ImageParameter object contains following keys:

Key Name Description
Name (Required) A string value which specifies the name of current ImageParameter object. The name value must be unique between all ImageParameter objects.
RegionPredetectionModes (Optional) Sets the parameter RegionPredetectionModes.
Timeout (Optional) Sets the parameter Timeout.
ColourChannelUsageType (Optional) Sets the parameter ColourChannelUsageType.
MaxThreadCount (Optional) Sets the parameter MaxThreadCount.
ScaleDownThreshold (Optional) Sets the parameter ScaleDownThreshold.
ColourConversionModes (Optional) Sets the parameter ColourConversionModes.
GrayscaleTransformationModes (Optional) Sets the parameter GrayscaleTransformationModes.
GrayscaleEnhancementModes (Optional) Sets the parameter GrayscaleEnhancementModes.
BinarizationModes (Optional) Sets the parameter BinarizationModes.
TextureDetectionModes (Optional) Sets the parameter TextureDetectionModes.
TextFilterModes (Optional) Sets the parameter TextFilterModes.
LineExtractionModes (Optional) Sets the parameter LineExtractionModes.
NormalizerParameterName (Optional) A string value which is the name of a NormalizerParameter Object.
BaseImageParameterName (Optional) A string value which is the name of an ImageParameter Object. When a parameter is not explicitly set in current ImageParameter Object, it will inherit the value from base ImageParameter Object. If BaseImageParameterName is also not set, this parameter is set with parameter’s default value.

NormalizerParameter Object

A NormalizerParameter object contains following keys:

Key Name Description
Name (Required) A string value which specifies the name of current NormalizerParameter object. The name value must be unique between all NormalizerParameter objects.
ContentType (Optional) Sets the parameter ContentType.
InteriorAngleRangeArray (Optional) Sets the parameter InteriorAngleRangeArray.
QuadrilateralDetectionModes (Optional) Sets the parameter QuadrilateralDetectionModes.
DeskewMode (Optional) Sets the parameter DeskewMode.
PageSize (Optional) Sets the parameter PageSize.
ColourMode (Optional) Sets the parameter ColourMode.
Brightness (Optional) Sets the parameter Brightness.
Contrast (Optional) Sets the parameter Contrast.

Example

{
    "GlobalParameter":{
        "Name":"GP",
        "MaxTotalImageDimension":0
    },
    "ImageParameterArray":[
        {
            "Name":"IP-1",
            "RegionPredetectionModes":[
                {
                    "Mode": "RPM_GENERAL"
                }
            ],
            "Timeout": 10000,
            "ColourChannelUsageType": "CCUT_AUTO",
            "MaxThreadCount": 4,
            "ScaleDownThreshold": 2300,
            "ColourConversionModes":[
                {
                    "Mode": "CICM_GENERAL",
                    "BlueChannelWeight": -1,
                    "GreenChannelWeight": -1,
                    "RedChannelWeight": -1
                }
            ],
            "GrayscaleTransformationModes":[
                {
                    "Mode": "GTM_ORIGINAL"
                }
            ],
            "GrayscaleEnhancementModes": [
                {
                    "Mode": "GEM_GENERAL" 
                }
            ],
            "BinarizationModes":[
                {
                    "Mode": "BM_LOCAL_BLOCK",
                    "BlockSizeX": 0,
                    "BlockSizeY": 0,
                    "EnableFillBinaryVacancy": 0,
                    "MorphOperation": "Close",
                    "MorphShape": "Rectangle",
                    "MorphOperationKernelSizeX": -1,
                    "MorphOperationKernelSizeY": -1,
                    "ThresholdCompensation": 10
                }
            ],
            "TextureDetectionModes":[
                {
                    "Mode": "TDM_GENERAL_WIDTH_CONCENTRATION",
                    "Sensitivity": 5
                }
            ],
            "TextFilterModes": [
                {
                    "Mode": "TFM_GENERAL_CONTOUR", 
                    "IfEraseTextZone": 0,
                    "MinImageDimension": 65536,
                    "Sensitivity": 0
                }
            ],
            "LineExtractionModes": [
                {
                    "Mode": "LEM_GENERAL" 
                }
            ],
            "NormalizerParameterName":"NP-1",
            "BaseImageParameterName":""  
        }
    ],
    "NormalizerParameterArray":[
        {
            "Name":"NP-1",
            "ContentType": "CT_DOCUMENT",
            "InteriorAngleRangeArray": [
                {
                    "MinValue": 70,
                    "MaxValue": 110
                }
            ],
            "QuadrilateralDetectionModes": [
                {
                    "Mode": "QDM_GENERAL" 
                }
            ],
            "DeskewMode": {
                "Mode": "DM_PERSPECTIVE_CORRECTION", 
                "ContentDirection": 0
            },
            "PageSize": [-1, -1],
            "ColourMode": "ICM_BINARY",
            "Brightness": 0,
            "Contrast": 0   
        }
    ]
}

This page is compatible for:

Version 1.0

Is this page helpful?

YesYes NoNo

In this article:

version 1.0.21

  • 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