Table of contents

ImageParameter Object

The ImageParameter object is designed to configure and organize parameters for image processing stages, including but not limited to convert color-to-grayscale stage, enhance grayscale image stage, binarize image stage, detect text zone stage, and detect texture stage. You can configure detailed parameters for each stage.

"ImageParameterOptions": [
    {
        "Name" : "ip_default",
        "BaseImageParameterName": "ip_base",
        "ApplicableStages":[
            { "Stage": "SST_SCALE_IMAGE", "ImageScaleSetting" : {} },
            { "Stage": "SST_CONVERT_TO_GRAYSCALE", "ColourConversionModes" : [] },
            { "Stage": "SST_TRANSFORM_GRAYSCALE", "GrayscaleTransformationModes" : [] },
            { "Stage": "SST_ENHANCE_GRAYSCALE", "GrayscaleEnhancementModes" : [] },
            { "Stage": "SST_BINARIZE_IMAGE", "BinarizationModes" : [] },
            { "Stage": "SST_DETECT_TEXTURE", "TextureDetectionModes" : [] },
            { "Stage": "SST_REMOVE_TEXTURE_FROM_GRAYSCALE" },
            { "Stage": "SST_BINARIZE_TEXTURE_REMOVED_GRAYSCALE" },
            { "Stage": "SST_FIND_CONTOURS" },
            { "Stage": "SST_DETECT_SHORTLINES", "ShortlineDetectionMode": {} },
            { "Stage": "SST_ASSEMBLE_LINES", "LineAssemblyMode": {} },
            { "Stage": "SST_DETECT_TEXT_ZONES", "TextDetectionMode": {} },
            { "Stage": "SST_REMOVE_TEXT_ZONES_FROM_BINARY", "IfEraseTextZone": 0 }
        ]
    }
],

Definition and Reference

Each algorithm section of the funtional products has a default ImageParameter settings. You can either skip the ImageParameter settings to implement the default settings or define your own ImageParameter objects and specify them in the sections you want to customize.

Define an ImageParameter Object

ImageParameter objects are configured under ImageParameterOptions and each object has a unique name as its identifier.

{
    "ImageParameterOptions": [
        {
            "Name": "IP_0"
        },
        {
            "Name": "IP_1"
        }
    ]
}

You can define a new ImageParameter object based on an existing ImageParameter object. For example:

{
    "ImageParameterOptions": [
        {
            "Name": "IP_0"
        },
        {
            "Name": "IP_1",
            "BaseImageParameterName" : "IP_0"
        }
    ]
}

Specify an ImageParameter for Task Sections

ImageParameter is referenced in task settings under SectionImageParameterArray with their names. For example:

{
    "SectionArray":
    [
        {
            "Section": "ST_REGION_PREDETECTION",
            "ImageParameterName": "IP_0"
        },
        {
            "Section": "ST_BARCODE_LOCALIZATION",
            "ImageParameterName": "IP_1"
        },
        {
            "Section": "ST_BARCODE_DECODING",
            "ImageParameterName": "IP_2"
        }
    ]
}

Summary of ImageParameter Top-level Parameters

View the parameter references for the details of each ImageParameter parameters.

Parameter Name Description
BaseImageParameterName Represents the name of another ImageParameter object to inherit from.
Name Defines the name of a ImageParameter object, which serves as its unique identifier.
ApplicableStages Defines the applicable stage parameters with an array of stage objects.

Available Stages

Stage Name Description
SST_SCALE_IMAGE The stage for scaling up or down the image.
SST_CONVERT_TO_GRAYSCALE The stage for converting a colour image to a grayscale image.
SST_TRANSFORM_GRAYSCALE The stage for transforming the grayscale image. Generally used when processing inverted barcodes or text lines.
SST_ENHANCE_GRAYSCALE The stage for enhancing the quality of the grayscale image.
SST_BINARIZE_IMAGE The stage for binarizing the image.
SST_DETECT_TEXTURE The stage for detecting texture on the image.
SST_REMOVE_TEXTURE_FROM_GRAYSCALE The stage for removing texture from the grayscale image.
SST_BINARIZE_TEXTURE_REMOVED_GRAYSCALE The stage for binarizing the texture removed grayscale image.
SST_FIND_CONTOURS The stage for finding contours in the image.
SST_DETECT_SHORTLINES The stage for detecting short lines for document boundary detection.
SST_ASSEMBLE_LINES The stage for assembling lines.
SST_DETECT_TEXT_ZONES The stage for detecting text zones on the image.
SST_REMOVE_TEXT_ZONES_FROM_BINARY The stage for removing text zones from the binary image.

Is this page helpful?

YesYes NoNo

In this article: