layout | title | description | keywords | needAutoGenerateSidebar | needGenerateH3Content | noTitleIndex |
---|---|---|---|---|---|---|
default-layout |
TextDetectionMode - Dynamsoft Capture Vision Parameters |
The parameter TextDetectionMode of Dynamsoft Capture Vision is for detecting texts on an image. |
TextDetectionMode, parameter reference, parameter |
true |
true |
true |
Parameter TextDetectionMode
determines how to detect the text area. For tasks like barcode reading or border detection, the text part is not important; while for the task of text recognition, the results of detected text zone are mandatory.
{
"TextDetectionMode":
{
"Mode": "TTDM_WORD",
"Direction": "HORIZONTAL",
"CharHeightRange": [1,1000,1]
}
}
Parameter TextDetectionMode
consist of a group of text detection mode objects. Each text detection mode object includes a candidate mode and a series of mode arguments. The mode arguments of the text detection mode object is shown as follow:
Mode Argument Name | Mode Argument Summary |
---|---|
Mode (Required) |
Description Any one in Candidate Mode List as string |
Type String |
|
Candidate Mode List TTDM_WORD TTDM_LINE TTDM_LAYOUT TTDM_SKIP |
|
Direction (Optional) |
Description Set the direction to perform text zone detection. |
Type String |
|
Range "HORIZONTAL", "VERTICAL", "OBLIQUE" |
|
Default Value "HORIZONTAL" |
|
Valid For All modes |
|
CharHeightRange (Optional) |
Description Sets the range of letter height in pixel or a percentage. Format: [MinHeight, MaxHeight, ByThousandth]. if ByThousandth=1, the allowed values for MinHeight/MaxHeight=[1, 1000] if ByThousandth=0, the allowed values for MinHeight/MaxHeight=[1, 0x7fffffff] |
Type int array |
|
Range [1, 0x7fffffff] |
|
Valid For All modes |
|
MaxSpacingInALine (Optional) |
Description Sets the maximum spacing between characters treated as one line. |
Type int |
|
Range [-1, 0x7fffffff] |
|
Default Value -1 |
|
Valid For TTDM_LINE |
|
Remarks -1: means automatically set by the library. It is a percentage value relative to the average letter height of each line. |
|
Sensitivity (Optional) |
Description Sets the sensitivity of text detection. |
Type int |
|
Range [1, 9] |
|
Valid For All modes |
|
LibraryFileName (Optional) |
Description Sets the file name of the library to load dynamically. |
Type String |
|
Range A string value representing file name. |
|
Default Value "" |
|
Valid For All modes. |
|
LibraryParameters (Optional) |
Description The library must be in the same place with Dynamsoft Barcode Reader Library. |
Type String |
|
Range A string value representing parameters. |
|
Default Value "" |
|
Valid For All modes. |
{
"TextDetectionMode" :
{
"Mode" : "TTDM_LINE",
"Direction" : "HORIZONTAL",
"CharHeightRange" : [1, 1000, 1],
"MaxSpacingInALine" : -1,
"Sensitivity" : 3
}
}
{
"TextDetectionMode" :
{
"Mode" : "TTDM_LINE",
"Direction" : "HORIZONTAL",
"CharHeightRange" : [20, 1000, 1],
"MaxSpacingInALine" : -1,
"Sensitivity" : 7
}
}
{
"TextDetectionMode" :
{
"Mode" : "TTDM_WORD",
"Direction" : "HORIZONTAL",
"CharHeightRange" : [1, 1000, 1],
"Sensitivity" : 7
}
}
Find the text area based on the "word" objects. It is the fastest text detection mode but has the lowest accuracy.
Find the text area based on the "text line" objects. This mode has higher accuracy than the TTDM_WORD
. It is currently implemented as the default mode for text line recognizing.
Find the text area based on the layout. A mode with even higher accuracy than the TTDM_LINE
. Not supported yet.