eVision Python API
Loading...
Searching...
No Matches
eVision.EOCR Class Reference

Manages a complete context for the font-dependent printed character reader implemented in EasyOCR. More...

Public Member Functions

None __init__ (self)
 Constructs an OCR context.
None __init__ (self, eVision.EOCR other)
 Constructs an OCR context.
int GetFirstCharCode (self, int index)
 Returns the code of the pattern that matches at best a recognized character.
int GetSecondCharCode (self, int index)
 Returns the code of the pattern that matches at second best a recognized character.
float GetFirstCharDistance (self, int index)
 Computes the degree of similarity between the best matching pattern and a recognized character.
float GetSecondCharDistance (self, int index)
 Computes the degree of similarity between the second best matching pattern and a recognized character.
float GetConfidenceRatio (self, int index)
 Returns the degree of confidence in the recognized character.
int CharGetOrgX (self, int index)
 Returns the abscissa of the upper left corner of a recognized character.
int CharGetOrgY (self, int index)
 Returns the ordinate of the upper left corner of a recognized character.
int CharGetDstX (self, int index)
 Returns the abscissa of the lower right corner of a recognized character.
int CharGetDstY (self, int index)
 Returns the ordinate of the lower right corner of a recognized character.
int CharGetWidth (self, int index)
 Returns the width of a recognized character.
int CharGetHeight (self, int index)
 Returns the height of a recognized character.
None BuildObjects (self, eVision.EROIBW8|None sourceImage)
 Segments the source image, i.e.
None FindAllChars (self, eVision.EROIBW8|None sourceImage)
 Locates the characters by filtering the objects according to their size, and grouping them if the segmentation mode is set to eVision.ESegmentationMode.RepasteObjects.
None FindAllChars (self)
 Locates the characters by filtering the objects according to their size, and grouping them if the segmentation mode is set to eVision.ESegmentationMode.RepasteObjects.
None MatchChar (self, eVision.EROIBW8|None sourceImage, int classes, int index, int shiftX, int shiftY)
 Reads a single character, i.e.
str ReadText (self, eVision.EROIBW8|None sourceImage, int maximumNumberOfCharacters, int classes, bool autoSegmentation)
 Reads one or more rows of characters, i.e.
str ReadText (self, eVision.EROIBW8|None sourceImage, int maximumNumberOfCharacters, int classes)
 Reads one or more rows of characters, i.e.
str ReadText (self, eVision.EROIBW8|None sourceImage, int maximumNumberOfCharacters, list[int] classes, bool autoSegmentation)
 Reads one or more rows of characters, i.e.
str ReadText (self, eVision.EROIBW8|None sourceImage, int maximumNumberOfCharacters, list[int] classes)
 Reads one or more rows of characters, i.e.
str Recognize (self, eVision.EROIBW8|None sourceImage, int maximumNumberOfCharacters, int classes)
 Achieves all processing phases (blob analysis, character segmentation and pattern recognition) in a single operation.
str Recognize (self, eVision.EROIBW8|None sourceImage, int maximumNumberOfCharacters, list[int] classes)
 Achieves all processing phases (blob analysis, character segmentation and pattern recognition) in a single operation.
int HitChars (self, int cursorX, int cursorY, float zoomX, float zoomY, float panX, float panY)
 Returns the index of the character under the cursor.
int HitChars (self, int cursorX, int cursorY, float zoomX, float zoomY, float panX)
 Returns the index of the character under the cursor.
int HitChars (self, int cursorX, int cursorY, float zoomX, float zoomY)
 Returns the index of the character under the cursor.
int HitChars (self, int cursorX, int cursorY, float zoomX)
 Returns the index of the character under the cursor.
int HitChars (self, int cursorX, int cursorY)
 Returns the index of the character under the cursor.
bool HitChar (self, int cursorX, int cursorY, int charIndex, float zoomX, float zoomY, float panX, float panY)
 Returns true if the cursor is placed over the character specified by charIndex.
bool HitChar (self, int cursorX, int cursorY, int charIndex, float zoomX, float zoomY, float panX)
 Returns true if the cursor is placed over the character specified by charIndex.
bool HitChar (self, int cursorX, int cursorY, int charIndex, float zoomX, float zoomY)
 Returns true if the cursor is placed over the character specified by charIndex.
bool HitChar (self, int cursorX, int cursorY, int charIndex, float zoomX)
 Returns true if the cursor is placed over the character specified by charIndex.
bool HitChar (self, int cursorX, int cursorY, int charIndex)
 Returns true if the cursor is placed over the character specified by charIndex.
None LearnPattern (self, eVision.EROIBW8|None sourceImage, int charIndex, int code, int classes, bool autoSegmentation)
 Adds a new pattern to the font.
None LearnPattern (self, eVision.EROIBW8|None sourceImage, int charIndex, int code, int classes)
 Adds a new pattern to the font.
None LearnPattern (self, eVision.EROIBW8|None sourceImage, int charIndex, int code)
 Adds a new pattern to the font.
None LearnPatterns (self, eVision.EROIBW8|None sourceImage, str text, int singleClass, bool autoSegmentation)
 Adds all the patterns from the source image to the font.
None LearnPatterns (self, eVision.EROIBW8|None sourceImage, str text, int singleClass)
 Adds all the patterns from the source image to the font.
None LearnPatterns (self, eVision.EROIBW8|None sourceImage, str text)
 Adds all the patterns from the source image to the font.
None LearnPatterns (self, eVision.EROIBW8|None sourceImage, str text, list[int] classes, bool autoSegmentation)
 Adds all the patterns from the source image to the font.
None LearnPatterns (self, eVision.EROIBW8|None sourceImage, str text, list[int] classes)
 Adds all the patterns from the source image to the font.
None AddPatternFromImage (self, eVision.EROIBW8|None sourceImage, int originX, int originY, int width, int height, int code, int classes)
 Adds a new pattern to the font.
None AddPatternFromImage (self, eVision.EROIBW8|None sourceImage, int originX, int originY, int width, int height, int code)
 Adds a new pattern to the font.
None NewFont (self, int patternWidth, int patternHeight)
 Empties the contents of the font and sets the size of the pattern array to be used from then on.
None NewFont (self, int patternWidth)
 Empties the contents of the font and sets the size of the pattern array to be used from then on.
None NewFont (self)
 Empties the contents of the font and sets the size of the pattern array to be used from then on.
None RemovePattern (self, int index)
 Removes a given pattern from the current font.
int GetPatternCode (self, int index)
 Returns the character code of a given pattern in the current font.
None SetPatternCode (self, int index, int code)
 Sets the character code of a given pattern in the current font.
int GetPatternClass (self, int index)
 Returns the class of a given pattern in the current font.
None SetPatternClass (self, int index, int classIdx)
 Sets the class of a given pattern in the current font.
eVision.EImageBW8|None GetPatternBitmap (self, int index)
 Returns a pointer to an image holding the pattern of the given index.
