eVision C++ API 26.10.0-beta.2.dev
Loading...
Searching...
No Matches
eVision::EOCR Class Reference

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

#include <eVision/EasyOcr/EasyOCR/EOCR.h>

Collaboration diagram for eVision::EOCR:

Public Member Functions

 EOCR ()
 Constructs an OCR context.
 EOCR (const eVision::EOCR &other)
 Constructs an OCR context.
virtual ~EOCR () throw ()
eVision::EOCR & operator= (const eVision::EOCR &other)
 Copies all the data from another EOCR object into the current EOCR object.
uint32_t GetPatternWidth ()
 Current pattern width, as set at the last EOCR::NewFont or EOCR::Load operation.
uint32_t GetPatternHeight ()
 Current pattern height, as set at the last EOCR::NewFont or EOCR::Load operation.
eVision::EMatchingMode GetMatchingMode () const
 Matching mode to use to compare characters to the template.
void SetMatchingMode (eVision::EMatchingMode eMatchingMode)
 Matching mode to use to compare characters to the template.
eVision::EShiftingMode GetShiftingMode () const
 Shifting mode to use to compare characters to the template.
void SetShiftingMode (eVision::EShiftingMode eShiftingMode)
 Shifting mode to use to compare characters to the template.
uint32_t GetShiftXTolerance () const
 Horizontal translation tolerance around the nominal position when the character positions are explicitly specified.
void SetShiftXTolerance (uint32_t un32ShiftXTolerance)
 Horizontal translation tolerance around the nominal position when the character positions are explicitly specified.
uint32_t GetShiftYTolerance () const
 Vertical translation tolerance around the nominal position when the character positions are explicitly specified.
void SetShiftYTolerance (uint32_t un32ShiftYTolerance)
 Vertical translation tolerance around the nominal position when the character positions are explicitly specified.
eVision::EOCRColor GetTextColor () const
 Text color.
void SetTextColor (eVision::EOCRColor eTextColor)
 Text color.
void SetThreshold (int32_t un32Threshold)
 Threshold mode used for image segmentation.
int32_t GetThreshold () const
 Threshold mode used for image segmentation.
void SetRelativeThreshold (float f32Threshold)
 Relative threshold used for image segmentation.
float GetRelativeThreshold () const
 Relative threshold used for image segmentation.
int32_t GetMinCharWidth () const
 Minimum character width.
void SetMinCharWidth (int32_t n32MinCharWidth)
 Minimum character width.
int32_t GetMaxCharWidth () const
 Maximum character width.
void SetMaxCharWidth (int32_t n32MaxCharWidth)
 Maximum character width.
int32_t GetMinCharHeight () const
 Minimum character height.
void SetMinCharHeight (int32_t n32MinCharHeight)
 Minimum character height.
int32_t GetMaxCharHeight () const
 Maximum character height.
void SetMaxCharHeight (int32_t n32MaxCharHeight)
 Maximum character height.
int32_t GetCharSpacing () const
 Spacing that separates characters.
void SetCharSpacing (int32_t n32CharSpacing)
 Spacing that separates characters.
eVision::ELineSpacingMode GetLineSpacingMode () const
 Line spacing mode to sort the character boxes into lines. Default mode is ELineSpacingMode::ELineSpacingMode_Overlap.
void SetLineSpacingMode (eVision::ELineSpacingMode eLineSpacingMode)
 Line spacing mode to sort the character boxes into lines. Default mode is ELineSpacingMode::ELineSpacingMode_Overlap.
int32_t GetNoiseArea () const
 Noise area.
void SetNoiseArea (int32_t n32NoiseArea)
 Noise area.
eVision::ESegmentationMode GetSegmentationMode () const
 Segmentation mode.
void SetSegmentationMode (eVision::ESegmentationMode eSegmentationMode)
 Segmentation mode.
bool GetCutLargeChars () const
 Flag indicating whether the large chars cutting mode is used.
void SetCutLargeChars (bool bCutLargeChars)
 Flag indicating whether the large chars cutting mode is used.
float GetRelativeSpacing () const
 Relative spacing value.
void SetRelativeSpacing (float f32RelativeSpacing)
 Relative spacing value.
bool GetRemoveNarrowOrFlat () const
 Flag indicating whether the characters are discarded when either dimension falls below the minimum value.
void SetRemoveNarrowOrFlat (bool bRemoveNarrowOrFlat)
 Flag indicating whether the characters are discarded when either dimension falls below the minimum value.
bool GetRemoveBorder () const
 Flag indicating whether all blobs touching the ROI edges are automatically discarded.
void SetRemoveBorder (bool bRemoveBorder)
 Flag indicating whether all blobs touching the ROI edges are automatically discarded.
bool GetCompareAspectRatio () const
 Flag indicating whether the character aspect ratio is used to compute the recognition score.
void SetCompareAspectRatio (bool bCompareAspectRatio)
 Flag indicating whether the character aspect ratio is used to compute the recognition score.
int32_t GetNumChars ()
 Number of recognized characters.
int32_t GetFirstCharCode (int32_t index)
 Returns the code of the pattern that matches at best a recognized character.
int32_t GetSecondCharCode (int32_t index)
 Returns the code of the pattern that matches at second best a recognized character.
float GetFirstCharDistance (int32_t index)
 Computes the degree of similarity between the best matching pattern and a recognized character.
float GetSecondCharDistance (int32_t index)
 Computes the degree of similarity between the second best matching pattern and a recognized character.
float GetConfidenceRatio (int32_t index)
 Returns the degree of confidence in the recognized character.
float GetAverageFirstCharDistance ()
int32_t CharGetOrgX (int32_t index)
 Returns the abscissa of the upper left corner of a recognized character.
int32_t CharGetOrgY (int32_t index)
 Returns the ordinate of the upper left corner of a recognized character.
int32_t CharGetDstX (int32_t index)
 Returns the abscissa of the lower right corner of a recognized character.
int32_t CharGetDstY (int32_t index)
 Returns the ordinate of the lower right corner of a recognized character.
int32_t CharGetWidth (int32_t index)
 Returns the width of a recognized character.
int32_t CharGetHeight (int32_t index)
 Returns the height of a recognized character.
void BuildObjects (eVision::EROIBW8 *sourceImage)
 Segments the source image, i.e. detects and labels the objects.
void FindAllChars (eVision::EROIBW8 *sourceImage)
 Locates the characters by filtering the objects according to their size, and grouping them if the segmentation mode is set to ESegmentationMode::ESegmentationMode_RepasteObjects.
void FindAllChars ()
 Locates the characters by filtering the objects according to their size, and grouping them if the segmentation mode is set to ESegmentationMode::ESegmentationMode_RepasteObjects.
void MatchChar (eVision::EROIBW8 *sourceImage, uint32_t classes, int32_t index, int32_t shiftX, int32_t shiftY)
 Reads a single character, i.e. finds the best match between the patterns in the font and the given character.
