Thanks for downloading Dynamsoft Label Recognizer Package!
Your download will start shortly. If your download does not begin, click here to retry.
LabelRecognitionParameter Object
Parameter Name | Description |
---|---|
LabelRecognitionParameter.Name |
The name of the LabelRecognitionParameter object. |
LabelRecognitionParameter.BinarizationModes |
Sets the mode and priority for binarization. |
LabelRecognitionParameter.CharacterModelName |
Sets the name of a white list of recognizable characters. |
LabelRecognitionParameter.GrayscaleTransformationModes |
Sets the mode and priority for the grayscale image conversion. |
LabelRecognitionParameter.LetterHeightRange |
Sets the range of letter height (in pixel or a percentage value relative to the height of the text area). |
LabelRecognitionParameter.LinesCount |
Sets the text lines count of the text area. |
LabelRecognitionParameter.LineStringRegExPattern |
Specifies the regular expression pattern of each line string text in current image to recognize. |
LabelRecognitionParameter.MaxThreadCount |
Sets the maximum number of threads the algorithm will use to recognize text. |
LabelRecognitionParameter.ReferenceRegionNameArray |
The name array of the ReferenceRegion object(s). |
LabelRecognitionParameter.RegionPredetectionModes |
Sets the region pre-detection mode for searching target regions. |
LabelRecognitionParameter.TextRegExPattern |
Specifies the regular expression pattern of the text to recognize. |
BinarizationModes
Mode Properties
BinarizationModes
is a parameter for setting the mode for binarization. It consisits of one or more DLRBinarizationMode
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 |
---|---|---|
DLRBinarizationMode array |
“DLR_BM_SKIP” “DLR_BM_AUTO” “DLR_BM_LOCAL_BLOCK” |
[“DLR_BM_LOCAL_BLOCK”, “DLR_BM_SKIP”, “DLR_BM_SKIP”, “DLR_BM_SKIP”, “DLR_BM_SKIP”, “DLR_BM_SKIP”, “DLR_BM_SKIP”, “DLR_BM_SKIP”] |
- See also:
DLRBinarizationMode
Enumeration
Mode Arguments
- BlockSizeX
- BlockSizeY
- EnableFillBinaryVacancy
- ThreshValueCoefficient
- LibraryFileName
- LibraryParameters
BlockSizeX
Sets the horizontal block size for the binarization process.
Value Type | Value Range | Default Value | Valid Modes |
---|---|---|---|
int | [0, 1000] | 0 | “DLR_BM_LOCAL_BLOCK” |
Remarks
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 target regions localizing.
- 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 | Valid Modes |
---|---|---|---|
int | [0, 1000] | 0 | “DLR_BM_LOCAL_BLOCK” |
Remarks
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 target regions localizing.
- 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 | Valid Modes |
---|---|---|---|
int | [0, 1] | 1 | “DLR_BM_LOCAL_BLOCK” |
Remarks
0: disable.
1: enable.
For character with large font-weight, there might be a vacant area in the position detection pattern after binarization. The vacant area may result in capturing failure. Setting this to True will fill in the vacant area with black and may help improve the capturing success rate. Better accuracy for characters with large font-weight.
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 | Valid Modes |
---|---|---|---|
int | [-255, 255] | 10 | “DLR_BM_LOCAL_BLOCK” |
LibraryFileName
Sets the file name of the library to load dynamically.
Value Type | Value Range | Default Value | Valid Modes |
---|---|---|---|
string | A string value representing file name. | ”” | All DLRBinarizationMode items except DLR_BM_SKIP and DLR_BM_AUTO |
Remarks
- The library must be in the same place with Dynamsoft Label Recognition Library.
LibraryParameters
Sets the parameters passed to the library to load dynamically.
Value Type | Value Range | Default Value | Valid Modes |
---|---|---|---|
string | A string value representing parameters. | ”” | All DLRBinarizationMode items except DLR_BM_SKIP and DLR_BM_AUTO |
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 |
---|---|---|
LabelRecognitionParameter | BinarizationModes | JSON Object Array |
Json Parameter Example
{
"BinarizationModes": [
{
"Mode": "DLR_BM_LOCAL_BLOCK",
"BlockSizeX": 5,
"BlockSizeY": 5,
}
]
}