ctypes.c_void_p GetPatternBitmapUnTyped (self, int index)
None EmptyChars (self)
 Empties the list of known characters.
None AddChar (self, int originX, int originY, int endX, int endY)
 Add a character coordinates to the list.
None DrawChar (self, eVision.EDrawAdapter|None graphicContext, int charIndex, float zoomX, float zoomY, float panX, float panY)
 Draws the bounding box of a given character.
None DrawChar (self, eVision.EDrawAdapter|None graphicContext, int charIndex, float zoomX, float zoomY, float panX)
 Draws the bounding box of a given character.
None DrawChar (self, eVision.EDrawAdapter|None graphicContext, int charIndex, float zoomX, float zoomY)
 Draws the bounding box of a given character.
None DrawChar (self, eVision.EDrawAdapter|None graphicContext, int charIndex, float zoomX)
 Draws the bounding box of a given character.
None DrawChar (self, eVision.EDrawAdapter|None graphicContext, int charIndex)
 Draws the bounding box of a given character.
None DrawChars (self, eVision.EDrawAdapter|None graphicContext, float zoomX, float zoomY, float panX, float panY)
 Draws the bounding boxes of all characters in the image.
None DrawChars (self, eVision.EDrawAdapter|None graphicContext, float zoomX, float zoomY, float panX)
 Draws the bounding boxes of all characters in the image.
None DrawChars (self, eVision.EDrawAdapter|None graphicContext, float zoomX, float zoomY)
 Draws the bounding boxes of all characters in the image.
None DrawChars (self, eVision.EDrawAdapter|None graphicContext, float zoomX)
 Draws the bounding boxes of all characters in the image.
None DrawChars (self, eVision.EDrawAdapter|None graphicContext)
 Draws the bounding boxes of all characters in the image.
None DrawObjects (self, eVision.EDrawAdapter|None graphicContext, eVision.ESelectionFlag selectionFlag, float zoomX, float zoomY, float panX, float panY)
 Draws segmented objects.
None DrawObjects (self, eVision.EDrawAdapter|None graphicContext, eVision.ESelectionFlag selectionFlag, float zoomX, float zoomY, float panX)
 Draws segmented objects.
None DrawObjects (self, eVision.EDrawAdapter|None graphicContext, eVision.ESelectionFlag selectionFlag, float zoomX, float zoomY)
 Draws segmented objects.
None DrawObjects (self, eVision.EDrawAdapter|None graphicContext, eVision.ESelectionFlag selectionFlag, float zoomX)
 Draws segmented objects.
None DrawObjects (self, eVision.EDrawAdapter|None graphicContext, eVision.ESelectionFlag selectionFlag)
 Draws segmented objects.
None DrawObjects (self, eVision.EDrawAdapter|None graphicContext)
 Draws segmented objects.
None Load (self, eVision.ESerializer|None serializer)
 Loads the eVision.EOCR object configuration.
None Load (self, str path)
 Loads the eVision.EOCR object configuration.
None Save (self, eVision.ESerializer|None serializer)
 Saves the eVision.EOCR object configuration.
None Save (self, str path)
 Saves the eVision.EOCR object configuration.
None Dump (self)

Properties

 PatternWidth = property(_PatternWidth__getter, None)
 Current pattern width, as set at the last eVision.EOCR.NewFont or eVision.EOCR.Load operation.
 PatternHeight = property(_PatternHeight__getter, None)
 Current pattern height, as set at the last eVision.EOCR.NewFont or eVision.EOCR.Load operation.
 MatchingMode = property(_MatchingMode__getter, _MatchingMode__setter)
 Matching mode to use to compare characters to the template.
 ShiftingMode = property(_ShiftingMode__getter, _ShiftingMode__setter)
 Shifting mode to use to compare characters to the template.
 ShiftXTolerance = property(_ShiftXTolerance__getter, _ShiftXTolerance__setter)
 Horizontal translation tolerance around the nominal position when the character positions are explicitly specified.
 ShiftYTolerance = property(_ShiftYTolerance__getter, _ShiftYTolerance__setter)
 Vertical translation tolerance around the nominal position when the character positions are explicitly specified.
 TextColor = property(_TextColor__getter, _TextColor__setter)
 Text color.
 Threshold = property(_Threshold__getter, _Threshold__setter)
 Threshold mode used for image segmentation.
 RelativeThreshold = property(_RelativeThreshold__getter, _RelativeThreshold__setter)
 Relative threshold used for image segmentation.
 MinCharWidth = property(_MinCharWidth__getter, _MinCharWidth__setter)
 Minimum character width.
 MaxCharWidth = property(_MaxCharWidth__getter, _MaxCharWidth__setter)
 Maximum character width.
 MinCharHeight = property(_MinCharHeight__getter, _MinCharHeight__setter)
 Minimum character height.
 MaxCharHeight = property(_MaxCharHeight__getter, _MaxCharHeight__setter)
 Maximum character height.
 CharSpacing = property(_CharSpacing__getter, _CharSpacing__setter)
 Spacing that separates characters.
 LineSpacingMode = property(_LineSpacingMode__getter, _LineSpacingMode__setter)
 Line spacing mode to sort the character boxes into lines.
 NoiseArea = property(_NoiseArea__getter, _NoiseArea__setter)
 Noise area.
 SegmentationMode = property(_SegmentationMode__getter, _SegmentationMode__setter)
 Segmentation mode.
 CutLargeChars = property(_CutLargeChars__getter, _CutLargeChars__setter)
 Flag indicating whether the large chars cutting mode is used.
 RelativeSpacing = property(_RelativeSpacing__getter, _RelativeSpacing__setter)
 Relative spacing value.
 RemoveNarrowOrFlat = property(_RemoveNarrowOrFlat__getter, _RemoveNarrowOrFlat__setter)
 Flag indicating whether the characters are discarded when either dimension falls below the minimum value.
 RemoveBorder = property(_RemoveBorder__getter, _RemoveBorder__setter)
 Flag indicating whether all blobs touching the ROI edges are automatically discarded.
 CompareAspectRatio = property(_CompareAspectRatio__getter, _CompareAspectRatio__setter)
 Flag indicating whether the character aspect ratio is used to compute the recognition score.
 NumChars = property(_NumChars__getter, None)
 Number of recognized characters.
 AverageFirstCharDistance = property(_AverageFirstCharDistance__getter, None)
 NumPatterns = property(_NumPatterns__getter, None)
 Number of patterns in the current font.
 TrueThreshold = property(_TrueThreshold__getter, None)
 Absolute threshold level when using a single threshold.

Detailed Description

Manages a complete context for the font-dependent printed character reader implemented in EasyOCR.

Remarks:

License(s): EasyOCR or EasyOCR2

Constructor & Destructor Documentation

◆ __init__() [1/2]

None eVision.EOCR.__init__ ( self)

Constructs an OCR context.

Remarks:

By default, the Threshold property is set to 128.

◆ __init__() [2/2]

None eVision.EOCR.__init__ ( self,
eVision.EOCR other )

