Documentation
Table of contents

Thanks for downloading Dynamsoft Label Recognizer Package!

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

LineSpecification Object

Parameter Name Description
LineSpecification.Name The name of the LineSpecification object.
LineSpecification.LineNumber The line number of the line targeted by the LineSpecification object.
LineSpecification.FirstPoint The first point of the line, which is usually the top-left corner.
LineSpecification.SecondPoint The second point of the line, which is usually the top-right corner.
LineSpecification.ThirdPoint The third point of the line, which is usually the bottom-right corner.
LineSpecification.FourthPoint The fourth point of the line, which is usually the bottom-left corner.
LineSpecification.CharacterModelName Sets the name of a white list of recognizable characters.
LineSpecification.LineStringLengthRange Sets the range of string length for each recognized line.
LineSpecification.LineStringRegExPattern Specifies the regular expression pattern of the string within a line.
LineSpecification.BinarizationModes Sets the mode and priority for binarization.
LineSpecification.GrayscaleEnhancementModes Sets the mode and priority for grayscale image preprocessing algorithms.
LineSpecification.CharacterNormalizationModes Sets the mode and priority for texture detection.

Name

The name of the LineSpecification object.

Remarks
It must be a unique name.

As Json Parameter

Json Object Json Parameter Name Value Type Default Value
LineSpecification Name string It must be a mandatory setting value.

Json Parameter Example

{
    "Name":"LineSpecification1"
}

LineNumber

The line number of the line targeted by the LineSpecification object.

Remarks

  1. The value is 1-based;
  2. ”” represents all lines.

As Json Parameter

Json Object Json Parameter Name Value Type Value Range Default Value
LineSpecification LineNumber string A string of one or more of the following data,separated by commas:
1. One int value which represents a specified line index;
2. One Expression, start index and stop index connected with “”-“”, which represents a specified line index range;
””

Json Parameter Example

{
    "LineNumber": "1,3,5,7-10"
}

FirstPoint

The first point of the line, which is usually the top-left corner.

Remarks
View the texts in 0 degree, the first point is the top-left point of the area defined by LineSpecification, and the other three points are in a clockwise direction.
The ordinate origin is the top-left corner of the TextArea.
The value of x is a percentage value relative to the width of the TextArea.
The value of y is a percentage value relative to the height of the TextArea.
The allowed values for x/y: [0, 100].
It is valid only when ‘LineNumber’ is setting to one specified line number.

As Json Parameter

Json Object Json Parameter Name Value Type Default Value
LineSpecification FirstPoint int array [0, 0]

Json Parameter Example

{
    "FirstPoint":[0, 10]
}

SecondPoint

The second point of the line, which is usually the top-right corner.

Remarks
View the texts in 0 degree, the first point is the top-left point of the area defined by LineSpecification, and the other three points are in a clockwise direction.
The ordinate origin is the top-left corner of the TextArea.
The value of x is a percentage value relative to the width of the TextArea.
The value of y is a percentage value relative to the height of the TextArea.
The allowed values for x/y: [0, 100].
It is valid only when ‘LineNumber’ is setting to one specified line number.

As Json Parameter

Json Object Json Parameter Name Value Type Default Value
LineSpecification SecondPoint int array [100, 0]

Json Parameter Example

{
    "SecondPoint":[10, 10]
}

ThirdPoint

The third point of the line, which is usually the bottom-right corner.

Remarks
View the texts in 0 degree, the first point is the top-left point of the area defined by LineSpecification, and the other three points are in a clockwise direction.
The ordinate origin is the top-left corner of the TextArea.
The value of x is a percentage value relative to the width of the TextArea.
The value of y is a percentage value relative to the height of the TextArea.
The allowed values for x/y: [0, 100].
It is valid only when ‘LineNumber’ is setting to one specified line number.

As Json Parameter

Json Object Json Parameter Name Value Type Default Value
LineSpecification ThirdPoint int array [100, 100]

Json Parameter Example

{
    "ThirdPoint":[0, 10]
}

FourthPoint

The fourth point of the line, which is usually the bottom-left corner.

Remarks
View the texts in 0 degree, the first point is the top-left point of the area defined by LineSpecification, and the other three points are in a clockwise direction.
The ordinate origin is the top-left corner of the TextArea.
The value of x is a percentage value relative to the width of the TextArea.
The value of y is a percentage value relative to the height of the TextArea.
The allowed values for x/y: [0, 100].
It is valid only when ‘LineNumber’ is setting to one specified line number.

As Json Parameter

Json Object Json Parameter Name Value Type Default Value
LineSpecification FourthPoint int array [0, 100]

Json Parameter Example

{
    "FourthPoint":[10, 20]
}

CharacterModelName

Sets the name of a white list of recognizable characters.

Remarks
If you set a character model, the result will only contain characters within the model.

As Json Parameter

Json Object Json Parameter Name Value Type Default Value
LineSpecification CharacterModelName string ””

Json Parameter Example

{
    "CharacterModelName":"CharacterModel_Name1"
}

LineStringLengthRange

Sets the range of string length for each recognized line.

As Json Parameter LineStringLengthRange as a JSON parameter is a JSON Object with two keys MinValue and MaxValue for setting the range of string length for each recognized line. Default values will be used if there is no manual setting.

Json Object Json Parameter Name Value Type Default Value
LineSpecification LineStringLengthRange JSON Object null
  • Remarks
  • Value range of MinValue and MaxValue: [0, 0x7fffffff]
  • MaxValue >= MinValue

Json Parameter Example

{
    "LineStringLengthRange": [4,200]
}

LineStringRegExPattern

Specifies the regular expression pattern of the string within a line.

Remarks
Supported regular expressions pattern syntax is same as TextRegExPattern.

As Json Parameter

Json Object Json Parameter Name Value Type Default Value
LineSpecification LineStringRegExPattern string ””

Json Parameter Example

{
    "LineStringRegExPattern":""
}

BinarizationModes

Please check LabelRecognizerParameter.BinarizationModes for reference.

GrayscaleEnhancementModes

Please check LabelRecognizerParameter.GrayscaleEnhancementModes for reference.

CharacterNormalizationModes

Please check LabelRecognizerParameter.CharacterNormalizationModes for reference.

This page is compatible for:

Version 7.5.0

Is this page helpful?

YesYes NoNo

In this article:

latest version

  • Latest version(3.2.0)
  • Version 3.x
    • Version 3.0.30
    • Version 3.0.20
    • Version 3.0.10
    • Version 3.0.0
  • Version 2.x
    • Version 2.2.20
    • Version 2.2.11
    • Version 2.2.10
    • Version 2.2.0
    • Version 2.0.0
  • Version 1.x
    • Version 1.2.1
    • Version 1.2
    • Version 1.0
Change +