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

Represents a text detected by a ETextReader. A EText is composed of one or several ETextLine, that are returned by EText::SetLines. More...

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

Collaboration diagram for eVision::EasyDeepOCR::EText:

Public Member Functions

 EText ()
 Constructs a EText.
 EText (const eVision::EasyDeepOCR::EText &other)
 Constructs a EText.
 EText (const std::vector< eVision::EasyDeepOCR::ETextLine > &lines)
 Constructs a EText.
 EText (const eVision::EasyDeepOCR::ETextLine &line)
 Constructs a EText.
virtual ~EText () throw ()
eVision::EasyDeepOCR::EText & operator= (const eVision::EasyDeepOCR::EText &other)
 Assignment operator.
void Load (const std::string &path)
 Loads the EText.
void Load (eVision::ESerializer *serializer)
 Loads the EText.
void Save (const std::string &path)
 Saves the EText.
void Save (eVision::ESerializer *serializer)
 Saves the EText.
void SetLines (const std::vector< eVision::EasyDeepOCR::ETextLine > &text)
 EText lines.
std::vector< eVision::EasyDeepOCR::ETextLine > GetLines () const
 EText lines.
eVision::ERectangle GetPosition () const
 Returns a rectangle that contains all the lines.
std::string GetString () const
 Returns the concatenation of the line strings, separated by the new line character "\n". The line return.
bool Match (const eVision::EasyDeepOCR::EText &reference) const
 Returns true if this EText matches the reference EText. A EText matches a reference EText when all their ETextLine match each other (ETextLine::Match).
void Draw (eVision::EDrawAdapter *graphicContext, float zoomX, float zoomY, float panX, float panY) const
 Draws either the text box labelled with the detected text string, or all the line boxes labelled with the detected line strings.
void Draw (eVision::EDrawAdapter *graphicContext, float zoomX, float zoomY, float panX) const
 Draws either the text box labelled with the detected text string, or all the line boxes labelled with the detected line strings.
void Draw (eVision::EDrawAdapter *graphicContext, float zoomX, float zoomY) const
 Draws either the text box labelled with the detected text string, or all the line boxes labelled with the detected line strings.
void Draw (eVision::EDrawAdapter *graphicContext, float zoomX) const
 Draws either the text box labelled with the detected text string, or all the line boxes labelled with the detected line strings.
void Draw (eVision::EDrawAdapter *graphicContext) const
 Draws either the text box labelled with the detected text string, or all the line boxes labelled with the detected line strings.
void Draw (eVision::EDrawAdapter *graphicContext, const eVision::EasyDeepOCR::ETextDrawingParameters &drawingParameters, float zoomX, float zoomY, float panX, float panY) const
 Draws either the text box labelled with the detected text string, or all the line boxes labelled with the detected line strings.
void Draw (eVision::EDrawAdapter *graphicContext, const eVision::EasyDeepOCR::ETextDrawingParameters &drawingParameters, float zoomX, float zoomY, float panX) const
 Draws either the text box labelled with the detected text string, or all the line boxes labelled with the detected line strings.
void Draw (eVision::EDrawAdapter *graphicContext, const eVision::EasyDeepOCR::ETextDrawingParameters &drawingParameters, float zoomX, float zoomY) const
 Draws either the text box labelled with the detected text string, or all the line boxes labelled with the detected line strings.
void Draw (eVision::EDrawAdapter *graphicContext, const eVision::EasyDeepOCR::ETextDrawingParameters &drawingParameters, float zoomX) const
 Draws either the text box labelled with the detected text string, or all the line boxes labelled with the detected line strings.
void Draw (eVision::EDrawAdapter *graphicContext, const eVision::EasyDeepOCR::ETextDrawingParameters &drawingParameters) const
 Draws either the text box labelled with the detected text string, or all the line boxes labelled with the detected line strings.
void Draw (eVision::EDrawAdapter *graphicContext, const eVision::EFrame &frame, float zoomX, float zoomY, float panX, float panY) const
 Draws either the text box labelled with the detected text string, or all the line boxes labelled with the detected line strings.
void Draw (eVision::EDrawAdapter *graphicContext, const eVision::EFrame &frame, float zoomX, float zoomY, float panX) const
 Draws either the text box labelled with the detected text string, or all the line boxes labelled with the detected line strings.
void Draw (eVision::EDrawAdapter *graphicContext, const eVision::EFrame &frame, float zoomX, float zoomY) const
 Draws either the text box labelled with the detected text string, or all the line boxes labelled with the detected line strings.
void Draw (eVision::EDrawAdapter *graphicContext, const eVision::EFrame &frame, float zoomX) const
 Draws either the text box labelled with the detected text string, or all the line boxes labelled with the detected line strings.
void Draw (eVision::EDrawAdapter *graphicContext, const eVision::EFrame &frame) const
 Draws either the text box labelled with the detected text string, or all the line boxes labelled with the detected line strings.
void Draw (eVision::EDrawAdapter *graphicContext, const eVision::EFrame &frame, const eVision::EasyDeepOCR::ETextDrawingParameters &drawingParameters, float zoomX, float zoomY, float panX, float panY) const
 Draws either the text box labelled with the detected text string, or all the line boxes labelled with the detected line strings.
void Draw (eVision::EDrawAdapter *graphicContext, const eVision::EFrame &frame, const eVision::EasyDeepOCR::ETextDrawingParameters &drawingParameters, float zoomX, float zoomY, float panX) const
 Draws either the text box labelled with the detected text string, or all the line boxes labelled with the detected line strings.
void Draw (eVision::EDrawAdapter *graphicContext, const eVision::EFrame &frame, const eVision::EasyDeepOCR::ETextDrawingParameters &drawingParameters, float zoomX, float zoomY) const
 Draws either the text box labelled with the detected text string, or all the line boxes labelled with the detected line strings.
void Draw (eVision::EDrawAdapter *graphicContext, const eVision::EFrame &frame, const eVision::EasyDeepOCR::ETextDrawingParameters &drawingParameters, float zoomX) const
 Draws either the text box labelled with the detected text string, or all the line boxes labelled with the detected line strings.
void Draw (eVision::EDrawAdapter *graphicContext, const eVision::EFrame &frame, const eVision::EasyDeepOCR::ETextDrawingParameters &drawingParameters) const
 Draws either the text box labelled with the detected text string, or all the line boxes labelled with the detected line strings.
float GetScore () const
 Returns the score of this text. 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. When the text has multiple lines, the returned score is the mean of all line scores.
 EText (CppWrapperInternal::InternalConstructor)

Public Attributes

CppWrapperInternal::WrappedClass wrappedClass_

Detailed Description

Represents a text detected by a ETextReader. A EText is composed of one or several ETextLine, that are returned by EText::SetLines.

License(s): EasyDeepOCR

Constructor & Destructor Documentation

◆ EText() [1/5]

eVision::EasyDeepOCR::EText::EText ( )

Constructs a EText.

◆ EText() [2/5]

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

Constructs a EText.

Parameters
otherEText to be copied.

◆ EText() [3/5]

eVision::EasyDeepOCR::EText::EText ( const std::vector< eVision::EasyDeepOCR::ETextLine > & lines)

Constructs a EText.

Parameters
linesList of ETextLine of the EText.

◆ EText() [4/5]

eVision::EasyDeepOCR::EText::EText ( const eVision::EasyDeepOCR::ETextLine & line)

Constructs a EText.

Parameters
lineSingle line for the EText.

◆ ~EText()

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

◆ EText() [5/5]

eVision::EasyDeepOCR::EText::EText ( CppWrapperInternal::InternalConstructor )

Member Function Documentation

◆ Draw() [1/20]

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

Draws either the text box labelled with the detected text string, or all the line boxes labelled with the detected line strings.

Parameters
graphicContextHandle to the device context of the destination window.

◆ Draw() [2/20]

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

Draws either the text box labelled with the detected text string, or all the line boxes labelled with the detected line strings.

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

◆ Draw() [3/20]

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

Draws either the text box labelled with the detected text string, or all the line boxes labelled with the detected line strings.

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::EText::Draw ( eVision::EDrawAdapter * graphicContext,
const eVision::EasyDeepOCR::ETextDrawingParameters & drawingParameters,
float zoomX,
float zoomY ) const

Draws either the text box labelled with the detected text string, or all the line boxes labelled with the detected line strings.

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::EText::Draw ( eVision::EDrawAdapter * graphicContext,
const eVision::EasyDeepOCR::ETextDrawingParameters & drawingParameters,
float zoomX,
float zoomY,
float panX ) const

Draws either the text box labelled with the detected text string, or all the line boxes labelled with the detected line strings.

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::EText::Draw ( eVision::EDrawAdapter * graphicContext,
const eVision::EasyDeepOCR::ETextDrawingParameters & drawingParameters,
float zoomX,
float zoomY,
float panX,
float panY ) const

Draws either the text box labelled with the detected text string, or all the line boxes labelled with the detected line strings.

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::EText::Draw ( eVision::EDrawAdapter * graphicContext,
const eVision::EFrame & frame ) const

Draws either the text box labelled with the detected text string, or all the line boxes labelled with the detected line strings.

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

◆ Draw() [8/20]

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