std::string ReadText (eVision::EROIBW8 *sourceImage, int32_t maximumNumberOfCharacters, uint32_t 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.
std::string ReadText (eVision::EROIBW8 *sourceImage, int32_t maximumNumberOfCharacters, uint32_t classes)
 Reads one or more rows of characters, i.e. finds the best match between the patterns in the font and the segmented characters.
std::string ReadText (eVision::EROIBW8 *sourceImage, int32_t maximumNumberOfCharacters, const std::vector< uint32_t > &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.
std::string ReadText (eVision::EROIBW8 *sourceImage, int32_t maximumNumberOfCharacters, const std::vector< uint32_t > &classes)
 Reads one or more rows of characters, i.e. finds the best match between the patterns in the font and the segmented characters.
std::wstring ReadTextWide (eVision::EROIBW8 *sourceImage, int32_t maximumNumberOfCharacters, uint32_t 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.
std::wstring ReadTextWide (eVision::EROIBW8 *sourceImage, int32_t maximumNumberOfCharacters, uint32_t classes)
 Reads one or more rows of characters, i.e. finds the best match between the patterns in the font and the segmented characters.
std::wstring ReadTextWide (eVision::EROIBW8 *sourceImage, int32_t maximumNumberOfCharacters, const std::vector< uint32_t > &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.
std::wstring ReadTextWide (eVision::EROIBW8 *sourceImage, int32_t maximumNumberOfCharacters, const std::vector< uint32_t > &classes)
 Reads one or more rows of characters, i.e. finds the best match between the patterns in the font and the segmented characters.
std::string Recognize (eVision::EROIBW8 *sourceImage, int32_t maximumNumberOfCharacters, uint32_t classes)
 Achieves all processing phases (blob analysis, character segmentation and pattern recognition) in a single operation.
std::string Recognize (eVision::EROIBW8 *sourceImage, int32_t maximumNumberOfCharacters, const std::vector< uint32_t > &classes)
 Achieves all processing phases (blob analysis, character segmentation and pattern recognition) in a single operation.
std::wstring RecognizeWide (eVision::EROIBW8 *sourceImage, int32_t maximumNumberOfCharacters, uint32_t classes)
 Achieves all processing phases (blob analysis, character segmentation and pattern recognition) in a single operation.
std::wstring RecognizeWide (eVision::EROIBW8 *sourceImage, int32_t maximumNumberOfCharacters, const std::vector< uint32_t > &classes)
 Achieves all processing phases (blob analysis, character segmentation and pattern recognition) in a single operation.
uint32_t HitChars (int32_t cursorX, int32_t 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 EOCR::GetNumChars is returned.
uint32_t HitChars (int32_t cursorX, int32_t 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 EOCR::GetNumChars is returned.
uint32_t HitChars (int32_t cursorX, int32_t cursorY, float zoomX, float zoomY)
 Returns the index of the character under the cursor. If the cursor is not located on any character, then EOCR::GetNumChars is returned.
uint32_t HitChars (int32_t cursorX, int32_t cursorY, float zoomX)
 Returns the index of the character under the cursor. If the cursor is not located on any character, then EOCR::GetNumChars is returned.
uint32_t HitChars (int32_t cursorX, int32_t cursorY)
 Returns the index of the character under the cursor. If the cursor is not located on any character, then EOCR::GetNumChars is returned.
bool HitChars (int32_t cursorX, int32_t cursorY, uint32_t &charIndex, 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 EOCR::GetNumChars is returned.
bool HitChars (int32_t cursorX, int32_t cursorY, uint32_t &charIndex, 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 EOCR::GetNumChars is returned.
bool HitChars (int32_t cursorX, int32_t cursorY, uint32_t &charIndex, float zoomX, float zoomY)
 Returns the index of the character under the cursor. If the cursor is not located on any character, then EOCR::GetNumChars is returned.
bool HitChars (int32_t cursorX, int32_t cursorY, uint32_t &charIndex, float zoomX)
 Returns the index of the character under the cursor. If the cursor is not located on any character, then EOCR::GetNumChars is returned.
bool HitChars (int32_t cursorX, int32_t cursorY, uint32_t &charIndex)
 Returns the index of the character under the cursor. If the cursor is not located on any character, then EOCR::GetNumChars is returned.
bool HitChar (int32_t cursorX, int32_t cursorY, uint32_t charIndex, float zoomX, float zoomY, float panX, float panY)
 Returns true if the cursor is placed over the character specified by charIndex.
bool HitChar (int32_t cursorX, int32_t cursorY, uint32_t charIndex, float zoomX, float zoomY, float panX)
 Returns true if the cursor is placed over the character specified by charIndex.
bool HitChar (int32_t cursorX, int32_t cursorY, uint32_t charIndex, float zoomX, float zoomY)
 Returns true if the cursor is placed over the character specified by charIndex.
bool HitChar (int32_t cursorX, int32_t cursorY, uint32_t charIndex, float zoomX)
 Returns true if the cursor is placed over the character specified by charIndex.
bool HitChar (int32_t cursorX, int32_t cursorY, uint32_t charIndex)
 Returns true if the cursor is placed over the character specified by charIndex.
void LearnPattern (eVision::EROIBW8 *sourceImage, uint32_t charIndex, int32_t code, uint32_t classes, bool autoSegmentation)
 Adds a new pattern to the font.
void LearnPattern (eVision::EROIBW8 *sourceImage, uint32_t charIndex, int32_t code, uint32_t classes)
 Adds a new pattern to the font.
void LearnPattern (eVision::EROIBW8 *sourceImage, uint32_t charIndex, int32_t code)
 Adds a new pattern to the font.
void LearnPatterns (eVision::EROIBW8 *sourceImage, const std::string &text, uint32_t singleClass, bool autoSegmentation)
 Adds all the patterns from the source image to the font.
void LearnPatterns (eVision::EROIBW8 *sourceImage, const std::string &text, uint32_t singleClass)
 Adds all the patterns from the source image to the font.
void LearnPatterns (eVision::EROIBW8 *sourceImage, const std::string &text)
 Adds all the patterns from the source image to the font.
void LearnPatterns (eVision::EROIBW8 *sourceImage, const std::string &text, const std::vector< uint32_t > &classes, bool autoSegmentation)
 Adds all the patterns from the source image to the font.
void LearnPatterns (eVision::EROIBW8 *sourceImage, const std::string &text, const std::vector< uint32_t > &classes)
 Adds all the patterns from the source image to the font.
void AddPatternFromImage (eVision::EROIBW8 *sourceImage, int32_t originX, int32_t originY, int32_t width, int32_t height, int32_t code, uint32_t classes)
 Adds a new pattern to the font.
void AddPatternFromImage (eVision::EROIBW8 *sourceImage, int32_t originX, int32_t originY, int32_t width, int32_t height, int32_t code)
 Adds a new pattern to the font.
void NewFont (uint32_t patternWidth, uint32_t patternHeight)
 Empties the contents of the font and sets the size of the pattern array to be used from then on.
void NewFont (uint32_t patternWidth)
 Empties the contents of the font and sets the size of the pattern array to be used from then on.
void NewFont ()
 Empties the contents of the font and sets the size of the pattern array to be used from then on.
void RemovePattern (uint32_t index)
 Removes a given pattern from the current font.
int32_t GetNumPatterns ()
 Number of patterns in the current font.
int32_t GetPatternCode (int32_t index)
 Returns the character code of a given pattern in the current font.
void SetPatternCode (int32_t index, int32_t code)
 Sets the character code of a given pattern in the current font.
uint32_t GetPatternClass (int32_t index)
 Returns the class of a given pattern in the current font.
void SetPatternClass (int32_t index, uint32_t classIdx)
 Sets the class of a given pattern in the current font.
eVision::EImageBW8 * GetPatternBitmap (int32_t index)
 Returns a pointer to an image holding the pattern of the given index. This image should not be modified.
void * GetPatternBitmapUnTyped (int32_t index)
void EmptyChars ()
 Empties the list of known characters.
void AddChar (int32_t originX, int32_t originY, int32_t endX, int32_t endY)
 Add a character coordinates to the list.
void DrawChar (eVision::EDrawAdapter *graphicContext, uint32_t charIndex, float zoomX, float zoomY, float panX, float panY)
 Draws the bounding box of a given character.
void DrawChar (eVision::EDrawAdapter *graphicContext, uint32_t charIndex, float zoomX, float zoomY, float panX)
 Draws the bounding box of a given character.
void DrawChar (eVision::EDrawAdapter *graphicContext, uint32_t charIndex, float zoomX, float zoomY)
 Draws the bounding box of a given character.
void DrawChar (eVision::EDrawAdapter *graphicContext, uint32_t charIndex, float zoomX)
 Draws the bounding box of a given character.
void DrawChar (eVision::EDrawAdapter *graphicContext, uint32_t charIndex)
 Draws the bounding box of a given character.
void DrawChar (HDC graphicContext, uint32_t charIndex, float zoomX, float zoomY, float panX, float panY)
 Draws the bounding box of a given character.
void DrawChar (HDC graphicContext, uint32_t charIndex, float zoomX, float zoomY, float panX)
 Draws the bounding box of a given character.
void DrawChar (HDC graphicContext, uint32_t charIndex, float zoomX, float zoomY)
 Draws the bounding box of a given character.
void DrawChar (HDC graphicContext, uint32_t charIndex, float zoomX)
 Draws the bounding box of a given character.
void DrawChar (HDC graphicContext, uint32_t charIndex)
 Draws the bounding box of a given character.
void DrawChar (HDC graphicContext, const eVision::ERGBColor &color, uint32_t charIndex, float zoomX, float zoomY, float panX, float panY)
 Draws the bounding box of a given character.
void DrawChar (HDC graphicContext, const eVision::ERGBColor &color, uint32_t charIndex, float zoomX, float zoomY, float panX)
 Draws the bounding box of a given character.
void DrawChar (HDC graphicContext, const eVision::ERGBColor &color, uint32_t charIndex, float zoomX, float zoomY)
 Draws the bounding box of a given character.
void DrawChar (HDC graphicContext, const eVision::ERGBColor &color, uint32_t charIndex, float zoomX)
 Draws the bounding box of a given character.
void DrawChar (HDC graphicContext, const eVision::ERGBColor &color, uint32_t charIndex)
 Draws the bounding box of a given character.
void DrawCharWithCurrentPen (HDC graphicContext, uint32_t charIndex, float zoomX, float zoomY, float panX, float panY)
 Draws the bounding box of a given character.
void DrawCharWithCurrentPen (HDC graphicContext, uint32_t charIndex, float zoomX, float zoomY, float panX)
 Draws the bounding box of a given character.
void DrawCharWithCurrentPen (HDC graphicContext, uint32_t charIndex, float zoomX, float zoomY)
 Draws the bounding box of a given character.
void DrawCharWithCurrentPen (HDC graphicContext, uint32_t charIndex, float zoomX)
 Draws the bounding box of a given character.
void DrawCharWithCurrentPen (HDC graphicContext, uint32_t charIndex)
 Draws the bounding box of a given character.
void DrawChars (eVision::EDrawAdapter *graphicContext, float zoomX, float zoomY, float panX, float panY)
 Draws the bounding boxes of all characters in the image.
void DrawChars (eVision::EDrawAdapter *graphicContext, float zoomX, float zoomY, float panX)
 Draws the bounding boxes of all characters in the image.
void DrawChars (eVision::EDrawAdapter *graphicContext, float zoomX, float zoomY)
 Draws the bounding boxes of all characters in the image.
void DrawChars (eVision::EDrawAdapter *graphicContext, float zoomX)
 Draws the bounding boxes of all characters in the image.
void DrawChars (eVision::EDrawAdapter *graphicContext)
 Draws the bounding boxes of all characters in the image.
void DrawChars (HDC graphicContext, float zoomX, float zoomY, float panX, float panY)
 Draws the bounding boxes of all characters in the image.
void DrawChars (HDC graphicContext, float zoomX, float zoomY, float panX)
 Draws the bounding boxes of all characters in the image.
void DrawChars (HDC graphicContext, float zoomX, float zoomY)
 Draws the bounding boxes of all characters in the image.
void DrawChars (HDC graphicContext, float zoomX)
 Draws the bounding boxes of all characters in the image.
void DrawChars (HDC graphicContext)
 Draws the bounding boxes of all characters in the image.
void DrawChars (HDC graphicContext, const eVision::ERGBColor &color, float zoomX, float zoomY, float panX, float panY)
 Draws the bounding boxes of all characters in the image.
void DrawChars (HDC graphicContext, const eVision::ERGBColor &color, float zoomX, float zoomY, float panX)
 Draws the bounding boxes of all characters in the image.
void DrawChars (HDC graphicContext, const eVision::ERGBColor &color, float zoomX, float zoomY)
 Draws the bounding boxes of all characters in the image.
void DrawChars (HDC graphicContext, const eVision::ERGBColor &color, float zoomX)
 Draws the bounding boxes of all characters in the image.
void DrawChars (HDC graphicContext, const eVision::ERGBColor &color)
 Draws the bounding boxes of all characters in the image.
void DrawCharsWithCurrentPen (HDC graphicContext, float zoomX, float zoomY, float panX, float panY)
 Draws the bounding boxes of all characters in the image.
void DrawCharsWithCurrentPen (HDC graphicContext, float zoomX, float zoomY, float panX)
 Draws the bounding boxes of all characters in the image.
void DrawCharsWithCurrentPen (HDC graphicContext, float zoomX, float zoomY)
 Draws the bounding boxes of all characters in the image.
void DrawCharsWithCurrentPen (HDC graphicContext, float zoomX)
 Draws the bounding boxes of all characters in the image.
void DrawCharsWithCurrentPen (HDC graphicContext)
 Draws the bounding boxes of all characters in the image.
void DrawObjects (eVision::EDrawAdapter *graphicContext, eVision::ESelectionFlag selectionFlag, float zoomX, float zoomY, float panX, float panY)
 Draws segmented objects.
void DrawObjects (eVision::EDrawAdapter *graphicContext, eVision::ESelectionFlag selectionFlag, float zoomX, float zoomY, float panX)
 Draws segmented objects.
void DrawObjects (eVision::EDrawAdapter *graphicContext, eVision::ESelectionFlag selectionFlag, float zoomX, float zoomY)
 Draws segmented objects.
void DrawObjects (eVision::EDrawAdapter *graphicContext, eVision::ESelectionFlag selectionFlag, float zoomX)
 Draws segmented objects.
void DrawObjects (eVision::EDrawAdapter *graphicContext, eVision::ESelectionFlag selectionFlag)
 Draws segmented objects.
void DrawObjects (eVision::EDrawAdapter *graphicContext)
 Draws segmented objects.
uint32_t GetTrueThreshold () const
 Absolute threshold level when using a single threshold.
void Load (eVision::ESerializer *serializer)
 Loads the EOCR object configuration.
void Load (const std::string &path)
 Loads the EOCR object configuration.
void Save (eVision::ESerializer *serializer)
 Saves the EOCR object configuration.
void Save (const std::string &path)
 Saves the EOCR object configuration.
void Dump ()
 EOCR (CppWrapperInternal::InternalConstructor)

Public Attributes

CppWrapperInternal::WrappedClass wrappedClass_

Detailed Description

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

License(s): EasyOCR or EasyOCR2

Constructor & Destructor Documentation

◆ EOCR() [1/3]

eVision::EOCR::EOCR ( )

Constructs an OCR context.

By default, the Threshold property is set to 128.

◆ EOCR() [2/3]

eVision::EOCR::EOCR ( const eVision::EOCR & other)

Constructs an OCR context.

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

By default, the Threshold property is set to 128.

◆ ~EOCR()

eVision::EOCR::~EOCR ( )
throw ( )
virtual

◆ EOCR() [3/3]

eVision::EOCR::EOCR ( CppWrapperInternal::InternalConstructor )

Member Function Documentation

◆ AddChar()

void eVision::EOCR::AddChar ( int32_t originX,
int32_t originY,
int32_t endX,
int32_t endY )

Add a character coordinates to the list.

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.

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 EOCR::EmptyChars.

◆ AddPatternFromImage() [1/2]

void eVision::EOCR::AddPatternFromImage ( eVision::EROIBW8 * sourceImage,
int32_t originX,
int32_t originY,
int32_t width,
int32_t height,
int32_t code )

Adds a new pattern to the font.

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.

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

◆ AddPatternFromImage() [2/2]

void eVision::EOCR::AddPatternFromImage ( eVision::EROIBW8 * sourceImage,
int32_t originX,
int32_t originY,
int32_t width,
int32_t height,
int32_t code,
uint32_t classes )

Adds a new pattern to the font.

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 EOCRClass.

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

◆ BuildObjects()

void eVision::EOCR::BuildObjects ( eVision::EROIBW8 * sourceImage)

Segments the source image, i.e. detects and labels the objects.

Parameters
sourceImagePointer to the source image/ROI.

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

◆ CharGetDstX()

int32_t eVision::EOCR::CharGetDstX ( int32_t index)

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

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

◆ CharGetDstY()

int32_t eVision::EOCR::CharGetDstY ( int32_t index)

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

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

◆ CharGetHeight()

int32_t eVision::EOCR::CharGetHeight ( int32_t index)

Returns the height of a recognized character.

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

◆ CharGetOrgX()

int32_t eVision::EOCR::CharGetOrgX ( int32_t index)

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

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

◆ CharGetOrgY()

int32_t eVision::EOCR::CharGetOrgY ( int32_t index)

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

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

◆ CharGetWidth()

int32_t eVision::EOCR::CharGetWidth ( int32_t index)

Returns the width of a recognized character.

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

◆ DrawChar() [1/15]

void eVision::EOCR::DrawChar ( eVision::EDrawAdapter * graphicContext,
uint32_t charIndex )

Draws the bounding box of a given character.

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

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

◆ DrawChar() [2/15]

void eVision::EOCR::DrawChar ( eVision::EDrawAdapter * graphicContext,
uint32_t charIndex,
float zoomX )

Draws the bounding box of a given character.

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.

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

◆ DrawChar() [3/15]

void eVision::EOCR::DrawChar ( eVision::EDrawAdapter * graphicContext,
uint32_t charIndex,
float zoomX,
float zoomY )

Draws the bounding box of a given character.

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.

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

◆ DrawChar() [4/15]

void eVision::EOCR::DrawChar ( eVision::EDrawAdapter * graphicContext,
uint32_t charIndex,
float zoomX,
float zoomY,
float panX )

Draws the bounding box of a given character.

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.

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

◆ DrawChar() [5/15]

void eVision::EOCR::DrawChar ( eVision::EDrawAdapter * graphicContext,
uint32_t charIndex,
float zoomX,
float zoomY,
float panX,
float panY )

Draws the bounding box of a given character.

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.

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

◆ DrawChar() [6/15]

void eVision::EOCR::DrawChar ( HDC graphicContext,
const eVision::ERGBColor & color,
uint32_t charIndex )

Draws the bounding box of a given character.

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

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

Deprecated

Use the overload taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ DrawChar() [7/15]

void eVision::EOCR::DrawChar ( HDC graphicContext,
const eVision::ERGBColor & color,
uint32_t charIndex,
float zoomX )

Draws the bounding box of a given character.

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

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

Deprecated

Use the overload taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ DrawChar() [8/15]

void eVision::EOCR::DrawChar ( HDC graphicContext,
const eVision::ERGBColor & color,
uint32_t charIndex,
float zoomX,
float zoomY )

Draws the bounding box of a given character.

Parameters
graphicContextHandle of the device context on which to draw.
colorThe color in which to draw the overlay.
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.

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

Deprecated

Use the overload taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ DrawChar() [9/15]

void eVision::EOCR::DrawChar ( HDC graphicContext,
const eVision::ERGBColor & color,
uint32_t charIndex,
float zoomX,
float zoomY,
float panX )

Draws the bounding box of a given character.

Parameters
graphicContextHandle of the device context on which to draw.
colorThe color in which to draw the overlay.
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.

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

Deprecated

Use the overload taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ DrawChar() [10/15]

void eVision::EOCR::DrawChar ( HDC graphicContext,
const eVision::ERGBColor & color,
uint32_t charIndex,
float zoomX,
float zoomY,
float panX,
float panY )

Draws the bounding box of a given character.

Parameters
graphicContextHandle of the device context on which to draw.
colorThe color in which to draw the overlay.
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.

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

Deprecated

Use the overload taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ DrawChar() [11/15]

void eVision::EOCR::DrawChar ( HDC graphicContext,
uint32_t charIndex )

Draws the bounding box of a given character.

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

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

Deprecated

Use the overload taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ DrawChar() [12/15]

void eVision::EOCR::DrawChar ( HDC graphicContext,
uint32_t charIndex,
float zoomX )

Draws the bounding box of a given character.

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.

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

Deprecated

Use the overload taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ DrawChar() [13/15]

void eVision::EOCR::DrawChar ( HDC graphicContext,
uint32_t charIndex,
float zoomX,
float zoomY )

Draws the bounding box of a given character.

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.

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

Deprecated

Use the overload taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ DrawChar() [14/15]

void eVision::EOCR::DrawChar ( HDC graphicContext,
uint32_t charIndex,
float zoomX,
float zoomY,
float panX )

Draws the bounding box of a given character.

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.

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

Deprecated

Use the overload taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ DrawChar() [15/15]

void eVision::EOCR::DrawChar ( HDC graphicContext,
uint32_t charIndex,
float zoomX,
float zoomY,
float panX,
float panY )

Draws the bounding box of a given character.

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.

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

Deprecated

Use the overload taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ DrawChars() [1/15]

void eVision::EOCR::DrawChars ( eVision::EDrawAdapter * graphicContext)

Draws the bounding boxes of all characters in the image.

Parameters
graphicContextHandle of the device context on which to draw.

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 EOCR::DrawChar method instead).

◆ DrawChars() [2/15]

void eVision::EOCR::DrawChars ( eVision::EDrawAdapter * graphicContext,
float zoomX )

Draws the bounding boxes of all characters in the image.

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

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 EOCR::DrawChar method instead).

◆ DrawChars() [3/15]

void eVision::EOCR::DrawChars ( eVision::EDrawAdapter * graphicContext,
float zoomX,
float zoomY )

Draws the bounding boxes of all characters in the image.

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.

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 EOCR::DrawChar method instead).

◆ DrawChars() [4/15]

void eVision::EOCR::DrawChars ( eVision::EDrawAdapter * graphicContext,
float zoomX,
float zoomY,
float panX )

Draws the bounding boxes of all characters in the image.

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.

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 EOCR::DrawChar method instead).

◆ DrawChars() [5/15]

void eVision::EOCR::DrawChars ( eVision::EDrawAdapter * graphicContext,
float zoomX,
float zoomY,
float panX,
float panY )

Draws the bounding boxes of all characters in the image.

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.

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 EOCR::DrawChar method instead).

◆ DrawChars() [6/15]

void eVision::EOCR::DrawChars ( HDC graphicContext)

Draws the bounding boxes of all characters in the image.

Parameters
graphicContextHandle of the device context on which to draw.

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 EOCR::DrawChar method instead).

Deprecated

Use the overload taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ DrawChars() [7/15]

void eVision::EOCR::DrawChars ( HDC graphicContext,
const eVision::ERGBColor & color )

Draws the bounding boxes of all characters in the image.

Parameters
graphicContextHandle of the device context on which to draw.
colorThe color in which to draw the overlay.

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 EOCR::DrawChar method instead).

Deprecated

Use the overload taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ DrawChars() [8/15]

void eVision::EOCR::DrawChars ( HDC graphicContext,
const eVision::ERGBColor & color,
float zoomX )

Draws the bounding boxes of all characters in the image.

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

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 EOCR::DrawChar method instead).

