This interface provide functionalities of character segmentation, recognition and verification.
More...
|
double | AspectRatioChange [get, set] |
| The resize ratio compared with the standard aspect ratio in the font database, in range 0.5 ~ 1.5. By default, it's 1 means no change.
|
|
BOOL | AutoDotPrint [get, set] |
| Whether to turn on automatic dot-print detection. By default, it's off.
|
|
int | CharHeightLB [get, set] |
| The lower bound of the character's estimated height, at least 1 pixel.
|
|
int | CharHeightUB [get, set] |
| The upper bound of the character's estimated height, should be larger than or equal to the lower bound.
|
|
double | CharSkewLB [get, set] |
| The lower bound of the italic character's skew int angle, in -60 ~ 60 degree.
|
|
double | CharSkewUB [get, set] |
| The upper bound of the italic character's skew int angle, should be in -60 ~ 60 degree and larger than or equal to the lower bound.
|
|
int | CharWidthLB [get, set] |
| The lower bound of the character's estimated width, at least 1 pixel.
|
|
int | CharWidthUB [get, set] |
| The upper bound of the character's estimated width, should be larger than or equal to the lower bound.
|
|
double | DotGap [get, set] |
| The maximum distance between two nearby dots' centers. By default, it's 0 which means we'll decide it on the fly based on the distributions of all the distances.
|
|
BOOL | DotPrint [get, set] |
| Whether to segment as the dot-print character. By default, it's no.
|
|
double | DotSize [get, set] |
| The average area of individual dots, used to determine whether a foreground object is the character dot or some noisy fragment. By default, it's 0 which means we'll decide it on the fly based on the distributions of all foreground objects.
|
|
ILFontDatabase | FontDatabase [get, set] |
| The associated font database.
|
|
int | FragmentThreshold [get, set] |
| The maximum area of object that could be treated as fragment, then it will be merged to neighbors to form a valid character. By default, it's 0 which means we'll decide it on the fly based on the distributions of all foreground objects.
|
|
int | NoiseThreshold [get, set] |
| The minimum area of valid character or fragment in pixel. By default, it's 0 which means we'll decide it on the fly based on the distributions of all foreground objects.
|
|
LPVPolarity | Polarity [get, set] |
| The object polarity of the characters from the background.
|
|
LPVOCRSegmentFlags | SegmentFlags [get, set] |
| The extra segmentation flags to control the line and character segmentation behavior.
|
|
wchar_t | UnknownPlaceholder [get, set] |
| The place holder for unknown characters. By default, it's the question symbol '?'.
|
|
LPVOCVFlags | VerifyFlags [get, set] |
| The verification flags to control which parts contribute to the verification score.
|
|
This interface provide functionalities of character segmentation, recognition and verification.
The OCR tool is used for vision-based character segmentation, recognition and verification. It is supported to extract multiple lines of text by one scanning. It's also capable to separated ligatures in line and sticky lines, which is a common case in laser-printed labels. Recognition and verification is processed based on the specified font database and the trained character models inside it.
To use this interface, you should create a LOCR object.
Example Code
C++
ILOCRPtr ocrTool = LOCR::Create();
ocrTool->FontDatabase = fontDb;
ocrTool->SetCharSize(100, 150, 20, 20);
ocrTool->NoiseThreshold = 20;
ILOCRResultPtr ocrResult;
if (err != LPVErrorCode::LPVNoError) return;
LPVErrorCode
This enumeration represents the type of a LPV function error.
Definition: LPVCore.idl:530
C#
LOCR ocrTool = new LOCR();
ocrTool.FontDatabase = fontDb;
ocrTool.SetCharSize(100, 150, 20, 20);
ocrTool.NoiseThreshold = 20;
ILOCRResultPtr ocrResult;
COM
ILOCRPtr ocrTool = LOCR::Create();
ocrTool->FontDatabase = fontDb;
ocrTool->SetCharSize(100, 150, 20, 20);
ocrTool->NoiseThreshold = 20;
ILOCRResultPtr ocrResult;
if (err != LPVErrorCode::LPVNoError) return;