Draws either the text box labelled with the detected text string, or all the line boxes labelled with the detected line strings.

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::EText::Draw ( eVision::EDrawAdapter * graphicContext,
const eVision::EFrame & frame,
const eVision::EasyDeepOCR::ETextDrawingParameters & drawingParameters,
float zoomX ) const

Draws either the text box labelled with the detected text string, or all the line boxes labelled with the detected line strings.

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::EText::Draw ( eVision::EDrawAdapter * graphicContext,
const eVision::EFrame & frame,
const eVision::EasyDeepOCR::ETextDrawingParameters & drawingParameters,
float zoomX,
float zoomY ) const

Draws either the text box labelled with the detected text string, or all the line boxes labelled with the detected line strings.

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::EText::Draw ( eVision::EDrawAdapter * graphicContext,
const eVision::EFrame & frame,
const eVision::EasyDeepOCR::ETextDrawingParameters & drawingParameters,
float zoomX,
float zoomY,
float panX ) const

Draws either the text box labelled with the detected text string, or all the line boxes labelled with the detected line strings.

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::EText::Draw ( eVision::EDrawAdapter * graphicContext,
const eVision::EFrame & frame,
const eVision::EasyDeepOCR::ETextDrawingParameters & drawingParameters,
float zoomX,
float zoomY,
float panX,
float panY ) const

Draws either the text box labelled with the detected text string, or all the line boxes labelled with the detected line strings.

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::EText::Draw ( eVision::EDrawAdapter * graphicContext,
const eVision::EFrame & frame,
float zoomX ) const

Draws either the text box labelled with the detected text string, or all the line boxes labelled with the detected line strings.

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::EText::Draw ( eVision::EDrawAdapter * graphicContext,
const eVision::EFrame & frame,
float zoomX,
float zoomY ) const

Draws either the text box labelled with the detected text string, or all the line boxes labelled with the detected line strings.

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::EText::Draw ( eVision::EDrawAdapter * graphicContext,
const eVision::EFrame & frame,
float zoomX,
float zoomY,
float panX ) const

Draws either the text box labelled with the detected text string, or all the line boxes labelled with the detected line strings.

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::EText::Draw ( eVision::EDrawAdapter * graphicContext,
const eVision::EFrame & frame,
float zoomX,
float zoomY,
float panX,
float panY ) const

Draws either the text box labelled with the detected text string, or all the line boxes labelled with the detected line strings.

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::EText::Draw ( eVision::EDrawAdapter * graphicContext,
float zoomX ) const

Draws either the text box labelled with the detected text string, or all the line boxes labelled with the detected line strings.

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::EText::Draw ( eVision::EDrawAdapter * graphicContext,
float zoomX,
float zoomY ) const

Draws either the text box labelled with the detected text string, or all the line boxes labelled with the detected line strings.

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::EText::Draw ( eVision::EDrawAdapter * graphicContext,
float zoomX,
float zoomY,
float panX ) const

Draws either the text box labelled with the detected text string, or all the line boxes labelled with the detected line strings.

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::EText::Draw ( eVision::EDrawAdapter * graphicContext,
float zoomX,
float zoomY,
float panX,
float panY ) const

Draws either the text box labelled with the detected text string, or all the line boxes labelled with the detected line strings.

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.

◆ GetLines()

std::vector< eVision::EasyDeepOCR::ETextLine > eVision::EasyDeepOCR::EText::GetLines ( ) const

EText lines.

◆ GetPosition()

eVision::ERectangle eVision::EasyDeepOCR::EText::GetPosition ( ) const

Returns a rectangle that contains all the lines.

◆ GetScore()

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

Returns the score of this text. 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. When the text has multiple lines, the returned score is the mean of all line scores.

◆ GetString()

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

Returns the concatenation of the line strings, separated by the new line character "\n". The line return.

◆ Load() [1/2]

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

Loads the EText.

Parameters
pathPath where to save the EText.

◆ Load() [2/2]

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

Loads the EText.

Parameters
serializer

◆ Match()

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

Returns true if this EText matches the reference EText. A EText matches a reference EText when all their ETextLine match each other (ETextLine::Match).

◆ operator=()

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

Assignment operator.

Parameters
otherAnother EText to be assigned in the new EText.

◆ Save() [1/2]

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

Saves the EText.

Parameters
pathPath where to save the EText.

◆ Save() [2/2]

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

Saves the EText.

Parameters
serializer

◆ SetLines()

void eVision::EasyDeepOCR::EText::SetLines ( const std::vector< eVision::EasyDeepOCR::ETextLine > & text)

EText lines.

Member Data Documentation

◆ wrappedClass_

CppWrapperInternal::WrappedClass eVision::EasyDeepOCR::EText::wrappedClass_