Deprecated

Use the overload taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ DrawChars() [9/15]

void eVision::EOCR::DrawChars ( HDC graphicContext,
const eVision::ERGBColor & color,
float zoomX,
float zoomY )

Draws the bounding boxes of all characters in the image.

Parameters
graphicContextHandle of the device context on which to draw.
colorThe color in which to draw the overlay.
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.

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 EOCR::DrawChar method instead).

Deprecated

Use the overload taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ DrawChars() [10/15]

void eVision::EOCR::DrawChars ( HDC graphicContext,
const eVision::ERGBColor & color,
float zoomX,
float zoomY,
float panX )

Draws the bounding boxes of all characters in the image.

Parameters
graphicContextHandle of the device context on which to draw.
colorThe color in which to draw the overlay.
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.

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 EOCR::DrawChar method instead).

Deprecated

Use the overload taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ DrawChars() [11/15]

void eVision::EOCR::DrawChars ( HDC graphicContext,
const eVision::ERGBColor & color,
float zoomX,
float zoomY,
float panX,
float panY )

Draws the bounding boxes of all characters in the image.

Parameters
graphicContextHandle of the device context on which to draw.
colorThe color in which to draw the overlay.
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.

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 EOCR::DrawChar method instead).

Deprecated

Use the overload taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ DrawChars() [12/15]

