Table of contents

Need better scanning performance?

Get a FREE customized reading template.

ImageParameter Object

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

Example

{
    "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}
            ]
        }
    ]
}

Parameters

Parameter Name Type Required/Optional Description
Name String Required The unique identifier for this ImageParameter object.
BaseImageParameterName String Optional The name of another ImageParameter object to inherit settings from.
ApplicableStages Array Optional An array of stage objects defining the image processing pipeline.

Usage

Each functional product has default ImageParameter settings. You can either use the defaults or define custom ImageParameter objects for specific sections.

Defining ImageParameter Objects

ImageParameter objects are configured under ImageParameterOptions, each with a unique name:

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

You can create a new ImageParameter based on an existing one using inheritance:

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

Referencing in Task Settings

Reference ImageParameter objects in task settings by name:

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

Available Stages

Stage Name Description
SST_SCALE_IMAGE Scales the image up or down.
SST_CONVERT_TO_GRAYSCALE Converts a color image to grayscale.
SST_TRANSFORM_GRAYSCALE Transforms the grayscale image (e.g., for inverted barcodes).
SST_ENHANCE_GRAYSCALE Enhances grayscale image quality.
SST_BINARIZE_IMAGE Converts grayscale to binary image.
SST_DETECT_TEXTURE Detects texture patterns in the image.
SST_REMOVE_TEXTURE_FROM_GRAYSCALE Removes texture from grayscale image.
SST_BINARIZE_TEXTURE_REMOVED_GRAYSCALE Binarizes the texture-removed grayscale image.
SST_FIND_CONTOURS Finds contours in the image.
SST_DETECT_SHORTLINES Detects short lines for document boundary detection.
SST_ASSEMBLE_LINES Assembles detected lines.
SST_DETECT_TEXT_ZONES Detects text zones in the image.
SST_REMOVE_TEXT_ZONES_FROM_BINARY Removes text zones from binary image.

Stage Parameters

Each stage can have associated parameters for fine-tuning:

This page is compatible for:

Is this page helpful?

YesYes NoNo

In this article: