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

Represents a text line detected by a ETextReader. More...

#include <eVision/EasyOcr/EasyDeepOCR/ETextLine.h>

Collaboration diagram for eVision::EasyDeepOCR::ETextLine:

Public Member Functions

 ETextLine ()
 Constructs a ETextLine.
 ETextLine (const eVision::EasyDeepOCR::ETextLine &other)
 Constructs a ETextLine.
 ETextLine (const eVision::ERectangle &rectangle, const std::string &text)
 Constructs a ETextLine.
virtual ~ETextLine () throw ()
eVision::EasyDeepOCR::ETextLine & operator= (const eVision::EasyDeepOCR::ETextLine &other)
 Assignment operator.
void Load (const std::string &path)
 Loads the ETextLine.
void Load (eVision::ESerializer *serializer)
 Loads the ETextLine.
void Save (const std::string &path)
 Saves the ETextLine.
void Save (eVision::ESerializer *serializer)
 Saves the ETextLine.
void SetString (const std::string &text)
 Text line string.
std::string GetString () const
 Text line string.
void SetRectangle (const eVision::ERectangle &rectangle)
 Text line box.
eVision::ERectangle GetRectangle () const
 Text line box.
bool GetIsRegex () const
 States whether the ETextLine::SetString is a regular expression or not. This flag is used only when converting this ETextLine to an EasyDeepOCR.ESampleTextLine. This property is a workaround to be able to create ESamples with regex from the public API, for testing purpuses.
void SetIsRegex (bool isRegex)
bool Match (const eVision::EasyDeepOCR::ETextLine &reference) const
 Returns true if this ETextLine matches the reference ETextLine. A ETextLine matches a reference ETextLine when both ETextLine::SetString are equal and when this ETextLine::SetRectangle is similar, or slightly wider, than the reference ETextLine::SetRectangle.
std::unique_ptr< eVision::EBaseROI > ExtractMiniature (const eVision::EBaseROI &roi) const
 Extracts a miniature image delimited by this ETextLine::SetRectangle from a source EBaseROI.
std::vector< eVision::EasyDeepOCR::ETextLine > SplitInWords () const
 Splits the ETextLine into multiple ETextLine, one for each word. Every returned ETextLine corresponds to a single word from the original ETextLine. The width of each ETextLine::SetRectangle is based on the word's character count, assuming a fixed character width. This method is intended for testing purposes only.
float GetScore () const
 Returns the score of this text line. The score value resides in the interval [0.0; 1.0]. It can be used to get an approximation of the reading quality of the underlying text.
void Draw (eVision::EDrawAdapter *graphicContext, float zoomX, float zoomY, float panX, float panY) const
 Draws the text line box.
void Draw (eVision::EDrawAdapter *graphicContext, float zoomX, float zoomY, float panX) const
 Draws the text line box.
void Draw (eVision::EDrawAdapter *graphicContext, float zoomX, float zoomY) const
 Draws the text line box.
void Draw (eVision::EDrawAdapter *graphicContext, float zoomX) const
 Draws the text line box.
void Draw (eVision::EDrawAdapter *graphicContext) const
 Draws the text line box.
void Draw (eVision::EDrawAdapter *graphicContext, const eVision::EasyDeepOCR::ETextDrawingParameters &drawingParameters, float zoomX, float zoomY, float panX, float panY) const
 Draws the text line box.
void Draw (eVision::EDrawAdapter *graphicContext, const eVision::EasyDeepOCR::ETextDrawingParameters &drawingParameters, float zoomX, float zoomY, float panX) const
 Draws the text line box.
void Draw (eVision::EDrawAdapter *graphicContext, const eVision::EasyDeepOCR::ETextDrawingParameters &drawingParameters, float zoomX, float zoomY) const
 Draws the text line box.
void Draw (eVision::EDrawAdapter *graphicContext, const eVision::EasyDeepOCR::ETextDrawingParameters &drawingParameters, float zoomX) const
 Draws the text line box.
void Draw (eVision::EDrawAdapter *graphicContext, const eVision::EasyDeepOCR::ETextDrawingParameters &drawingParameters) const
 Draws the text line box.
void Draw (eVision::EDrawAdapter *graphicContext, const eVision::EFrame &frame, float zoomX, float zoomY, float panX, float panY) const
 Draws the text line box.