void eVision::EOCR::DrawChars ( HDC graphicContext,
float zoomX )

Draws the bounding boxes of all characters in the image.

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

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 EOCR::DrawChar method instead).

Deprecated

Use the overload taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ DrawChars() [13/15]

void eVision::EOCR::DrawChars ( HDC graphicContext,
float zoomX,
float zoomY )

Draws the bounding boxes of all characters in the image.

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.

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 EOCR::DrawChar method instead).

Deprecated

Use the overload taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ DrawChars() [14/15]

void eVision::EOCR::DrawChars ( HDC graphicContext,
float zoomX,
float zoomY,
float panX )

Draws the bounding boxes of all characters in the image.

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.

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 EOCR::DrawChar method instead).

Deprecated

Use the overload taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ DrawChars() [15/15]

void eVision::EOCR::DrawChars ( HDC graphicContext,
float zoomX,
float zoomY,
float panX,
float panY )

Draws the bounding boxes of all characters in the image.

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.

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 EOCR::DrawChar method instead).

Deprecated

Use the overload taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ DrawCharsWithCurrentPen() [1/5]

void eVision::EOCR::DrawCharsWithCurrentPen ( HDC graphicContext)

Draws the bounding boxes of all characters in the image.

Parameters
graphicContextHandle of the device context on which to draw.

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 EOCR::DrawChar method instead).