Constructs an OCR context.

Remarks:

By default, the Threshold property is set to 128.

Parameters
otherAnother eVision.EOCR object to be copied in the new eVision.EOCR object.

Member Function Documentation

◆ AddChar()

None eVision.EOCR.AddChar ( self,
int originX,
int originY,
int endX,
int endY )

Add a character coordinates to the list.

Remarks:

It is to use when you know the exact position of the characters to be recognized, to bypass the segmentation step, for efficiency or reliability purposes. To use this feature, simply specify the character positions by successive calls to AddChar. When this is done, the remainder of the OCR processing steps can take place. To empty the list of known characters, call eVision.EOCR.EmptyChars.

Parameters
originXAbscissa of the upper left corner of the bounding box of the character.
originYOrdinate of the upper left corner of the bounding box of the character.
endXAbscissa of the bottom right corner of the bounding box of the character.
endYOrdinate of the bottom right corner of the bounding box of the character.

◆ AddPatternFromImage() [1/2]

None eVision.EOCR.AddPatternFromImage ( self,
eVision.EROIBW8 | None sourceImage,
int originX,
int originY,
int width,
int height,
int code )

Adds a new pattern to the font.

Remarks:

The pattern is extracted from an image by specifying a bounding rectangle.

Parameters
sourceImagePointer to the source image/ROI.
originXAbscissa of the upper left corner of the bounding box of the pattern.
originYOrdinate of the upper left corner of the bounding box of the pattern.
widthWidth of the bounding box of the pattern.
heightHeight of the bounding box of the pattern.
codeCharacter code of the pattern.

◆ AddPatternFromImage() [2/2]

None eVision.EOCR.AddPatternFromImage ( self,
eVision.EROIBW8 | None sourceImage,
int originX,
int originY,
int width,
int height,
int code,
int classes )

Adds a new pattern to the font.

Remarks:

The pattern is extracted from an image by specifying a bounding rectangle.

Parameters
sourceImagePointer to the source image/ROI.
originXAbscissa of the upper left corner of the bounding box of the pattern.
originYOrdinate of the upper left corner of the bounding box of the pattern.
widthWidth of the bounding box of the pattern.
heightHeight of the bounding box of the pattern.
codeCharacter code of the pattern.
classesClass of the pattern, as defined by eVision.EOCRClass.

◆ BuildObjects()

None eVision.EOCR.BuildObjects ( self,
eVision.EROIBW8 | None sourceImage )

Segments the source image, i.e.

detects and labels the objects.

Remarks:

An object is a connected set of pixels above or below Threshold (according to TextColor).

Parameters
sourceImagePointer to the source image/ROI.

◆ CharGetDstX()

int eVision.EOCR.CharGetDstX ( self,
int index )

Returns the abscissa of the lower right corner of a recognized character.

Parameters
indexCharacter number (in range 0..NumChars-1).

◆ CharGetDstY()

int eVision.EOCR.CharGetDstY ( self,
int index )

Returns the ordinate of the lower right corner of a recognized character.

Parameters
indexCharacter number (in range 0..NumChars-1).

◆ CharGetHeight()

int eVision.EOCR.CharGetHeight ( self,
int index )

Returns the height of a recognized character.

Parameters
indexCharacter number (in range 0..NumChars-1).

◆ CharGetOrgX()

int eVision.EOCR.CharGetOrgX ( self,
int index )

Returns the abscissa of the upper left corner of a recognized character.

Parameters
indexCharacter number (in range 0..NumChars-1).

◆ CharGetOrgY()

int eVision.EOCR.CharGetOrgY ( self,
int index )

Returns the ordinate of the upper left corner of a recognized character.

Parameters
indexCharacter number (in range 0..NumChars-1).

◆ CharGetWidth()

int eVision.EOCR.CharGetWidth ( self,
int index )

Returns the width of a recognized character.

Parameters
indexCharacter number (in range 0..NumChars-1).

◆ DrawChar() [1/5]

None eVision.EOCR.DrawChar ( self,
eVision.EDrawAdapter | None graphicContext,
int charIndex )

Draws the bounding box of a given character.

Remarks:

Drawing is done in the device context associated to the desired window. The current pen is used.

Parameters
graphicContextHandle of the device context on which to draw.
charIndexCharacter index, in range 0..NumChars-1.

◆ DrawChar() [2/5]

None eVision.EOCR.DrawChar ( self,
eVision.EDrawAdapter | None graphicContext,
int charIndex,
float zoomX )

Draws the bounding box of a given character.

Remarks:

Drawing is done in the device context associated to the desired window. The current pen is used.

Parameters
graphicContextHandle of the device context on which to draw.
charIndexCharacter index, in range 0..NumChars-1.
zoomXHorizontal zooming factor. By default, true scale is used.

◆ DrawChar() [3/5]

None eVision.EOCR.DrawChar ( self,
eVision.EDrawAdapter | None graphicContext,
int charIndex,
float zoomX,
float zoomY )

Draws the bounding box of a given character.

Remarks:

Drawing is done in the device context associated to the desired window. The current pen is used.

Parameters
graphicContextHandle of the device context on which to draw.
charIndexCharacter index, in range 0..NumChars-1.
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0 (default), the horizontal zooming factor is used instead, so as to provide isotropic zooming.

◆ DrawChar() [4/5]

None eVision.EOCR.DrawChar ( self,
eVision.EDrawAdapter | None graphicContext,
int charIndex,
float zoomX,
float zoomY,
float panX )

Draws the bounding box of a given character.

Remarks:

Drawing is done in the device context associated to the desired window. The current pen is used.

Parameters
graphicContextHandle of the device context on which to draw.
charIndexCharacter index, in range 0..NumChars-1.
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0 (default), the horizontal zooming factor is used instead, so as to provide isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.

◆ DrawChar() [5/5]

None eVision.EOCR.DrawChar ( self,
eVision.EDrawAdapter | None graphicContext,
int charIndex,
float zoomX,
float zoomY,
float panX,
float panY )

Draws the bounding box of a given character.

Remarks:

Drawing is done in the device context associated to the desired window. The current pen is used.

Parameters
graphicContextHandle of the device context on which to draw.
charIndexCharacter index, in range 0..NumChars-1.
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0 (default), the horizontal zooming factor is used instead, so as to provide isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.
panYVertical panning value expressed in pixels. By default, no panning occurs.

◆ DrawChars() [1/5]

None eVision.EOCR.DrawChars ( self,
eVision.EDrawAdapter | None graphicContext )

Draws the bounding boxes of all characters in the image.

Remarks:

Drawing is done in the device context associated to the desired window. The current pen is used for all characters (to vary the colors, draw the objects separately using the eVision.EOCR.DrawChar method instead).

Parameters
graphicContextHandle of the device context on which to draw.

◆ DrawChars() [2/5]

None eVision.EOCR.DrawChars ( self,
eVision.EDrawAdapter | None graphicContext,
float zoomX )

Draws the bounding boxes of all characters in the image.