void Draw (eVision::EDrawAdapter *graphicContext, const eVision::EFrame &frame, float zoomX, float zoomY, float panX) const
 Draws the text line box.
void Draw (eVision::EDrawAdapter *graphicContext, const eVision::EFrame &frame, float zoomX, float zoomY) const
 Draws the text line box.
void Draw (eVision::EDrawAdapter *graphicContext, const eVision::EFrame &frame, float zoomX) const
 Draws the text line box.
void Draw (eVision::EDrawAdapter *graphicContext, const eVision::EFrame &frame) const
 Draws the text line box.
void Draw (eVision::EDrawAdapter *graphicContext, const eVision::EFrame &frame, const eVision::EasyDeepOCR::ETextDrawingParameters &drawingParameters, float zoomX, float zoomY, float panX, float panY) const
 Draws the text line box.
void Draw (eVision::EDrawAdapter *graphicContext, const eVision::EFrame &frame, const eVision::EasyDeepOCR::ETextDrawingParameters &drawingParameters, float zoomX, float zoomY, float panX) const
 Draws the text line box.
void Draw (eVision::EDrawAdapter *graphicContext, const eVision::EFrame &frame, const eVision::EasyDeepOCR::ETextDrawingParameters &drawingParameters, float zoomX, float zoomY) const
 Draws the text line box.
void Draw (eVision::EDrawAdapter *graphicContext, const eVision::EFrame &frame, const eVision::EasyDeepOCR::ETextDrawingParameters &drawingParameters, float zoomX) const
 Draws the text line box.
void Draw (eVision::EDrawAdapter *graphicContext, const eVision::EFrame &frame, const eVision::EasyDeepOCR::ETextDrawingParameters &drawingParameters) const
 Draws the text line box.
 ETextLine (CppWrapperInternal::InternalConstructor)

Public Attributes

CppWrapperInternal::WrappedClass wrappedClass_

Detailed Description

Represents a text line detected by a ETextReader.

License(s): EasyDeepOCR

Constructor & Destructor Documentation

◆ ETextLine() [1/4]

eVision::EasyDeepOCR::ETextLine::ETextLine ( )

Constructs a ETextLine.

◆ ETextLine() [2/4]

eVision::EasyDeepOCR::ETextLine::ETextLine ( const eVision::EasyDeepOCR::ETextLine & other)

Constructs a ETextLine.

Parameters
otherETextLine to be copied.

◆ ETextLine() [3/4]

eVision::EasyDeepOCR::ETextLine::ETextLine ( const eVision::ERectangle & rectangle,
const std::string & text )

Constructs a ETextLine.

Parameters
rectangleText line box.
textText string.

◆ ~ETextLine()

eVision::EasyDeepOCR::ETextLine::~ETextLine ( )
throw ( )
virtual

◆ ETextLine() [4/4]

eVision::EasyDeepOCR::ETextLine::ETextLine ( CppWrapperInternal::InternalConstructor )

Member Function Documentation

◆ Draw() [1/20]

void eVision::EasyDeepOCR::ETextLine::Draw ( eVision::EDrawAdapter * graphicContext) const

Draws the text line box.

Parameters
graphicContextHandle to the device context of the destination window.

◆ Draw() [2/20]

void eVision::EasyDeepOCR::ETextLine::Draw ( eVision::EDrawAdapter * graphicContext,
const eVision::EasyDeepOCR::ETextDrawingParameters & drawingParameters ) const

Draws the text line box.

Parameters
graphicContextHandle to the device context of the destination window.
drawingParametersClass specifying the drawing parameters.

◆ Draw() [3/20]

void eVision::EasyDeepOCR::ETextLine::Draw ( eVision::EDrawAdapter * graphicContext,
const eVision::EasyDeepOCR::ETextDrawingParameters & drawingParameters,
float zoomX ) const

Draws the text line box.

Parameters
graphicContextHandle to the device context of the destination window.
drawingParametersClass specifying the drawing parameters.
zoomXMagnification factor for zooming in or out in the horizontal direction. By default, no zooming occurs.

◆ Draw() [4/20]