Deprecated

Use the overload of EOCR::DrawChars taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ DrawCharsWithCurrentPen() [2/5]

void eVision::EOCR::DrawCharsWithCurrentPen ( HDC graphicContext,
float zoomX )

Draws the bounding boxes of all characters in the image.

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

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 EOCR::DrawChar method instead).

Deprecated

Use the overload of EOCR::DrawChars taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ DrawCharsWithCurrentPen() [3/5]

void eVision::EOCR::DrawCharsWithCurrentPen ( HDC graphicContext,
float zoomX,
float zoomY )

Draws the bounding boxes of all characters in the image.

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.

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 EOCR::DrawChar method instead).

Deprecated

Use the overload of EOCR::DrawChars taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ DrawCharsWithCurrentPen() [4/5]

void eVision::EOCR::DrawCharsWithCurrentPen ( HDC graphicContext,
float zoomX,
float zoomY,
float panX )

Draws the bounding boxes of all characters in the image.

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.

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 EOCR::DrawChar method instead).

Deprecated

Use the overload of EOCR::DrawChars taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ DrawCharsWithCurrentPen() [5/5]

void eVision::EOCR::DrawCharsWithCurrentPen ( HDC graphicContext,
float zoomX,
float zoomY,
float panX,
float panY )

Draws the bounding boxes of all characters in the image.

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.

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 EOCR::DrawChar method instead).

Deprecated

Use the overload of EOCR::DrawChars taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ DrawCharWithCurrentPen() [1/5]

void eVision::EOCR::DrawCharWithCurrentPen ( HDC graphicContext,
uint32_t charIndex )

Draws the bounding box of a given character.

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

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

Deprecated

Use the overload of EOCR::DrawChar taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ DrawCharWithCurrentPen() [2/5]

void eVision::EOCR::DrawCharWithCurrentPen ( HDC graphicContext,
uint32_t charIndex,
float zoomX )

Draws the bounding box of a given character.

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.

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

Deprecated

Use the overload of EOCR::DrawChar taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ DrawCharWithCurrentPen() [3/5]

void eVision::EOCR::DrawCharWithCurrentPen ( HDC graphicContext,
uint32_t charIndex,
float zoomX,
float zoomY )

Draws the bounding box of a given character.

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.

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

Deprecated

Use the overload of EOCR::DrawChar taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ DrawCharWithCurrentPen() [4/5]

void eVision::EOCR::DrawCharWithCurrentPen ( HDC graphicContext,
uint32_t charIndex,
float zoomX,
float zoomY,
float panX )

Draws the bounding box of a given character.

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.

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

Deprecated

Use the overload of EOCR::DrawChar taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ DrawCharWithCurrentPen() [5/5]

void eVision::EOCR::DrawCharWithCurrentPen ( HDC graphicContext,
uint32_t charIndex,
float zoomX,
float zoomY,
float panX,
float panY )

Draws the bounding box of a given character.

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.

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

Deprecated

Use the overload of EOCR::DrawChar taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ DrawObjects() [1/6]

void eVision::EOCR::DrawObjects ( eVision::EDrawAdapter * graphicContext)

Draws segmented objects.

Parameters
graphicContextHandle of the device context on which to draw.

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.

◆ DrawObjects() [2/6]

void eVision::EOCR::DrawObjects ( eVision::EDrawAdapter * graphicContext,
eVision::ESelectionFlag selectionFlag )

Draws segmented objects.

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

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.

◆ DrawObjects() [3/6]

void eVision::EOCR::DrawObjects ( eVision::EDrawAdapter * graphicContext,
eVision::ESelectionFlag selectionFlag,
float zoomX )

Draws segmented objects.

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

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.

◆ DrawObjects() [4/6]

void eVision::EOCR::DrawObjects ( eVision::EDrawAdapter * graphicContext,
eVision::ESelectionFlag selectionFlag,
float zoomX,
float zoomY )

Draws segmented objects.

Parameters
graphicContextHandle of the device context on which to draw.
selectionFlagTells how the selected/unselected state of the objects is handled, as defined by 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.

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.

◆ DrawObjects() [5/6]

void eVision::EOCR::DrawObjects ( eVision::EDrawAdapter * graphicContext,
eVision::ESelectionFlag selectionFlag,
float zoomX,
float zoomY,
float panX )

Draws segmented objects.

Parameters
graphicContextHandle of the device context on which to draw.
selectionFlagTells how the selected/unselected state of the objects is handled, as defined by 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.

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.

◆ DrawObjects() [6/6]

void eVision::EOCR::DrawObjects ( eVision::EDrawAdapter * graphicContext,
eVision::ESelectionFlag selectionFlag,
float zoomX,
float zoomY,
float panX,
float panY )

Draws segmented objects.

Parameters
graphicContextHandle of the device context on which to draw.
selectionFlagTells how the selected/unselected state of the objects is handled, as defined by 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.

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.

