Resource Base
Table of contents

Thanks for downloading Dynamsoft Barcode Reader Package!

Your download will start shortly. If your download does not begin, click here to retry.

ImageParameter Object - Image Process Control Parameters

Parameter Name Description
ImageParameter.AccompanyingTextRecognitionModes Sets the mode and priority to recognize accompanying text.
ImageParameter.BarcodeColourModes Sets the mode and priority for the barcode colour mode used to process the barcode zone.
ImageParameter.BarcodeComplementModes Sets the mode and priority to complement the missing parts in the barcode.
ImageParameter.BinarizationModes Sets the mode and priority for binarization.
ImageParameter.ColourClusteringModes Sets the mode and priority for colour categorization. Not supported yet.
ImageParameter.ColourConversionModes Sets the mode and priority for converting a colour image to a grayscale image.
ImageParameter.DeblurLevel Sets the degree of blurriness of the barcode.
ImageParameter.DeformationResistingModes Sets the mode and priority for deformation resisting.
ImageParameter.DPMCodeReadingModes Sets the mode and priority for DPM code reading. Not support yet.
ImageParameter.GrayscaleTransformationModes Sets the mode and priority for the grayscale image conversion.
ImageParameter.ImagePreprocessingModes Sets the mode and priority for image preprocessing algorithms.
ImageParameter.LocalizationModes Sets the mode and priority for localization algorithms.
ImageParameter.Pages Sets the specific pages or the range of pages of a file (.tiff or .pdf) for barcode searching.
ImageParameter.PDFRasterDPI Sets the output image resolution.
ImageParameter.PDFReadingMode Sets the way to detect barcodes from a PDF file when using the DecodeFile method.
ImageParameter.RegionPredetectionModes Sets the region pre-detection mode for barcodes search.
ImageParameter.ScaleDownThreshold Sets the threshold for the image shrinking.
ImageParameter.ScaleUpModes Sets the mode and priority to control the sampling methods of scale-up for linear barcodes with small module sizes.
ImageParameter.TextAssistedCorrectionMode Sets the mode of text assisted correction for barcode decoding. Not support yet.
ImageParameter.TextFilterModes Sets the mode and priority for text filter.
ImageParameter.TextureDetectionModes Sets the mode and priority for texture detection.

BinarizationModes

Mode Properties

BinarizationModes is a parameter for setting the mode for binarization. It consisits of one or more BinarizationMode items and each item has its own arguments. The array index represents the priority of the item. The smaller index is, the higher priority is.

Value Type Value Range Default Value
string array or BinarizationMode array “BM_SKIP”
“BM_AUTO”
“BM_LOCAL_BLOCK”
[“BM_LOCAL_BLOCK”, “BM_SKIP”, “BM_SKIP”, “BM_SKIP”, “BM_SKIP”, “BM_SKIP”, “BM_SKIP”, “BM_SKIP”]

Mode Arguments

BlockSizeX

Sets the horizontal block size for the binarization process.

Value Type Value Range Default Value Vaild Modes
int [0, 1000] 0 “BM_LOCAL_BLOCK”
  • Remark
    Block size refers to the size of a pixel neighborhood used to calculate a threshold value for the pixel. An appropriate value for binarizationBlockSize can help generate a high quality binary image and increase the accuracy of barcode localization.

    • 0: the block size used for binarization will be set to a value which is calculated automatically.
    • N:
      • 1 <= N <= 3: the block size used for binarization will be set to 3.
      • N > 3: the block size used for binarization will be set to N.
BlockSizeY

Sets the vertical block size for the binarization process.

Value Type Value Range Default Value Vaild Modes
int [0, 1000] 0 “BM_LOCAL_BLOCK”
  • Remark
    Block size refers to the size of a pixel neighborhood used to calculate a threshold value for the pixel. An appropriate value for binarizationBlockSize can help generate a high quality binary image and increase the accuracy of barcode localization.

    • 0: the block size used for binarization will be set to a value which is calculated automatically.
    • N:
      • 1 <= N <= 3: the block size used for binarization will be set to 3.
      • N > 3: the block size used for binarization will be set to N..
EnableFillBinaryVacancy

Sets whether to enable binary vacancy filling.

Value Type Value Range Default Value Vaild Modes
int [0, 1] 1 “BM_LOCAL_BLOCK”
  • Remark
    0: disable.
    1: enable.

    For barcodes with a large module size, there might be a vacant area in the position detection pattern after binarization. The vacant area may result in decoding failure. Setting this to True will fill in the vacant area with black and may help improve the decoding success rate. Better accuracy for images with a large module size.

ImagePreprocessingModesIndex

The index of a specific image preprocessing mode in the ImagePreprocessingModes parameter which the current binarization mode is applied to.

Value Type Value Range Default Value Vaild Modes
int [-1, 0x7fffffff] -1 “BM_LOCAL_BLOCK”
ThreshValueCoefficient

Constant subtracted from the mean or weighted mean. Normally, it is positive but may be zero or negative as well.

Value Type Value Range Default Value Vaild Modes
int [-255, 255] 10 “BM_LOCAL_BLOCK”

Setting Methods

As JSON Parameter

BinarizationModes as a JSON parameter is a JSON Object array. Each JSON Object has several keys for setting the mode and the value of arguments. The array index decides the priority the mode for binarization. Default values will be used if there is no manual setting.

Json Object Json Parameter Name Value Type
ImageParameter BinarizationModes JSON Object Array

Json Parameter Example

{
    "BinarizationModes": [
        {
            "Mode": "BM_LOCAL_BLOCK",
            "BlockSizeX": 5,
            "BlockSizeY": 5,
        }
    ]
}

 

As PublicRuntimeSettings Member

BinarizationModes as a member of PublicRuntimeSettings struct is a BinarizationMode array for setting the modes and the priority for binarization. Default value will be used if there is no manual setting.

Struct Struct Member Name Value Type
PublicRuntimeSettings binarizationModes BinarizationMode[8]

Remark
GetModeArgument and SetModeArgument need to be called for getting or setting the value of arguments.

See Also

This page is compatible for:

Version 7.5.0

Is this page helpful?

YesYes NoNo

version 7.6.0

  • Latest version
  • Version 8.8.0
  • Version 8.6.3
  • Version 8.6.1
  • Version 8.6.0
  • Version 8.4.0
  • Version 8.2.5
  • Version 8.2.3
  • Version 8.2.1
  • Version 8.2.0
  • Version 8.1.3
  • Version 8.1.2
  • Version 8.1.0
  • Version 8.0.0
  • Version 7.6.0
  • Version 7.5.0
Change +
© 2003–2021 Dynamsoft. All rights reserved.
Privacy Statement / Site Map / Home / Purchase / Support