void eVision::EasyDeepOCR::ETextLine::Draw ( eVision::EDrawAdapter * graphicContext,
const eVision::EasyDeepOCR::ETextDrawingParameters & drawingParameters,
float zoomX,
float zoomY ) const

Draws the text line box.

Parameters
graphicContextHandle to the device context of the destination window.
drawingParametersClass specifying the drawing parameters.
zoomXMagnification factor for zooming in or out in the horizontal direction. By default, no zooming occurs.
zoomYMagnification factor for zooming in or out in the vertical direction. By default, no zooming occurs.

◆ Draw() [5/20]

void eVision::EasyDeepOCR::ETextLine::Draw ( eVision::EDrawAdapter * graphicContext,
const eVision::EasyDeepOCR::ETextDrawingParameters & drawingParameters,
float zoomX,
float zoomY,
float panX ) const

Draws the text line box.

Parameters
graphicContextHandle to the device context of the destination window.
drawingParametersClass specifying the drawing parameters.
zoomXMagnification factor for zooming in or out in the horizontal direction. By default, no zooming occurs.
zoomYMagnification factor for zooming in or out in the vertical direction. By default, no zooming occurs.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.

◆ Draw() [6/20]

void eVision::EasyDeepOCR::ETextLine::Draw ( eVision::EDrawAdapter * graphicContext,
const eVision::EasyDeepOCR::ETextDrawingParameters & drawingParameters,
float zoomX,
float zoomY,
float panX,
float panY ) const

Draws the text line box.

Parameters
graphicContextHandle to the device context of the destination window.
drawingParametersClass specifying the drawing parameters.
zoomXMagnification factor for zooming in or out in the horizontal direction. By default, no zooming occurs.
zoomYMagnification factor for zooming in or out in the vertical direction. By default, no zooming occurs.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.
panYVertical panning value expressed in pixels. By default, no panning occurs.

◆ Draw() [7/20]

void eVision::EasyDeepOCR::ETextLine::Draw ( eVision::EDrawAdapter * graphicContext,
const eVision::EFrame & frame ) const

Draws the text line box.

Parameters
graphicContextHandle to the device context of the destination window.
frameFrame associated with the text.

◆ Draw() [8/20]

void eVision::EasyDeepOCR::ETextLine::Draw ( eVision::EDrawAdapter * graphicContext,
const eVision::EFrame & frame,
const eVision::EasyDeepOCR::ETextDrawingParameters & drawingParameters ) const

Draws the text line box.

Parameters
graphicContextHandle to the device context of the destination window.
frameFrame associated with the text.
drawingParametersClass specifying the drawing parameters.

◆ Draw() [9/20]

void eVision::EasyDeepOCR::ETextLine::Draw ( eVision::EDrawAdapter * graphicContext,
const eVision::EFrame & frame,
const eVision::EasyDeepOCR::ETextDrawingParameters & drawingParameters,
float zoomX ) const

Draws the text line box.

Parameters
graphicContextHandle to the device context of the destination window.
frameFrame associated with the text.
drawingParametersClass specifying the drawing parameters.
zoomXMagnification factor for zooming in or out in the horizontal direction. By default, no zooming occurs.

◆ Draw() [10/20]

void eVision::EasyDeepOCR::ETextLine::Draw ( eVision::EDrawAdapter * graphicContext,
const eVision::EFrame & frame,
const eVision::EasyDeepOCR::ETextDrawingParameters & drawingParameters,
float zoomX,
float zoomY ) const

Draws the text line box.

Parameters
graphicContextHandle to the device context of the destination window.
frameFrame associated with the text.
drawingParametersClass specifying the drawing parameters.
zoomXMagnification factor for zooming in or out in the horizontal direction. By default, no zooming occurs.
zoomYMagnification factor for zooming in or out in the vertical direction. By default, no zooming occurs.

◆ Draw() [11/20]

void eVision::EasyDeepOCR::ETextLine::Draw ( eVision::EDrawAdapter * graphicContext,
const eVision::EFrame & frame,
const eVision::EasyDeepOCR::ETextDrawingParameters & drawingParameters,
float zoomX,
float zoomY,
float panX ) const

Draws the text line box.