◆ Dump()

void eVision::EOCR::Dump ( )

◆ EmptyChars()

void eVision::EOCR::EmptyChars ( )

Empties the list of known characters.

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

◆ FindAllChars() [1/2]

void eVision::EOCR::FindAllChars ( )

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

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

◆ FindAllChars() [2/2]

void eVision::EOCR::FindAllChars ( eVision::EROIBW8 * sourceImage)

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

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

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

◆ GetAverageFirstCharDistance()

float eVision::EOCR::GetAverageFirstCharDistance ( )

◆ GetCharSpacing()

int32_t eVision::EOCR::GetCharSpacing ( ) const

Spacing that separates characters.

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 EOCR::GetMaxCharWidth. The segmentation parameters must be the same for both learning and recognition process.

◆ GetCompareAspectRatio()

bool eVision::EOCR::GetCompareAspectRatio ( ) const

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

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

◆ GetConfidenceRatio()

float eVision::EOCR::GetConfidenceRatio ( int32_t index)

Returns the degree of confidence in the recognized character.

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

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 EOCR::GetFirstCharDistance and EOCR::GetSecondCharDistance).

◆ GetCutLargeChars()

bool eVision::EOCR::GetCutLargeChars ( ) const

Flag indicating whether the large chars cutting mode is used.

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.

◆ GetFirstCharCode()

