Documentation
Table of contents

BarcodeFormatSpecification Object

BarcodeFormatSpecification is able to set configurations for specified barcode formats. You can leave this area empty to use the default barcode reading settings.

{
    "Name":"BFS_1",
    "AllModuleDeviation" : 0,
    "AustralianPostEncodingTable" : "C",
    "EnableAddOnCode": 0, 
    "BarcodeAngleRangeArray" : [
        {
            "MinValue": 100,
            "MaxValue": 200
        }
    ],
    "BarcodeBytesLengthRangeArray" : [
        {
            "MinValue": 100,
            "MaxValue": 200
        }
    ],
    "BarcodeComplementModes" : [
        {
            "Mode": "BCM_GENERAL" 
        }
    ],
    "BarcodeFormatIds" : ["BF_DATAMATRIX"],
    "BarcodeHeightRangeArray" : [
        {
            "MinValue": 100,
            "MaxValue": 200
        }
    ],
    "BarcodeTextLengthRangeArray" : [
        {
            "MinValue": 100,
            "MaxValue": 200
        }
    ],
    "BarcodeTextRegExPattern" : " ^([*].+[*]|[+].+[+])$",
    "BarcodeWidthRangeArray" : [
        {
            "MinValue": 100,
            "MaxValue": 200
        }
    ],
    "BarcodeZoneBarCountRangeArray" : [
        {
            "MinValue": 1,
            "MaxValue": 128
        }
    ],
    "BarcodeZoneMinDistanceToImageBorders" : 1,
    "Code128Subset" : "A",
    "DeformationResistingModes" : [
        {
            "Mode": "DRM_GENERAL", 
            "Level": 1
        }
    ],
    "FindUnevenModuleBarcode" : 1,
    "HeadModuleRatio" : "211412",
    "MinQuietZoneWidth" : 1,
    "MinRatioOfBarcodeZoneWidthToHeight" : 100,
    "MinResultConfidence" : 30,
    "MirrorMode" : "MM_NORMAL",
    "ModuleSizeRangeArray" : [
        {
            "MinValue": 3,
            "MaxValue": 20
        }
    ],
    "MSICodeCheckDigitCalculation" : "MSICCDC_MOD_10",
    "PartitionModes" : ["PM_WHOLE_BARCODE"],
    "RequireStartStopChars" : 1,
    "ReturnPartialBarcodeValue" : 1,
    "StandardFormat" : "BF_CODE128",
    "TailModuleRatio" : "2331112",
    "VerifyCheckDigit" : 1
}

Usage Instructions

Parameter Configurations

Select target barcode format

Select BarcodeFormatIds for barcode by specifying the name of the format. View enumeration BarcodeFormats for all supported barcode formats.

Set special configurations for target format

The design intent of BarcodeFormatSpecification is to do special processing for specific barcode format while not affecting the decoding of other barcode types.

In other words, settings in BarcodeFormatSpecification have a higher priority when conflicting with global settings. For example:

barcode-format-specification

Sometimes the image and the real scene happen to be mirror images of each other. For 2D barcodes, mirroring may cause the decoding to fail. In this case, all barcodes are normal except QR code, we could configure the MirrorMode to correct the situation:

{
        "Name": "BFS_mirror", 
        "BarcodeFormatIds": ["BF_QR_CODE"], 
        "MirrorMode":"MM_MIRROR"
}

Quick Settings

Based on a existing BarcodeFormatSpecification object, you can use BaseBarcodeFormatSpecificationName with other minor changes to configure a new BarcodeFormatSpecification object. For example;

{
    "Name":"BFS_0",
    "BarcodeFormatIds" : ["BF_DATAMATRIX"],
    "BinarizationModes" : [
        {
            "Mode": "BM_LOCAL_BLOCK",
            "BlockSizeX": 5,
            "BlockSizeY": 5,
        }
    ]
},
{
    "Name":"BFS_1",    
    "BaseBarcodeFormatSpecificationName" : "BFS_0", // Use the same settings with BFS_0 but add little changes.
    "MinResultConfidence" : 20
}

Additional Annotations

BarcodeReaderTaskSetting determines how a barcode reader task works from initializing to finializing. As a parameter of BarcodeReaderTaskSetting, BarcodeFormatSpecification decides how the barcodes are processed when they are detected in the barcode reader task. A group of default settings has been allocated for the BarcodeFormatSpecification so that the BarcodeReaderTaskSetting still works without specifying BarcodeFormatSpecification parameters.

This page is compatible for:

Version 1.0

Is this page helpful?

YesYes NoNo

In this article:

latest version

    • Latest version (2.2.30)
    • Version 2.x
      • Version 2.2.20
      • Version 2.2.10
      • Version 2.2.0
      • Version 2.0.30
      • Version 2.0.20
      • Version 2.0.10
      • Version 2.0.0
    Change +
    © 2003–2024 Dynamsoft. All rights reserved.
    Privacy Statement / Site Map / Home / Purchase / Support