Parameters
graphicContextHandle to the device context of the destination window.
frameFrame associated with the text.
drawingParametersClass specifying the drawing parameters.
zoomXMagnification factor for zooming in or out in the horizontal direction. By default, no zooming occurs.
zoomYMagnification factor for zooming in or out in the vertical direction. By default, no zooming occurs.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.

◆ Draw() [12/20]

void eVision::EasyDeepOCR::ETextLine::Draw ( eVision::EDrawAdapter * graphicContext,
const eVision::EFrame & frame,
const eVision::EasyDeepOCR::ETextDrawingParameters & drawingParameters,
float zoomX,
float zoomY,
float panX,
float panY ) const

Draws the text line box.

Parameters
graphicContextHandle to the device context of the destination window.
frameFrame associated with the text.
drawingParametersClass specifying the drawing parameters.
zoomXMagnification factor for zooming in or out in the horizontal direction. By default, no zooming occurs.
zoomYMagnification factor for zooming in or out in the vertical direction. By default, no zooming occurs.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.
panYVertical panning value expressed in pixels. By default, no panning occurs.

◆ Draw() [13/20]

void eVision::EasyDeepOCR::ETextLine::Draw ( eVision::EDrawAdapter * graphicContext,
const eVision::EFrame & frame,
float zoomX ) const

Draws the text line box.

Parameters
graphicContextHandle to the device context of the destination window.
frameFrame associated with the text.
zoomXMagnification factor for zooming in or out in the horizontal direction. By default, no zooming occurs.

◆ Draw() [14/20]

void eVision::EasyDeepOCR::ETextLine::Draw ( eVision::EDrawAdapter * graphicContext,
const eVision::EFrame & frame,
float zoomX,
float zoomY ) const

Draws the text line box.

Parameters
graphicContextHandle to the device context of the destination window.
frameFrame associated with the text.
zoomXMagnification factor for zooming in or out in the horizontal direction. By default, no zooming occurs.
zoomYMagnification factor for zooming in or out in the vertical direction. By default, no zooming occurs.

◆ Draw() [15/20]

void eVision::EasyDeepOCR::ETextLine::Draw ( eVision::EDrawAdapter * graphicContext,
const eVision::EFrame & frame,
float zoomX,
float zoomY,
float panX ) const

Draws the text line box.

Parameters
graphicContextHandle to the device context of the destination window.
frameFrame associated with the text.
zoomXMagnification factor for zooming in or out in the horizontal direction. By default, no zooming occurs.
zoomYMagnification factor for zooming in or out in the vertical direction. By default, no zooming occurs.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.

◆ Draw() [16/20]

void eVision::EasyDeepOCR::ETextLine::Draw ( eVision::EDrawAdapter * graphicContext,
const eVision::EFrame & frame,
float zoomX,
float zoomY,
float panX,
float panY ) const

Draws the text line box.

Parameters
graphicContextHandle to the device context of the destination window.
frameFrame associated with the text.
zoomXMagnification factor for zooming in or out in the horizontal direction. By default, no zooming occurs.
zoomYMagnification factor for zooming in or out in the vertical direction. By default, no zooming occurs.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.
panYVertical panning value expressed in pixels. By default, no panning occurs.

◆ Draw() [17/20]

void eVision::EasyDeepOCR::ETextLine::Draw ( eVision::EDrawAdapter * graphicContext,
float zoomX ) const

Draws the text line box.

Parameters
graphicContextHandle to the device context of the destination window.
zoomXMagnification factor for zooming in or out in the horizontal direction. By default, no zooming occurs.

◆ Draw() [18/20]

void eVision::EasyDeepOCR::ETextLine::Draw ( eVision::EDrawAdapter * graphicContext,
float zoomX,
float zoomY ) const

Draws the text line box.

Parameters
graphicContextHandle to the device context of the destination window.
zoomXMagnification factor for zooming in or out in the horizontal direction. By default, no zooming occurs.
zoomYMagnification factor for zooming in or out in the vertical direction. By default, no zooming occurs.

◆ Draw() [19/20]

void eVision::EasyDeepOCR::ETextLine::Draw ( eVision::EDrawAdapter * graphicContext,
float zoomX,
float zoomY,
float panX ) const

Draws the text line box.

Parameters
graphicContextHandle to the device context of the destination window.
zoomXMagnification factor for zooming in or out in the horizontal direction. By default, no zooming occurs.
zoomYMagnification factor for zooming in or out in the vertical direction. By default, no zooming occurs.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.