int32_t eVision::EOCR::GetFirstCharCode ( int32_t 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 ( int32_t index)

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

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

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

◆ GetLineSpacingMode()

eVision::ELineSpacingMode eVision::EOCR::GetLineSpacingMode ( ) const

Line spacing mode to sort the character boxes into lines. Default mode is ELineSpacingMode::ELineSpacingMode_Overlap.

◆ GetMatchingMode()

eVision::EMatchingMode eVision::EOCR::GetMatchingMode ( ) const

Matching mode to use to compare characters to the template.

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 EOCRColor::EOCRColor_DarkOnLight and EOCRColor::EOCRColor_LightOnDark colors are used.

◆ GetMaxCharHeight()

int32_t eVision::EOCR::GetMaxCharHeight ( ) const

Maximum character height.

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.

◆ GetMaxCharWidth()

int32_t eVision::EOCR::GetMaxCharWidth ( ) const

Maximum character width.

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.

◆ GetMinCharHeight()

int32_t eVision::EOCR::GetMinCharHeight ( ) const

Minimum character height.

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

◆ GetMinCharWidth()

int32_t eVision::EOCR::GetMinCharWidth ( ) const

Minimum character width.

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

◆ GetNoiseArea()

int32_t eVision::EOCR::GetNoiseArea ( ) const

Noise area.

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.

◆ GetNumChars()

int32_t eVision::EOCR::GetNumChars ( )

Number of recognized characters.

◆ GetNumPatterns()

int32_t eVision::EOCR::GetNumPatterns ( )

Number of patterns in the current font.

◆ GetPatternBitmap()

eVision::EImageBW8 * eVision::EOCR::GetPatternBitmap ( int32_t index)

Returns a pointer to an image holding the pattern of the given index. This image should not be modified.

Parameters
index

Pattern number (in range 0..GetNumPatterns() -1).

◆ GetPatternBitmapUnTyped()

void * eVision::EOCR::GetPatternBitmapUnTyped ( int32_t index)

◆ GetPatternClass()

uint32_t eVision::EOCR::GetPatternClass ( int32_t index)

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

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

◆ GetPatternCode()

int32_t eVision::EOCR::GetPatternCode ( int32_t index)

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

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

◆ GetPatternHeight()

uint32_t eVision::EOCR::GetPatternHeight ( )

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

◆ GetPatternWidth()

uint32_t eVision::EOCR::GetPatternWidth ( )

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

◆ GetRelativeSpacing()

float eVision::EOCR::GetRelativeSpacing ( ) const

Relative spacing value.

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.

◆ GetRelativeThreshold()

float eVision::EOCR::GetRelativeThreshold ( ) const

Relative threshold used for image segmentation.

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

◆ GetRemoveBorder()

bool eVision::EOCR::GetRemoveBorder ( ) const

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

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.

◆ GetRemoveNarrowOrFlat()

bool eVision::EOCR::GetRemoveNarrowOrFlat ( ) const

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

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.

◆ GetSecondCharCode()

int32_t eVision::EOCR::GetSecondCharCode ( int32_t 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 ( int32_t index)

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

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

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

◆ GetSegmentationMode()

eVision::ESegmentationMode eVision::EOCR::GetSegmentationMode ( ) const

Segmentation mode.

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

◆ GetShiftingMode()

eVision::EShiftingMode eVision::EOCR::GetShiftingMode ( ) const

Shifting mode to use to compare characters to the template.

◆ GetShiftXTolerance()

uint32_t eVision::EOCR::GetShiftXTolerance ( ) const

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

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 EOCR::GetShiftingMode.

◆ GetShiftYTolerance()

uint32_t eVision::EOCR::GetShiftYTolerance ( ) const

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

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 EOCR::GetShiftingMode.

◆ GetTextColor()

eVision::EOCRColor eVision::EOCR::GetTextColor ( ) const

Text color.

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

◆ GetThreshold()

int32_t eVision::EOCR::GetThreshold ( ) const

Threshold mode used for image segmentation.

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.

◆ GetTrueThreshold()

uint32_t eVision::EOCR::GetTrueThreshold ( ) const

Absolute threshold level when using a single threshold.

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

◆ HitChar() [1/5]

bool eVision::EOCR::HitChar ( int32_t cursorX,
int32_t cursorY,
uint32_t charIndex )

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

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

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

◆ HitChar() [2/5]

bool eVision::EOCR::HitChar ( int32_t cursorX,
int32_t cursorY,
uint32_t charIndex,
float zoomX )

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

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

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

◆ HitChar() [3/5]

bool eVision::EOCR::HitChar ( int32_t cursorX,
int32_t cursorY,
uint32_t charIndex,
float zoomX,
float zoomY )

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

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.

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

◆ HitChar() [4/5]

bool eVision::EOCR::HitChar ( int32_t cursorX,
int32_t cursorY,
uint32_t charIndex,
float zoomX,
float zoomY,
float panX )

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

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.

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

◆ HitChar() [5/5]

bool eVision::EOCR::HitChar ( int32_t cursorX,
int32_t cursorY,
uint32_t charIndex,
float zoomX,
float zoomY,
float panX,
float panY )

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

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.

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

◆ HitChars() [1/10]

uint32_t eVision::EOCR::HitChars ( int32_t cursorX,
int32_t cursorY )

Returns the index of the character under the cursor. If the cursor is not located on any character, then EOCR::GetNumChars is returned.

Parameters
cursorXCurrent cursor coordinates.
cursorYCurrent cursor coordinates.

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

◆ HitChars() [2/10]

uint32_t eVision::EOCR::HitChars ( int32_t cursorX,
int32_t cursorY,
float zoomX )

Returns the index of the character under the cursor. If the cursor is not located on any character, then EOCR::GetNumChars is returned.

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

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

◆ HitChars() [3/10]

uint32_t eVision::EOCR::HitChars ( int32_t cursorX,
int32_t cursorY,
float zoomX,
float zoomY )

Returns the index of the character under the cursor. If the cursor is not located on any character, then EOCR::GetNumChars is returned.

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.

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

◆ HitChars() [4/10]

uint32_t eVision::EOCR::HitChars ( int32_t cursorX,
int32_t 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 EOCR::GetNumChars is returned.

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.

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

◆ HitChars() [5/10]

uint32_t eVision::EOCR::HitChars ( int32_t cursorX,
int32_t 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 EOCR::GetNumChars is returned.

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.

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

◆ HitChars() [6/10]

bool eVision::EOCR::HitChars ( int32_t cursorX,
int32_t cursorY,
uint32_t & charIndex )

Returns the index of the character under the cursor. If the cursor is not located on any character, then EOCR::GetNumChars is returned.

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

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

Deprecated
Deprecated in version 24.2. Scheduled to be removed in version 27.6.

◆ HitChars() [7/10]

bool eVision::EOCR::HitChars ( int32_t cursorX,
int32_t cursorY,
uint32_t & charIndex,
float zoomX )

Returns the index of the character under the cursor. If the cursor is not located on any character, then EOCR::GetNumChars is returned.

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

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

Deprecated
Deprecated in version 24.2. Scheduled to be removed in version 27.6.

◆ HitChars() [8/10]

bool eVision::EOCR::HitChars ( int32_t cursorX,
int32_t cursorY,
uint32_t & charIndex,
float zoomX,
float zoomY )

Returns the index of the character under the cursor. If the cursor is not located on any character, then EOCR::GetNumChars is returned.

Parameters
cursorXCurrent cursor coordinates.
cursorYCurrent cursor coordinates.
charIndexIndex of the character 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.

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

Deprecated
Deprecated in version 24.2. Scheduled to be removed in version 27.6.

◆ HitChars() [9/10]

bool eVision::EOCR::HitChars ( int32_t cursorX,
int32_t cursorY,
uint32_t & charIndex,
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 EOCR::GetNumChars is returned.

Parameters
cursorXCurrent cursor coordinates.
cursorYCurrent cursor coordinates.
charIndexIndex of the character 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.

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

Deprecated
Deprecated in version 24.2. Scheduled to be removed in version 27.6.

◆ HitChars() [10/10]

bool eVision::EOCR::HitChars ( int32_t cursorX,
int32_t cursorY,
uint32_t & charIndex,
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 EOCR::GetNumChars is returned.

Parameters
cursorXCurrent cursor coordinates.
cursorYCurrent cursor coordinates.
charIndexIndex of the character 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.

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

Deprecated
Deprecated in version 24.2. Scheduled to be removed in version 27.6.

◆ LearnPattern() [1/3]

void eVision::EOCR::LearnPattern ( eVision::EROIBW8 * sourceImage,
uint32_t charIndex,
int32_t code )

Adds a new pattern to the font.

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

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

◆ LearnPattern() [2/3]

void eVision::EOCR::LearnPattern ( eVision::EROIBW8 * sourceImage,
uint32_t charIndex,
int32_t code,
uint32_t classes )

Adds a new pattern to the font.

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 EOCRClass.

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

◆ LearnPattern() [3/3]

void eVision::EOCR::LearnPattern ( eVision::EROIBW8 * sourceImage,
uint32_t charIndex,
int32_t code,
uint32_t classes,
bool autoSegmentation )

Adds a new pattern to the font.

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 EOCRClass.
autoSegmentationBoolean indicating whether the calculation of the true threshold has to be forced (default true) or bypassed (false).

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

◆ LearnPatterns() [1/5]

void eVision::EOCR::LearnPatterns ( eVision::EROIBW8 * sourceImage,
const std::string & text )

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

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

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

◆ LearnPatterns() [2/5]

void eVision::EOCR::LearnPatterns ( eVision::EROIBW8 * sourceImage,
const std::string & text,
const std::vector< uint32_t > & classes )

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

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.

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

◆ LearnPatterns() [3/5]

void eVision::EOCR::LearnPatterns ( eVision::EROIBW8 * sourceImage,
const std::string & text,
const std::vector< uint32_t > & classes,
bool autoSegmentation )

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

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).

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

◆ LearnPatterns() [4/5]

void eVision::EOCR::LearnPatterns ( eVision::EROIBW8 * sourceImage,
const std::string & text,
uint32_t singleClass )

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

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.

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

◆ LearnPatterns() [5/5]

void eVision::EOCR::LearnPatterns ( eVision::EROIBW8 * sourceImage,
const std::string & text,
uint32_t singleClass,
bool autoSegmentation )

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

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).

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

◆ Load() [1/2]

void eVision::EOCR::Load ( const std::string & path)

Loads the EOCR object configuration.

Parameters
pathThe path from which to load the configuration.

The given ESerializer must have been created for reading.

◆ Load() [2/2]

void eVision::EOCR::Load ( eVision::ESerializer * serializer)

Loads the EOCR object configuration.

Parameters
serializerThe serializer.

The given ESerializer must have been created for reading.

◆ MatchChar()

void eVision::EOCR::MatchChar ( eVision::EROIBW8 * sourceImage,
uint32_t classes,
int32_t index,
int32_t shiftX,
int32_t shiftY )

Reads a single character, i.e. finds the best match between the patterns in the font and the given character.

Parameters
sourceImagePointer to the source image/ROI.
classesLogical mask obtained by combining the values of 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.

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

◆ NewFont() [1/3]

void eVision::EOCR::NewFont ( )

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

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

◆ NewFont() [2/3]

void eVision::EOCR::NewFont ( uint32_t patternWidth)

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

Parameters
patternWidthWidth of the normalized pattern representation, in pixels.

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

◆ NewFont() [3/3]

void eVision::EOCR::NewFont ( uint32_t patternWidth,
uint32_t patternHeight )

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

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

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

◆ operator=()

eVision::EOCR & eVision::EOCR::operator= ( const eVision::EOCR & other)

Copies all the data from another EOCR object into the current EOCR object.

Parameters
otherEOCR object to be copied

◆ ReadText() [1/4]

std::string eVision::EOCR::ReadText ( eVision::EROIBW8 * sourceImage,
int32_t maximumNumberOfCharacters,
const std::vector< uint32_t > & classes )

Reads one or more rows of characters, i.e. finds the best match between the patterns in the font and the segmented characters.

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 EOCRClass, to specify to what classes the character may belong. Each mask value in the array applies to the corresponding character.

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

◆ ReadText() [2/4]

std::string eVision::EOCR::ReadText ( eVision::EROIBW8 * sourceImage,
int32_t maximumNumberOfCharacters,
const std::vector< uint32_t > & 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.

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 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).

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

◆ ReadText() [3/4]

std::string eVision::EOCR::ReadText ( eVision::EROIBW8 * sourceImage,
int32_t maximumNumberOfCharacters,
uint32_t classes )

Reads one or more rows of characters, i.e. finds the best match between the patterns in the font and the segmented characters.

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 EOCRClass, to specify to what classes the character may belong. Each mask value in the array applies to the corresponding character.

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

◆ ReadText() [4/4]

std::string eVision::EOCR::ReadText ( eVision::EROIBW8 * sourceImage,
int32_t maximumNumberOfCharacters,
uint32_t 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.

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 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).

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

◆ ReadTextWide() [1/4]

std::wstring eVision::EOCR::ReadTextWide ( eVision::EROIBW8 * sourceImage,
int32_t maximumNumberOfCharacters,
const std::vector< uint32_t > & classes )

Reads one or more rows of characters, i.e. finds the best match between the patterns in the font and the segmented characters.

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 EOCRClass, to specify to what classes the character may belong. Each mask value in the array applies to the corresponding character.

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

Deprecated

Use the EOCR::ReadText method instead as it performs similarly to this method, except it returns UTF-8 instead of wide characters.

Deprecated in version 23.8. Scheduled to be removed in version 27.6.

◆ ReadTextWide() [2/4]

std::wstring eVision::EOCR::ReadTextWide ( eVision::EROIBW8 * sourceImage,
int32_t maximumNumberOfCharacters,
const std::vector< uint32_t > & 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.

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 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).

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

Deprecated

Use the EOCR::ReadText method instead as it performs similarly to this method, except it returns UTF-8 instead of wide characters.

Deprecated in version 23.8. Scheduled to be removed in version 27.6.

◆ ReadTextWide() [3/4]

std::wstring eVision::EOCR::ReadTextWide ( eVision::EROIBW8 * sourceImage,
int32_t maximumNumberOfCharacters,
uint32_t classes )

Reads one or more rows of characters, i.e. finds the best match between the patterns in the font and the segmented characters.

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 EOCRClass, to specify to what classes the character may belong. Each mask value in the array applies to the corresponding character.

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

Deprecated

Use the EOCR::ReadText method instead as it performs similarly to this method, except it returns UTF-8 instead of wide characters.

Deprecated in version 23.8. Scheduled to be removed in version 27.6.

◆ ReadTextWide() [4/4]

std::wstring eVision::EOCR::ReadTextWide ( eVision::EROIBW8 * sourceImage,
int32_t maximumNumberOfCharacters,
uint32_t 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.

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 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).

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

Deprecated

Use the EOCR::ReadText method instead as it performs similarly to this method, except it returns UTF-8 instead of wide characters.

Deprecated in version 23.8. Scheduled to be removed in version 27.6.

◆ Recognize() [1/2]

std::string eVision::EOCR::Recognize ( eVision::EROIBW8 * sourceImage,
int32_t maximumNumberOfCharacters,
const std::vector< uint32_t > & classes )

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

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 EOCRClass, to specify to what classes the character may belong. Each mask value in the array applies to the corresponding character.

This method does the same as a sequence of EOCR::BuildObjects/EOCR::FindAllChars/EOCR::ReadText,

◆ Recognize() [2/2]

std::string eVision::EOCR::Recognize ( eVision::EROIBW8 * sourceImage,
int32_t maximumNumberOfCharacters,
uint32_t classes )

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

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 EOCRClass, to specify to what classes the character may belong. Each mask value in the array applies to the corresponding character.

This method does the same as a sequence of EOCR::BuildObjects/EOCR::FindAllChars/EOCR::ReadText,

◆ RecognizeWide() [1/2]

std::wstring eVision::EOCR::RecognizeWide ( eVision::EROIBW8 * sourceImage,
int32_t maximumNumberOfCharacters,
const std::vector< uint32_t > & classes )

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

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 EOCRClass, to specify to what classes the character may belong. Each mask value in the array applies to the corresponding character.

This method does the same as a sequence of EOCR::BuildObjects/EOCR::FindAllChars/EOCR::ReadText,

Deprecated

Use the EOCR::Recognize method instead as it performs similarly to this method, except it returns UTF-8 instead of wide characters.

Deprecated in version 23.8. Scheduled to be removed in version 27.6.

◆ RecognizeWide() [2/2]

std::wstring eVision::EOCR::RecognizeWide ( eVision::EROIBW8 * sourceImage,
int32_t maximumNumberOfCharacters,
uint32_t classes )

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

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 EOCRClass, to specify to what classes the character may belong. Each mask value in the array applies to the corresponding character.

This method does the same as a sequence of EOCR::BuildObjects/EOCR::FindAllChars/EOCR::ReadText,

Deprecated

Use the EOCR::Recognize method instead as it performs similarly to this method, except it returns UTF-8 instead of wide characters.

Deprecated in version 23.8. Scheduled to be removed in version 27.6.

◆ RemovePattern()

void eVision::EOCR::RemovePattern ( uint32_t index)

Removes a given pattern from the current font.

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

◆ Save() [1/2]

void eVision::EOCR::Save ( const std::string & path)

Saves the EOCR object configuration.

Parameters
pathThe path from which to save the configuration.

The given ESerializer must have been created for writing.

◆ Save() [2/2]

void eVision::EOCR::Save ( eVision::ESerializer * serializer)

Saves the EOCR object configuration.

Parameters
serializerThe serializer.

The given ESerializer must have been created for writing.

◆ SetCharSpacing()

void eVision::EOCR::SetCharSpacing ( int32_t n32CharSpacing)

Spacing that separates characters.

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 EOCR::GetMaxCharWidth. The segmentation parameters must be the same for both learning and recognition process.

◆ SetCompareAspectRatio()

void eVision::EOCR::SetCompareAspectRatio ( bool bCompareAspectRatio)

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

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

◆ SetCutLargeChars()

void eVision::EOCR::SetCutLargeChars ( bool bCutLargeChars)

Flag indicating whether the large chars cutting mode is used.

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.

◆ SetLineSpacingMode()

void eVision::EOCR::SetLineSpacingMode ( eVision::ELineSpacingMode eLineSpacingMode)

Line spacing mode to sort the character boxes into lines. Default mode is ELineSpacingMode::ELineSpacingMode_Overlap.

◆ SetMatchingMode()

void eVision::EOCR::SetMatchingMode ( eVision::EMatchingMode eMatchingMode)

Matching mode to use to compare characters to the template.

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 EOCRColor::EOCRColor_DarkOnLight and EOCRColor::EOCRColor_LightOnDark colors are used.

◆ SetMaxCharHeight()

void eVision::EOCR::SetMaxCharHeight ( int32_t n32MaxCharHeight)

Maximum character height.

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.

◆ SetMaxCharWidth()

void eVision::EOCR::SetMaxCharWidth ( int32_t n32MaxCharWidth)

Maximum character width.

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.

◆ SetMinCharHeight()

void eVision::EOCR::SetMinCharHeight ( int32_t n32MinCharHeight)

Minimum character height.

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

◆ SetMinCharWidth()

void eVision::EOCR::SetMinCharWidth ( int32_t n32MinCharWidth)

Minimum character width.

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

◆ SetNoiseArea()

void eVision::EOCR::SetNoiseArea ( int32_t n32NoiseArea)

Noise area.

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.

◆ SetPatternClass()

void eVision::EOCR::SetPatternClass ( int32_t index,
uint32_t classIdx )

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

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

◆ SetPatternCode()

void eVision::EOCR::SetPatternCode ( int32_t index,
int32_t code )

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

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

◆ SetRelativeSpacing()

void eVision::EOCR::SetRelativeSpacing ( float f32RelativeSpacing)

Relative spacing value.

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.

◆ SetRelativeThreshold()

void eVision::EOCR::SetRelativeThreshold ( float f32Threshold)

Relative threshold used for image segmentation.

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

◆ SetRemoveBorder()

void eVision::EOCR::SetRemoveBorder ( bool bRemoveBorder)

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

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.

◆ SetRemoveNarrowOrFlat()

void eVision::EOCR::SetRemoveNarrowOrFlat ( bool bRemoveNarrowOrFlat)

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

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.

◆ SetSegmentationMode()

void eVision::EOCR::SetSegmentationMode ( eVision::ESegmentationMode eSegmentationMode)

Segmentation mode.

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

◆ SetShiftingMode()

void eVision::EOCR::SetShiftingMode ( eVision::EShiftingMode eShiftingMode)

Shifting mode to use to compare characters to the template.

◆ SetShiftXTolerance()

void eVision::EOCR::SetShiftXTolerance ( uint32_t un32ShiftXTolerance)

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

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 EOCR::GetShiftingMode.

◆ SetShiftYTolerance()

void eVision::EOCR::SetShiftYTolerance ( uint32_t un32ShiftYTolerance)

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

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 EOCR::GetShiftingMode.

◆ SetTextColor()

void eVision::EOCR::SetTextColor ( eVision::EOCRColor eTextColor)

Text color.

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

◆ SetThreshold()

void eVision::EOCR::SetThreshold ( int32_t un32Threshold)

Threshold mode used for image segmentation.

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.

Member Data Documentation

◆ wrappedClass_

CppWrapperInternal::WrappedClass eVision::EOCR::wrappedClass_