Remarks:

Drawing is done in the device context associated to the desired window. The current pen is used for all characters (to vary the colors, draw the objects separately using the eVision.EOCR.DrawChar method instead).

Parameters
graphicContextHandle of the device context on which to draw.
zoomXHorizontal zooming factor. By default, true scale is used.

◆ DrawChars() [3/5]

None eVision.EOCR.DrawChars ( self,
eVision.EDrawAdapter | None graphicContext,
float zoomX,
float zoomY )

Draws the bounding boxes of all characters in the image.

Remarks:

Drawing is done in the device context associated to the desired window. The current pen is used for all characters (to vary the colors, draw the objects separately using the eVision.EOCR.DrawChar method instead).

Parameters
graphicContextHandle of the device context on which to draw.
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0 (default), the horizontal zooming factor is used instead, so as to provide isotropic zooming.

◆ DrawChars() [4/5]

None eVision.EOCR.DrawChars ( self,
eVision.EDrawAdapter | None graphicContext,
float zoomX,
float zoomY,
float panX )

Draws the bounding boxes of all characters in the image.

Remarks:

Drawing is done in the device context associated to the desired window. The current pen is used for all characters (to vary the colors, draw the objects separately using the eVision.EOCR.DrawChar method instead).

Parameters
graphicContextHandle of the device context on which to draw.
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0 (default), the horizontal zooming factor is used instead, so as to provide isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.

◆ DrawChars() [5/5]

None eVision.EOCR.DrawChars ( self,
eVision.EDrawAdapter | None graphicContext,
float zoomX,
float zoomY,
float panX,
float panY )

Draws the bounding boxes of all characters in the image.

Remarks:

Drawing is done in the device context associated to the desired window. The current pen is used for all characters (to vary the colors, draw the objects separately using the eVision.EOCR.DrawChar method instead).

Parameters
graphicContextHandle of the device context on which to draw.
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0 (default), the horizontal zooming factor is used instead, so as to provide isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.
panYVertical panning value expressed in pixels. By default, no panning occurs.

◆ DrawObjects() [1/6]

None eVision.EOCR.DrawObjects ( self,
eVision.EDrawAdapter | None graphicContext )

Draws segmented objects.

Remarks:

Drawing is done in the device context associated to the desired window. The current pen is used for all objects. Optionally, only the selected or deselected objects can be drawn.

Parameters
graphicContextHandle of the device context on which to draw.

◆ DrawObjects() [2/6]

None eVision.EOCR.DrawObjects ( self,
eVision.EDrawAdapter | None graphicContext,
eVision.ESelectionFlag selectionFlag )

Draws segmented objects.

Remarks:

Drawing is done in the device context associated to the desired window. The current pen is used for all objects. Optionally, only the selected or deselected objects can be drawn.

Parameters
graphicContextHandle of the device context on which to draw.
selectionFlagTells how the selected/unselected state of the objects is handled, as defined by eVision.ESelectionFlag.

◆ DrawObjects() [3/6]

None eVision.EOCR.DrawObjects ( self,
eVision.EDrawAdapter | None graphicContext,
eVision.ESelectionFlag selectionFlag,
float zoomX )

Draws segmented objects.

Remarks:

Drawing is done in the device context associated to the desired window. The current pen is used for all objects. Optionally, only the selected or deselected objects can be drawn.

Parameters
graphicContextHandle of the device context on which to draw.
selectionFlagTells how the selected/unselected state of the objects is handled, as defined by eVision.ESelectionFlag.
zoomXHorizontal zooming factor. By default, true scale is used.

◆ DrawObjects() [4/6]

None eVision.EOCR.DrawObjects ( self,
eVision.EDrawAdapter | None graphicContext,
eVision.ESelectionFlag selectionFlag,
float zoomX,
float zoomY )

Draws segmented objects.

Remarks:

Drawing is done in the device context associated to the desired window. The current pen is used for all objects. Optionally, only the selected or deselected objects can be drawn.

Parameters
graphicContextHandle of the device context on which to draw.
selectionFlagTells how the selected/unselected state of the objects is handled, as defined by eVision.ESelectionFlag.
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0 (default), the horizontal zooming factor is used instead, so as to provide isotropic zooming.

◆ DrawObjects() [5/6]

None eVision.EOCR.DrawObjects ( self,
eVision.EDrawAdapter | None graphicContext,
eVision.ESelectionFlag selectionFlag,
float zoomX,
float zoomY,
float panX )

Draws segmented objects.

Remarks:

Drawing is done in the device context associated to the desired window. The current pen is used for all objects. Optionally, only the selected or deselected objects can be drawn.

Parameters
graphicContextHandle of the device context on which to draw.
selectionFlagTells how the selected/unselected state of the objects is handled, as defined by eVision.ESelectionFlag.
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0 (default), the horizontal zooming factor is used instead, so as to provide isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.

◆ DrawObjects() [6/6]

None eVision.EOCR.DrawObjects ( self,
eVision.EDrawAdapter | None graphicContext,
eVision.ESelectionFlag selectionFlag,
float zoomX,
float zoomY,
float panX,
float panY )

Draws segmented objects.

Remarks:

Drawing is done in the device context associated to the desired window. The current pen is used for all objects. Optionally, only the selected or deselected objects can be drawn.

Parameters
graphicContextHandle of the device context on which to draw.
selectionFlagTells how the selected/unselected state of the objects is handled, as defined by eVision.ESelectionFlag.
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0 (default), the horizontal zooming factor is used instead, so as to provide isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.
panYVertical panning value expressed in pixels. By default, no panning occurs.

◆ Dump()

None eVision.EOCR.Dump ( self)

◆ EmptyChars()

None eVision.EOCR.EmptyChars ( self)

Empties the list of known characters.

Remarks:

It is to use when you know the exact position of the characters to be recognized. See member eVision.EOCR.AddChar.

◆ FindAllChars() [1/2]

None eVision.EOCR.FindAllChars ( self)

Locates the characters by filtering the objects according to their size, and grouping them if the segmentation mode is set to eVision.ESegmentationMode.RepasteObjects.

Remarks:

The characters are sorted from left to right. This operation must be performed after a call to eVision.EOCR.BuildObjects and before a call to eVision.EOCR.ReadText.

◆ FindAllChars() [2/2]

None eVision.EOCR.FindAllChars ( self,
eVision.EROIBW8 | None sourceImage )

Locates the characters by filtering the objects according to their size, and grouping them if the segmentation mode is set to eVision.ESegmentationMode.RepasteObjects.

Remarks:

The characters are sorted from left to right. This operation must be performed after a call to eVision.EOCR.BuildObjects and before a call to eVision.EOCR.ReadText.

Parameters
sourceImagePointer to the source image/ROI. This parameter is not used and kept only for compatibility purposes.

◆ GetConfidenceRatio()

float eVision.EOCR.GetConfidenceRatio ( self,
int index )

Returns the degree of confidence in the recognized character.

Remarks:

A value of 100 % means there is no difference between the recognized character and the best matching pattern. A value of 0 % means there is no way to distinguish between the best and second best matching pattern. The computation of the confidence ratio is based on the first and second characters distance parameters (see eVision.EOCR.GetFirstCharDistance and eVision.EOCR.GetSecondCharDistance).

Parameters
indexCharacter number (in range 0..NumChars-1).

◆ GetFirstCharCode()

int eVision.EOCR.GetFirstCharCode ( self,
int index )

Returns the code of the pattern that matches at best a recognized character.

Parameters
indexCharacter number (in range 0..NumChars-1).

◆ GetFirstCharDistance()

float eVision.EOCR.GetFirstCharDistance ( self,
int index )

Computes the degree of similarity between the best matching pattern and a recognized character.

Remarks:

Returns 0 for a perfect match and 1 for a total mismatch.

Parameters
indexCharacter number (in range 0..NumChars-1).

◆ GetPatternBitmap()

eVision.EImageBW8 | None eVision.EOCR.GetPatternBitmap ( self,
int index )

Returns a pointer to an image holding the pattern of the given index.

This image should not be modified.

◆ GetPatternBitmapUnTyped()

ctypes.c_void_p eVision.EOCR.GetPatternBitmapUnTyped ( self,
int index )

◆ GetPatternClass()

int eVision.EOCR.GetPatternClass ( self,
int index )

Returns the class of a given pattern in the current font.

Parameters
indexPattern number (in range 0..NumPatterns-1).

◆ GetPatternCode()

int eVision.EOCR.GetPatternCode ( self,
int index )

Returns the character code of a given pattern in the current font.

Parameters
indexPattern number (in range 0..NumPatterns-1).

◆ GetSecondCharCode()

int eVision.EOCR.GetSecondCharCode ( self,
int index )

Returns the code of the pattern that matches at second best a recognized character.

Parameters
indexCharacter number (in range 0..NumChars-1).

◆ GetSecondCharDistance()

float eVision.EOCR.GetSecondCharDistance ( self,
int index )

Computes the degree of similarity between the second best matching pattern and a recognized character.

Remarks:

Returns 0 for a perfect match and 1 for a total mismatch.

Parameters
indexCharacter number (in range 0..NumChars-1).

◆ HitChar() [1/5]

bool eVision.EOCR.HitChar ( self,
int cursorX,
int cursorY,
int charIndex )

Returns true if the cursor is placed over the character specified by charIndex.

Remarks:

If zooming and/or panning were used when drawing the ROI, the same values must be used with this method.

Parameters
cursorXCurrent cursor coordinates.
cursorYCurrent cursor coordinates.
charIndexIndex of the character to be hit.

◆ HitChar() [2/5]

bool eVision.EOCR.HitChar ( self,
int cursorX,
int cursorY,
int charIndex,
float zoomX )

Returns true if the cursor is placed over the character specified by charIndex.

Remarks:

If zooming and/or panning were used when drawing the ROI, the same values must be used with this method.

Parameters
cursorXCurrent cursor coordinates.
cursorYCurrent cursor coordinates.
charIndexIndex of the character to be hit.
zoomXHorizontal zooming factor. By default, true scale is used.

◆ HitChar() [3/5]

bool eVision.EOCR.HitChar ( self,
int cursorX,
int cursorY,
int charIndex,
float zoomX,
float zoomY )

Returns true if the cursor is placed over the character specified by charIndex.

Remarks:

If zooming and/or panning were used when drawing the ROI, the same values must be used with this method.

Parameters
cursorXCurrent cursor coordinates.
cursorYCurrent cursor coordinates.
charIndexIndex of the character to be hit.
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0, the default value, the horizontal zooming factor is used instead, so as to provide isotropic zooming.

◆ HitChar() [4/5]

bool eVision.EOCR.HitChar ( self,
int cursorX,
int cursorY,
int charIndex,
float zoomX,
float zoomY,
float panX )

Returns true if the cursor is placed over the character specified by charIndex.

Remarks:

If zooming and/or panning were used when drawing the ROI, the same values must be used with this method.

Parameters
cursorXCurrent cursor coordinates.
cursorYCurrent cursor coordinates.
charIndexIndex of the character to be hit.
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0, the default value, the horizontal zooming factor is used instead, so as to provide isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.

◆ HitChar() [5/5]

bool eVision.EOCR.HitChar ( self,
int cursorX,
int cursorY,
int charIndex,
float zoomX,
float zoomY,
float panX,
float panY )

Returns true if the cursor is placed over the character specified by charIndex.

Remarks:

If zooming and/or panning were used when drawing the ROI, the same values must be used with this method.

Parameters
cursorXCurrent cursor coordinates.
cursorYCurrent cursor coordinates.
charIndexIndex of the character to be hit.
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0, the default value, the horizontal zooming factor is used instead, so as to provide isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.
panYVertical panning value expressed in pixels. By default, no panning occurs.

◆ HitChars() [1/5]

int eVision.EOCR.HitChars ( self,
int cursorX,
int cursorY )

Returns the index of the character under the cursor.

If the cursor is not located on any character, then eVision.EOCR.NumChars is returned.

Remarks:

If zooming and/or panning were used when drawing the ROI, the same values must be used with this method.

Parameters
cursorXCurrent cursor coordinates.
cursorYCurrent cursor coordinates.

◆ HitChars() [2/5]

int eVision.EOCR.HitChars ( self,
int cursorX,
int cursorY,
float zoomX )

Returns the index of the character under the cursor.

If the cursor is not located on any character, then eVision.EOCR.NumChars is returned.

Remarks:

If zooming and/or panning were used when drawing the ROI, the same values must be used with this method.

Parameters
cursorXCurrent cursor coordinates.
cursorYCurrent cursor coordinates.
zoomXHorizontal zooming factor. By default, true scale is used.

◆ HitChars() [3/5]

int eVision.EOCR.HitChars ( self,
int cursorX,
int cursorY,
float zoomX,
float zoomY )

Returns the index of the character under the cursor.

If the cursor is not located on any character, then eVision.EOCR.NumChars is returned.

Remarks:

If zooming and/or panning were used when drawing the ROI, the same values must be used with this method.

Parameters
cursorXCurrent cursor coordinates.
cursorYCurrent cursor coordinates.
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0, the default value, the horizontal zooming factor is used instead, so as to provide isotropic zooming.

◆ HitChars() [4/5]

int eVision.EOCR.HitChars ( self,
int cursorX,
int cursorY,
float zoomX,
float zoomY,
float panX )

Returns the index of the character under the cursor.

If the cursor is not located on any character, then eVision.EOCR.NumChars is returned.

Remarks:

If zooming and/or panning were used when drawing the ROI, the same values must be used with this method.

Parameters
cursorXCurrent cursor coordinates.
cursorYCurrent cursor coordinates.
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0, the default value, the horizontal zooming factor is used instead, so as to provide isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.

◆ HitChars() [5/5]