◆ Draw() [20/20]

void eVision::EasyDeepOCR::ETextLine::Draw ( eVision::EDrawAdapter * graphicContext,
float zoomX,
float zoomY,
float panX,
float panY ) const

Draws the text line box.

Parameters
graphicContextHandle to the device context of the destination window.
zoomXMagnification factor for zooming in or out in the horizontal direction. By default, no zooming occurs.
zoomYMagnification factor for zooming in or out in the vertical direction. By default, no zooming occurs.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.
panYVertical panning value expressed in pixels. By default, no panning occurs.

◆ ExtractMiniature()

std::unique_ptr< eVision::EBaseROI > eVision::EasyDeepOCR::ETextLine::ExtractMiniature ( const eVision::EBaseROI & roi) const

Extracts a miniature image delimited by this ETextLine::SetRectangle from a source EBaseROI.

◆ GetIsRegex()

bool eVision::EasyDeepOCR::ETextLine::GetIsRegex ( ) const

States whether the ETextLine::SetString is a regular expression or not. This flag is used only when converting this ETextLine to an EasyDeepOCR.ESampleTextLine. This property is a workaround to be able to create ESamples with regex from the public API, for testing purpuses.

◆ GetRectangle()

eVision::ERectangle eVision::EasyDeepOCR::ETextLine::GetRectangle ( ) const

Text line box.

◆ GetScore()

float eVision::EasyDeepOCR::ETextLine::GetScore ( ) const

Returns the score of this text line. The score value resides in the interval [0.0; 1.0]. It can be used to get an approximation of the reading quality of the underlying text.

◆ GetString()

std::string eVision::EasyDeepOCR::ETextLine::GetString ( ) const

Text line string.

◆ Load() [1/2]

void eVision::EasyDeepOCR::ETextLine::Load ( const std::string & path)

Loads the ETextLine.

Parameters
pathPath where to save the ETextLine.

◆ Load() [2/2]

void eVision::EasyDeepOCR::ETextLine::Load ( eVision::ESerializer * serializer)

Loads the ETextLine.

Parameters
serializer

◆ Match()

bool eVision::EasyDeepOCR::ETextLine::Match ( const eVision::EasyDeepOCR::ETextLine & reference) const

Returns true if this ETextLine matches the reference ETextLine. A ETextLine matches a reference ETextLine when both ETextLine::SetString are equal and when this ETextLine::SetRectangle is similar, or slightly wider, than the reference ETextLine::SetRectangle.

◆ operator=()

eVision::EasyDeepOCR::ETextLine & eVision::EasyDeepOCR::ETextLine::operator= ( const eVision::EasyDeepOCR::ETextLine & other)

Assignment operator.

Parameters
otherAnother ETextLine to be assigned in the new ETextLine.

◆ Save() [1/2]

void eVision::EasyDeepOCR::ETextLine::Save ( const std::string & path)

Saves the ETextLine.

Parameters
pathPath where to save the ETextLine.

◆ Save() [2/2]

void eVision::EasyDeepOCR::ETextLine::Save ( eVision::ESerializer * serializer)

Saves the ETextLine.

Parameters
serializer

◆ SetIsRegex()

void eVision::EasyDeepOCR::ETextLine::SetIsRegex ( bool isRegex)

◆ SetRectangle()

void eVision::EasyDeepOCR::ETextLine::SetRectangle ( const eVision::ERectangle & rectangle)

Text line box.

◆ SetString()

void eVision::EasyDeepOCR::ETextLine::SetString ( const std::string & text)

Text line string.

◆ SplitInWords()

std::vector< eVision::EasyDeepOCR::ETextLine > eVision::EasyDeepOCR::ETextLine::SplitInWords ( ) const

Splits the ETextLine into multiple ETextLine, one for each word. Every returned ETextLine corresponds to a single word from the original ETextLine. The width of each ETextLine::SetRectangle is based on the word's character count, assuming a fixed character width. This method is intended for testing purposes only.

Member Data Documentation

◆ wrappedClass_

CppWrapperInternal::WrappedClass eVision::EasyDeepOCR::ETextLine::wrappedClass_