int eVision.EOCR.HitChars ( self,
int cursorX,
int cursorY,
float zoomX,
float zoomY,
float panX,
float panY )

Returns the index of the character under the cursor.

If the cursor is not located on any character, then eVision.EOCR.NumChars is returned.

Remarks:

If zooming and/or panning were used when drawing the ROI, the same values must be used with this method.

Parameters
cursorXCurrent cursor coordinates.
cursorYCurrent cursor coordinates.
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0, the default value, the horizontal zooming factor is used instead, so as to provide isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.
panYVertical panning value expressed in pixels. By default, no panning occurs.

◆ LearnPattern() [1/3]

None eVision.EOCR.LearnPattern ( self,
eVision.EROIBW8 | None sourceImage,
int charIndex,
int code )

Adds a new pattern to the font.

Remarks:

The pattern is selected by its index value, as assigned by the eVision.EOCR.FindAllChars process.

Parameters
sourceImagePointer to the source image/ROI.
charIndexIndex of the character (ASCII or Unicode) to learn.
codeCharacter code of the pattern.

◆ LearnPattern() [2/3]

None eVision.EOCR.LearnPattern ( self,
eVision.EROIBW8 | None sourceImage,
int charIndex,
int code,
int classes )

Adds a new pattern to the font.

Remarks:

The pattern is selected by its index value, as assigned by the eVision.EOCR.FindAllChars process.

Parameters
sourceImagePointer to the source image/ROI.
charIndexIndex of the character (ASCII or Unicode) to learn.
codeCharacter code of the pattern.
classesClass of the pattern, as defined by eVision.EOCRClass.

◆ LearnPattern() [3/3]

None eVision.EOCR.LearnPattern ( self,
eVision.EROIBW8 | None sourceImage,
int charIndex,
int code,
int classes,
bool autoSegmentation )

Adds a new pattern to the font.

Remarks:

The pattern is selected by its index value, as assigned by the eVision.EOCR.FindAllChars process.

Parameters
sourceImagePointer to the source image/ROI.
charIndexIndex of the character (ASCII or Unicode) to learn.
codeCharacter code of the pattern.
classesClass of the pattern, as defined by eVision.EOCRClass.
autoSegmentationBoolean indicating whether the calculation of the true threshold has to be forced (default true) or bypassed (false).

◆ LearnPatterns() [1/5]

None eVision.EOCR.LearnPatterns ( self,
eVision.EROIBW8 | None sourceImage,
str text )

Adds all the patterns from the source image to the font.

Remarks:

Patterns are ordered by their index value, as assigned by the eVision.EOCR.FindAllChars process.

Parameters
sourceImagePointer to the source image/ROI.
textString containing character codes of the patterns.

◆ LearnPatterns() [2/5]

None eVision.EOCR.LearnPatterns ( self,
eVision.EROIBW8 | None sourceImage,
str text,
int singleClass )

Adds all the patterns from the source image to the font.

Remarks:

Patterns are ordered by their index value, as assigned by the eVision.EOCR.FindAllChars process.

Parameters
sourceImagePointer to the source image/ROI.
textString containing character codes of the patterns.
singleClassIf specified, all the characters of the string are associated with the same class(es), that is specified by singleClass.

◆ LearnPatterns() [3/5]

None eVision.EOCR.LearnPatterns ( self,
eVision.EROIBW8 | None sourceImage,
str text,
int singleClass,
bool autoSegmentation )

Adds all the patterns from the source image to the font.

Remarks:

Patterns are ordered by their index value, as assigned by the eVision.EOCR.FindAllChars process.

Parameters
sourceImagePointer to the source image/ROI.
textString containing character codes of the patterns.
singleClassIf specified, all the characters of the string are associated with the same class(es), that is specified by singleClass.
autoSegmentationBoolean indicating whether the calculation of the true threshold has to be forced (default true) or bypassed (false).

◆ LearnPatterns() [4/5]

None eVision.EOCR.LearnPatterns ( self,
eVision.EROIBW8 | None sourceImage,
str text,
list[int] classes )

Adds all the patterns from the source image to the font.

Remarks:

Patterns are ordered by their index value, as assigned by the eVision.EOCR.FindAllChars process.

Parameters
sourceImagePointer to the source image/ROI.
textString containing character codes of the patterns.
classesIf specified, the i-th character of the string is associated with the class specified by the i-th element of the vector classes.

◆ LearnPatterns() [5/5]

None eVision.EOCR.LearnPatterns ( self,
eVision.EROIBW8 | None sourceImage,
str text,
list[int] classes,
bool autoSegmentation )

Adds all the patterns from the source image to the font.

Remarks:

Patterns are ordered by their index value, as assigned by the eVision.EOCR.FindAllChars process.

Parameters
sourceImagePointer to the source image/ROI.
textString containing character codes of the patterns.
classesIf specified, the i-th character of the string is associated with the class specified by the i-th element of the vector classes.
autoSegmentationBoolean indicating whether the calculation of the true threshold has to be forced (default true) or bypassed (false).

◆ Load() [1/2]

None eVision.EOCR.Load ( self,
eVision.ESerializer | None serializer )

Loads the eVision.EOCR object configuration.

Remarks:

The given eVision.ESerializer must have been created for reading.

Parameters
serializerThe serializer.

◆ Load() [2/2]

None eVision.EOCR.Load ( self,
str path )

Loads the eVision.EOCR object configuration.

Remarks:

The given eVision.ESerializer must have been created for reading.

Parameters
pathThe path from which to load the configuration.

◆ MatchChar()

None eVision.EOCR.MatchChar ( self,
eVision.EROIBW8 | None sourceImage,
int classes,
int index,
int shiftX,
int shiftY )

Reads a single character, i.e.

finds the best match between the patterns in the font and the given character.

Remarks:

A shift can be apply to the character. This operation can only be performed after a call to eVision.EOCR.FindAllChars.

Parameters
sourceImagePointer to the source image/ROI.
classesLogical mask obtained by combining the values of eVision.EOCRClass, to specify to what classes the character may belong.
indexCharacter number (in range 0..NumChars-1).
shiftXHorizontal translation applied to the character.
shiftYVertical translation applied to the character.

◆ NewFont() [1/3]

None eVision.EOCR.NewFont ( self)

Empties the contents of the font and sets the size of the pattern array to be used from then on.

Remarks:

A larger pattern array improves the recognition sensitivity, at the expense of increased processing time.

◆ NewFont() [2/3]

None eVision.EOCR.NewFont ( self,
int patternWidth )

Empties the contents of the font and sets the size of the pattern array to be used from then on.

Remarks:

A larger pattern array improves the recognition sensitivity, at the expense of increased processing time.

Parameters
patternWidthWidth of the normalized pattern representation, in pixels.

◆ NewFont() [3/3]

None eVision.EOCR.NewFont ( self,
int patternWidth,
int patternHeight )

Empties the contents of the font and sets the size of the pattern array to be used from then on.

Remarks:

A larger pattern array improves the recognition sensitivity, at the expense of increased processing time.

Parameters
patternWidthWidth of the normalized pattern representation, in pixels.
patternHeightHeight of the normalized pattern representation, in pixels.

◆ ReadText() [1/4]

str eVision.EOCR.ReadText ( self,
eVision.EROIBW8 | None sourceImage,
int maximumNumberOfCharacters,
int classes )

Reads one or more rows of characters, i.e.

finds the best match between the patterns in the font and the segmented characters.

Remarks:

This operation can only be performed after a call to eVision.EOCR.FindAllChars.

Parameters
sourceImagePointer to the source image/ROI.
maximumNumberOfCharactersMaximum number of characters to be read.
classesPointer to an array of logical masks obtained by combining the values of eVision.EOCRClass, to specify to what classes the character may belong. Each mask value in the array applies to the corresponding character.

◆ ReadText() [2/4]

str eVision.EOCR.ReadText ( self,
eVision.EROIBW8 | None sourceImage,
int maximumNumberOfCharacters,
int classes,
bool autoSegmentation )

Reads one or more rows of characters, i.e.

finds the best match between the patterns in the font and the segmented characters.

Remarks:

This operation can only be performed after a call to eVision.EOCR.FindAllChars.

Parameters
sourceImagePointer to the source image/ROI.
maximumNumberOfCharactersMaximum number of characters to be read.
classesPointer to an array of logical masks obtained by combining the values of eVision.EOCRClass, to specify to what classes the character may belong. Each mask value in the array applies to the corresponding character.
autoSegmentationBoolean indicating whether the calculation of the true threshold has to be forced (default true) or bypassed (false).

◆ ReadText() [3/4]

str eVision.EOCR.ReadText ( self,
eVision.EROIBW8 | None sourceImage,
int maximumNumberOfCharacters,
list[int] classes )

Reads one or more rows of characters, i.e.

finds the best match between the patterns in the font and the segmented characters.

Remarks:

This operation can only be performed after a call to eVision.EOCR.FindAllChars.

Parameters
sourceImagePointer to the source image/ROI.
maximumNumberOfCharactersMaximum number of characters to be read.
classesPointer to an array of logical masks obtained by combining the values of eVision.EOCRClass, to specify to what classes the character may belong. Each mask value in the array applies to the corresponding character.

◆ ReadText() [4/4]

str eVision.EOCR.ReadText ( self,
eVision.EROIBW8 | None sourceImage,
int maximumNumberOfCharacters,
list[int] classes,
bool autoSegmentation )

Reads one or more rows of characters, i.e.

finds the best match between the patterns in the font and the segmented characters.

Remarks:

This operation can only be performed after a call to eVision.EOCR.FindAllChars.

Parameters
sourceImagePointer to the source image/ROI.
maximumNumberOfCharactersMaximum number of characters to be read.
classesPointer to an array of logical masks obtained by combining the values of eVision.EOCRClass, to specify to what classes the character may belong. Each mask value in the array applies to the corresponding character.
autoSegmentationBoolean indicating whether the calculation of the true threshold has to be forced (default true) or bypassed (false).

◆ Recognize() [1/2]

str eVision.EOCR.Recognize ( self,
eVision.EROIBW8 | None sourceImage,
int maximumNumberOfCharacters,
int classes )

Achieves all processing phases (blob analysis, character segmentation and pattern recognition) in a single operation.

Remarks:

This method does the same as a sequence of eVision.EOCR.BuildObjects``/``eVision.EOCR.FindAllChars``/``eVision.EOCR.ReadText,

Parameters
sourceImagePointer to the source image/ROI.
maximumNumberOfCharactersMaximum number of characters to be read.
classesPointer to an array of logical mask obtained by combining the values of eVision.EOCRClass, to specify to what classes the character may belong. Each mask value in the array applies to the corresponding character.

◆ Recognize() [2/2]

str eVision.EOCR.Recognize ( self,
eVision.EROIBW8 | None sourceImage,
int maximumNumberOfCharacters,
list[int] classes )

Achieves all processing phases (blob analysis, character segmentation and pattern recognition) in a single operation.

Remarks:

This method does the same as a sequence of eVision.EOCR.BuildObjects``/``eVision.EOCR.FindAllChars``/``eVision.EOCR.ReadText,

Parameters
sourceImagePointer to the source image/ROI.
maximumNumberOfCharactersMaximum number of characters to be read.
classesPointer to an array of logical mask obtained by combining the values of eVision.EOCRClass, to specify to what classes the character may belong. Each mask value in the array applies to the corresponding character.

◆ RemovePattern()

None eVision.EOCR.RemovePattern ( self,
int index )

Removes a given pattern from the current font.

Parameters
indexIndex of the pattern to be removed from the current font.

◆ Save() [1/2]

None eVision.EOCR.Save ( self,
eVision.ESerializer | None serializer )

Saves the eVision.EOCR object configuration.

Remarks:

The given eVision.ESerializer must have been created for writing.

Parameters
serializerThe serializer.

◆ Save() [2/2]

None eVision.EOCR.Save ( self,
str path )

Saves the eVision.EOCR object configuration.

Remarks:

The given eVision.ESerializer must have been created for writing.

Parameters
pathThe path from which to save the configuration.

◆ SetPatternClass()

None eVision.EOCR.SetPatternClass ( self,
int index,
int classIdx )

Sets the class of a given pattern in the current font.

Parameters
indexPattern number (in range 0..NumPatterns-1).
classIdxThe class.

◆ SetPatternCode()

None eVision.EOCR.SetPatternCode ( self,
int index,
int code )

Sets the character code of a given pattern in the current font.

Parameters
indexPattern number (in range 0..NumPatterns-1).
codeThe character code.

Property Documentation

◆ AverageFirstCharDistance

eVision.EOCR.AverageFirstCharDistance = property(_AverageFirstCharDistance__getter, None)
static

◆ CharSpacing

eVision.EOCR.CharSpacing = property(_CharSpacing__getter, _CharSpacing__setter)
static

Spacing that separates characters.

Remarks:

When two objects are separated by a vertical gap larger or equal than the spacing, they are considered to belong to distinct characters. Note that two objects can still be separated if their merging will be wider than eVision.EOCR.MaxCharWidth. The segmentation parameters must be the same for both learning and recognition process.

◆ CompareAspectRatio

eVision.EOCR.CompareAspectRatio = property(_CompareAspectRatio__getter, _CompareAspectRatio__setter)
static

Flag indicating whether the character aspect ratio is used to compute the recognition score.

Remarks:

When true, the character aspect ratio is used to compute the recognition score.

◆ CutLargeChars

eVision.EOCR.CutLargeChars = property(_CutLargeChars__getter, _CutLargeChars__setter)
static

Flag indicating whether the large chars cutting mode is used.

Remarks:

If true, candidate characters larger than MaxWidth are split into as many parts as required. If false, large characters are discarded. The segmentation parameters must be the same for both learning and recognition process.

◆ LineSpacingMode

eVision.EOCR.LineSpacingMode = property(_LineSpacingMode__getter, _LineSpacingMode__setter)
static

Line spacing mode to sort the character boxes into lines.

Default mode is eVision.ELineSpacingMode.Overlap.

◆ MatchingMode

eVision.EOCR.MatchingMode = property(_MatchingMode__getter, _MatchingMode__setter)
static

Matching mode to use to compare characters to the template.

Remarks:

By default, the root-mean-square error method is used. These modes are meant to be used without thresholding, that is when one of the eVision.EOCRColor.DarkOnLight and eVision.EOCRColor.LightOnDark colors are used.

◆ MaxCharHeight

eVision.EOCR.MaxCharHeight = property(_MaxCharHeight__getter, _MaxCharHeight__setter)
static

Maximum character height.

Remarks:

A character larger than the maximum width or higher than the maximum height is discarded. The segmentation parameters must be the same for both learning and recognition process.

◆ MaxCharWidth

eVision.EOCR.MaxCharWidth = property(_MaxCharWidth__getter, _MaxCharWidth__setter)
static

Maximum character width.

Remarks:

A character larger than the maximum width or higher than the maximum height is discarded. The segmentation parameters must be the same for both learning and recognition process.

◆ MinCharHeight

eVision.EOCR.MinCharHeight = property(_MinCharHeight__getter, _MinCharHeight__setter)
static

Minimum character height.

Remarks:

A character both narrower than the minimum width and lower than the minimum height is discarded by default (see eVision.EOCR.RemoveNarrowOrFlat). The segmentation parameters must be the same for both learning and recognition process.

◆ MinCharWidth

eVision.EOCR.MinCharWidth = property(_MinCharWidth__getter, _MinCharWidth__setter)
static

Minimum character width.

Remarks:

A character both narrower than the minimum width and lower than the minimum height is discarded by default (see eVision.EOCR.RemoveNarrowOrFlat). The segmentation parameters must be the same for both learning and recognition process.

◆ NoiseArea

eVision.EOCR.NoiseArea = property(_NoiseArea__getter, _NoiseArea__setter)
static

Noise area.

Remarks:

When a blob has an area smaller than this value, it is ignored. The segmentation parameters must be the same for both learning and recognition process.

◆ NumChars

eVision.EOCR.NumChars = property(_NumChars__getter, None)
static

Number of recognized characters.

◆ NumPatterns

eVision.EOCR.NumPatterns = property(_NumPatterns__getter, None)
static

Number of patterns in the current font.

◆ PatternHeight

eVision.EOCR.PatternHeight = property(_PatternHeight__getter, None)
static

Current pattern height, as set at the last eVision.EOCR.NewFont or eVision.EOCR.Load operation.

◆ PatternWidth

eVision.EOCR.PatternWidth = property(_PatternWidth__getter, None)
static

Current pattern width, as set at the last eVision.EOCR.NewFont or eVision.EOCR.Load operation.

◆ RelativeSpacing

eVision.EOCR.RelativeSpacing = property(_RelativeSpacing__getter, _RelativeSpacing__setter)
static

Relative spacing value.

Remarks:

This value is the ratio of the width of the spaces between characters and the character width. For example, characters 25 pixels wide separated by 10 pixels gaps correspond to a relative spacing of 10/25 = 0.4. The default value of this parameter is 0, corresponding to no spacing. This parameter is relevant only when the CutLargeChars mode is enabled. The segmentation parameters must be the same for both learning and recognition process.

◆ RelativeThreshold

eVision.EOCR.RelativeThreshold = property(_RelativeThreshold__getter, _RelativeThreshold__setter)
static

Relative threshold used for image segmentation.

Remarks:

The RelativeThreshold is the fraction of the image pixels that will be set below the threshold. Only used when the eVision.EOCR.Threshold property is set to eVision.EThresholdMode.Relative. The default value is 0.5.

◆ RemoveBorder

eVision.EOCR.RemoveBorder = property(_RemoveBorder__getter, _RemoveBorder__setter)
static

Flag indicating whether all blobs touching the ROI edges are automatically discarded.

Remarks:

If true, all blobs touching the ROI edges are automatically discarded. By default, this feature is turned on. The segmentation parameters must be the same for both learning and recognition process.

◆ RemoveNarrowOrFlat

eVision.EOCR.RemoveNarrowOrFlat = property(_RemoveNarrowOrFlat__getter, _RemoveNarrowOrFlat__setter)
static

Flag indicating whether the characters are discarded when either dimension falls below the minimum value.

Remarks:

If true, characters are discarded if either their width or their height is smaller than the minimum value. By default, this feature is disabled (only smaller characters in both height and width are discarded: the condition could be written NarrowAndFlat). The segmentation parameters must be the same for both learning and recognition process.

◆ SegmentationMode

eVision.EOCR.SegmentationMode = property(_SegmentationMode__getter, _SegmentationMode__setter)
static

Segmentation mode.

Remarks:

The segmentation parameters must be the same for both learning and recognition process.

◆ ShiftingMode

eVision.EOCR.ShiftingMode = property(_ShiftingMode__getter, _ShiftingMode__setter)
static

Shifting mode to use to compare characters to the template.

◆ ShiftXTolerance

eVision.EOCR.ShiftXTolerance = property(_ShiftXTolerance__getter, _ShiftXTolerance__setter)
static

Horizontal translation tolerance around the nominal position when the character positions are explicitly specified.

Remarks:

By default, no shifting is allowed (ShiftX = 0). The tolerance can be used in two ways: either each character is moved individually until the best match is found, or the set of characters is matched as a whole, until the best average error is reached. See eVision.EOCR.ShiftingMode.

◆ ShiftYTolerance

eVision.EOCR.ShiftYTolerance = property(_ShiftYTolerance__getter, _ShiftYTolerance__setter)
static

Vertical translation tolerance around the nominal position when the character positions are explicitly specified.

Remarks:

By default, no shifting is allowed (ShiftY = 0). The tolerance can be used in two ways: either each character is moved individually until the best match is found, or the set of characters is matched as a whole, until the best average error is reached. See eVision.EOCR.ShiftingMode.

◆ TextColor

eVision.EOCR.TextColor = property(_TextColor__getter, _TextColor__setter)
static

Text color.

Remarks:

The segmentation parameters must be the same for both learning and recognition process.

◆ Threshold

eVision.EOCR.Threshold = property(_Threshold__getter, _Threshold__setter)
static

Threshold mode used for image segmentation.

Remarks:

Threshold value as defined by the EThresholdMode enum. By default, the "minimum residue" mode is used to determine the threshold value. In case of an absolute threshold, the threshold value is given instead.

◆ TrueThreshold

eVision.EOCR.TrueThreshold = property(_TrueThreshold__getter, None)
static

Absolute threshold level when using a single threshold.

Remarks:

This value is valid only when the eVision.EOCR.BuildObjects or eVision.EOCR.ReadText method has been called beforehand.