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

A ETextReader aims to find and read texts inside a given ROI, through ETextReader::Read. The returned texts can be filtered by providing a ETopology. An optimization phase can be performed before starting to read, to increase the processing speed of ETextReader. This optimization phase can be launched with ETextReader::Optimize. More...

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

Collaboration diagram for eVision::EasyDeepOCR::ETextReader:

Public Member Functions

 ETextReader ()
 Creates a ETextReader.
 ETextReader (const eVision::EasyDeepOCR::ETextReader &other)
 Creates a ETextReader.
virtual ~ETextReader () throw ()
eVision::EasyDeepOCR::ETextReader & operator= (const eVision::EasyDeepOCR::ETextReader &other)
 Assignment operator.
bool operator== (const eVision::EasyDeepOCR::ETextReader &other) const
 Checks if this ETextReader instance is strictly equal to another ETextReader instance.
bool IsEqual (const eVision::EasyDeepOCR::ETextReader &other) const
 Checks if this ETextReader instance is strictly equal to another ETextReader instance.
void Load (const std::string &path)
 Loads the ETextReader.
void Load (eVision::ESerializer *serializer)
 Loads the ETextReader.
void Save (const std::string &path)
 Saves the ETextReader.
void Save (eVision::ESerializer *serializer)
 Saves the ETextReader.
void Initialize ()
 Initializes the ETextReader. ETextReader must be initialized before using ETextReader::Read.
bool IsInitialized () const
 Returns true if the ETextReader is initialized.
void SetTopology (const eVision::ETopology &topology)
 ETopology of the ETextReader.
eVision::ETopology GetTopology () const
 ETopology of the ETextReader.
bool GetHasTopology () const
 Returns true if the ETopology is set.
void ResetTopology ()
 Forgets the ETopology previously set.
void SetExecutionSettings (const eVision::EasyDeepLearning::EDeepLearningExecutionSettings &executionSettings)
 EDeepLearningExecutionSettings used by the ETextReader.
eVision::EasyDeepLearning::EDeepLearningExecutionSettings GetExecutionSettings () const
 EDeepLearningExecutionSettings used by the ETextReader.
void SetTextLineHeight (int minHeight, int maxHeight)
 Sets the range for the text line height. All returned text lines will have a height in the range [minHeight, maxHeight]. Any text line that does not fit this constraint, will be discarded. By default, it is not set, so no filtering is applied.
eVision::EFloatRange GetTextLineHeight () const
 Gets the range for the text line height. Throws if not previously set. By default, it is not set, so no filtering is applied.
void SetTextAngle (float arg0)
 Angle hint for the text to be found.
float GetTextAngle () const
 Angle hint for the text to be found.
bool GetHasTextAngle () const
 Returns true if the text angle hint is defined.
void UnsetTextAngle ()
 Unsets the text angle hint.
eVision::EasyDeepOCR::EOptimizationReport Optimize (const eVision::EasyDeepOCR::ESampleList &samples)
 Sets the optimal internal parameters by finding the text in the corresponding input image, for each ESample.
eVision::EasyDeepOCR::EOptimizationReport Optimize (const eVision::EasyDeepOCR::ESampleList &samples, eVision::EImageType imageType)
 Sets the optimal internal parameters by finding the text in the corresponding input image, for each ESample.
eVision::EasyDeepOCR::EOptimizationReport Optimize (const eVision::EasyDeepOCR::EOptimizationReport &optimizationReport)
 Sets the optimal internal parameters by finding the text in the corresponding input image, for each ESample.
bool IsOptimized () const
 Returns true if the ETextReader has been optimized with a call to ETextReader::Optimize, and false otherwise.
void ResetOptimization ()
 Forgets the optimal parameters previously set by ETextReader::Optimize.
void SetLocationCustomModelPath (const std::string &modelPath)
 Sets a location custom model using the path to a saved EDeepOCRTool (user trained model).
void SetLocationCustomModel (const eVision::EasyDeepLearning::EDeepOCRTool &tool)
 Sets a location custom model from a EDeepOCRTool object (user trained model).
bool GetHasLocationCustomModel () const
 Whether the reader has a location custom model.
bool HasLocationCustomModel () const
 Whether the reader has a location custom model.
void ResetLocationCustomModel ()
 Removes any location custom model that was previously set and use the default location model.
void SetRecognitionCustomModelPath (const std::string &modelPath)
 Sets a recognition custom model using the path to a saved EDeepOCRTool (user trained model).
void SetRecognitionCustomModel (const eVision::EasyDeepLearning::EDeepOCRTool &tool)
 Sets a recognition custom model from a EDeepOCRTool object (user trained model).
bool GetHasRecognitionCustomModel () const
 Whether the reader has a recognition custom model.
bool HasRecognitionCustomModel () const
 Whether the reader has a recognition custom model.
void ResetRecognitionCustomModel ()
 Removes any recognition custom model that was previously set and use the default recognition model.
void SetOrientationCustomModelPath (const std::string &modelPath)
 Sets an orientation custom model using the path to a saved EDeepOCRTool (user trained model).
void SetOrientationCustomModel (const eVision::EasyDeepLearning::EDeepOCRTool &tool)
 Sets an orientation custom model from a EDeepOCRTool object (user trained model).
bool GetHasOrientationCustomModel () const
 Whether the reader has a orientation custom model.
bool HasOrientationCustomModel () const
 Whether the reader has a orientation custom model.
void ResetOrientationCustomModel ()
 Removes any orientation custom model that was previously set and use the default orientation model.
std::vector< eVision::EasyDeepOCR::EText > Read (const eVision::EBaseROI &roi) const
 Reads texts inside an EBaseROI. Texts are returned as EText. Texts comply with the ETopology previously specified with ETextReader::SetTopology, if any. The processing speed can be increased with ETextReader::Optimize.
std::vector< eVision::EasyDeepOCR::EText > Read (const eVision::EBaseROI &roi, const eVision::ERegion &region) const
 Reads texts inside an EBaseROI. Texts are returned as EText. Texts comply with the ETopology previously specified with ETextReader::SetTopology, if any. The processing speed can be increased with ETextReader::Optimize.
std::vector< eVision::EasyDeepOCR::EText > Read (const eVision::EBaseROI &roi, const eVision::ERegion &region, const eVision::EFrame &frame) const
 Reads texts inside an EBaseROI. Texts are returned as EText. Texts comply with the ETopology previously specified with ETextReader::SetTopology, if any. The processing speed can be increased with ETextReader::Optimize.
std::vector< eVision::EasyDeepOCR::EText > Read (const eVision::EBaseROI &roi, const eVision::EFrame &frame) const
 Reads texts inside an EBaseROI. Texts are returned as EText. Texts comply with the ETopology previously specified with ETextReader::SetTopology, if any. The processing speed can be increased with ETextReader::Optimize.
std::vector< eVision::ERectangle > Localize (const eVision::EBaseROI &roi) const
 Localizes the texts within a specified region of interest (ROI). Returns the detected text areas as ERectangles.
std::vector< eVision::ERectangle > Localize (const eVision::EBaseROI &roi, const eVision::ERegion &region) const
 Localizes the texts within a specified region of interest (ROI). Returns the detected text areas as ERectangles.
std::vector< eVision::ERectangle > Localize (const eVision::EBaseROI &roi, const eVision::ERegion &region, const eVision::EFrame &frame) const
 Localizes the texts within a specified region of interest (ROI). Returns the detected text areas as ERectangles.
std::vector< eVision::ERectangle > Localize (const eVision::EBaseROI &roi, const eVision::EFrame &frame) const
 Localizes the texts within a specified region of interest (ROI). Returns the detected text areas as ERectangles.
std::vector< eVision::ERectangle > Locate (const eVision::EBaseROI &roi) const
 Locates the texts within a specified region of interest (ROI). Returns the detected text areas as ERectangles.
std::vector< eVision::ERectangle > Locate (const eVision::EBaseROI &roi, const eVision::ERegion &region) const
 Locates the texts within a specified region of interest (ROI). Returns the detected text areas as ERectangles.
std::vector< eVision::ERectangle > Locate (const eVision::EBaseROI &roi, const eVision::ERegion &region, const eVision::EFrame &frame) const
 Locates the texts within a specified region of interest (ROI). Returns the detected text areas as ERectangles.
std::vector< eVision::ERectangle > Locate (const eVision::EBaseROI &roi, const eVision::EFrame &frame) const
 Locates the texts within a specified region of interest (ROI). Returns the detected text areas as ERectangles.
eVision::EasyDeepOCR::ETextLine Recognize (const eVision::EBaseROI &miniature, bool automaticReadingDirection) const
 Recognizes a text within a miniature image and returns it as an ETextLine. The returned text will conform to the ETopologyLine if one is provided via the topologyLineIndex parameter. The miniature image can be provided directly or extracted from a larger ROI using an ERectangle or an ERegion. If the text in the miniature image is not oriented along the standard reading direction, setting automaticReadingDirection to true will attempt to detect and adjust for the correct reading orientation. When ETextReader::GetHasTextAngle is true, automaticReadingDirection is ignored and the reading orientation is chosen as the closest to ETextReader::SetTextAngle. Otherewise, To ensure the oriented rectangle obtained from the region is deterministic, the reader will always snap the orientation to the horizontal axis (changing the width and height accordingly).
eVision::EasyDeepOCR::ETextLine Recognize (const eVision::EBaseROI &miniature) const
 Recognizes a text within a miniature image and returns it as an ETextLine. The returned text will conform to the ETopologyLine if one is provided via the topologyLineIndex parameter. The miniature image can be provided directly or extracted from a larger ROI using an ERectangle or an ERegion. If the text in the miniature image is not oriented along the standard reading direction, setting automaticReadingDirection to true will attempt to detect and adjust for the correct reading orientation. When ETextReader::GetHasTextAngle is true, automaticReadingDirection is ignored and the reading orientation is chosen as the closest to ETextReader::SetTextAngle. Otherewise, To ensure the oriented rectangle obtained from the region is deterministic, the reader will always snap the orientation to the horizontal axis (changing the width and height accordingly).
eVision::EasyDeepOCR::ETextLine Recognize (const eVision::EBaseROI &miniature, uint32_t topologyLineIndex, bool automaticReadingDirection) const
 Recognizes a text within a miniature image and returns it as an ETextLine. The returned text will conform to the ETopologyLine if one is provided via the topologyLineIndex parameter. The miniature image can be provided directly or extracted from a larger ROI using an ERectangle or an ERegion. If the text in the miniature image is not oriented along the standard reading direction, setting automaticReadingDirection to true will attempt to detect and adjust for the correct reading orientation. When ETextReader::GetHasTextAngle is true, automaticReadingDirection is ignored and the reading orientation is chosen as the closest to ETextReader::SetTextAngle. Otherewise, To ensure the oriented rectangle obtained from the region is deterministic, the reader will always snap the orientation to the horizontal axis (changing the width and height accordingly).
eVision::EasyDeepOCR::ETextLine Recognize (const eVision::EBaseROI &miniature, uint32_t topologyLineIndex) const
 Recognizes a text within a miniature image and returns it as an ETextLine. The returned text will conform to the ETopologyLine if one is provided via the topologyLineIndex parameter. The miniature image can be provided directly or extracted from a larger ROI using an ERectangle or an ERegion. If the text in the miniature image is not oriented along the standard reading direction, setting automaticReadingDirection to true will attempt to detect and adjust for the correct reading orientation. When ETextReader::GetHasTextAngle is true, automaticReadingDirection is ignored and the reading orientation is chosen as the closest to ETextReader::SetTextAngle. Otherewise, To ensure the oriented rectangle obtained from the region is deterministic, the reader will always snap the orientation to the horizontal axis (changing the width and height accordingly).
eVision::EasyDeepOCR::ETextLine Recognize (const eVision::EBaseROI &roi, const eVision::ERectangle &rectangle, bool automaticReadingDirection) const
 Recognizes a text within a miniature image and returns it as an ETextLine. The returned text will conform to the ETopologyLine if one is provided via the topologyLineIndex parameter. The miniature image can be provided directly or extracted from a larger ROI using an ERectangle or an ERegion. If the text in the miniature image is not oriented along the standard reading direction, setting automaticReadingDirection to true will attempt to detect and adjust for the correct reading orientation. When ETextReader::GetHasTextAngle is true, automaticReadingDirection is ignored and the reading orientation is chosen as the closest to ETextReader::SetTextAngle. Otherewise, To ensure the oriented rectangle obtained from the region is deterministic, the reader will always snap the orientation to the horizontal axis (changing the width and height accordingly).
eVision::EasyDeepOCR::ETextLine Recognize (const eVision::EBaseROI &roi, const eVision::ERectangle &rectangle) const
 Recognizes a text within a miniature image and returns it as an ETextLine. The returned text will conform to the ETopologyLine if one is provided via the topologyLineIndex parameter. The miniature image can be provided directly or extracted from a larger ROI using an ERectangle or an ERegion. If the text in the miniature image is not oriented along the standard reading direction, setting automaticReadingDirection to true will attempt to detect and adjust for the correct reading orientation. When ETextReader::GetHasTextAngle is true, automaticReadingDirection is ignored and the reading orientation is chosen as the closest to ETextReader::SetTextAngle. Otherewise, To ensure the oriented rectangle obtained from the region is deterministic, the reader will always snap the orientation to the horizontal axis (changing the width and height accordingly).
eVision::EasyDeepOCR::ETextLine Recognize (const eVision::EBaseROI &roi, const eVision::ERectangle &rectangle, uint32_t topologyLineIndex, bool automaticReadingDirection) const
 Recognizes a text within a miniature image and returns it as an ETextLine. The returned text will conform to the ETopologyLine if one is provided via the topologyLineIndex parameter. The miniature image can be provided directly or extracted from a larger ROI using an ERectangle or an ERegion. If the text in the miniature image is not oriented along the standard reading direction, setting automaticReadingDirection to true will attempt to detect and adjust for the correct reading orientation. When ETextReader::GetHasTextAngle is true, automaticReadingDirection is ignored and the reading orientation is chosen as the closest to ETextReader::SetTextAngle. Otherewise, To ensure the oriented rectangle obtained from the region is deterministic, the reader will always snap the orientation to the horizontal axis (changing the width and height accordingly).
eVision::EasyDeepOCR::ETextLine Recognize (const eVision::EBaseROI &roi, const eVision::ERectangle &rectangle, uint32_t topologyLineIndex) const
 Recognizes a text within a miniature image and returns it as an ETextLine. The returned text will conform to the ETopologyLine if one is provided via the topologyLineIndex parameter. The miniature image can be provided directly or extracted from a larger ROI using an ERectangle or an ERegion. If the text in the miniature image is not oriented along the standard reading direction, setting automaticReadingDirection to true will attempt to detect and adjust for the correct reading orientation. When ETextReader::GetHasTextAngle is true, automaticReadingDirection is ignored and the reading orientation is chosen as the closest to ETextReader::SetTextAngle. Otherewise, To ensure the oriented rectangle obtained from the region is deterministic, the reader will always snap the orientation to the horizontal axis (changing the width and height accordingly).
eVision::EasyDeepOCR::ETextLine Recognize (const eVision::EBaseROI &roi, const eVision::ERectangle &rectangle, const eVision::EFrame &frame, bool automaticReadingDirection) const
 Recognizes a text within a miniature image and returns it as an ETextLine. The returned text will conform to the ETopologyLine if one is provided via the topologyLineIndex parameter. The miniature image can be provided directly or extracted from a larger ROI using an ERectangle or an ERegion. If the text in the miniature image is not oriented along the standard reading direction, setting automaticReadingDirection to true will attempt to detect and adjust for the correct reading orientation. When ETextReader::GetHasTextAngle is true, automaticReadingDirection is ignored and the reading orientation is chosen as the closest to ETextReader::SetTextAngle. Otherewise, To ensure the oriented rectangle obtained from the region is deterministic, the reader will always snap the orientation to the horizontal axis (changing the width and height accordingly).
eVision::EasyDeepOCR::ETextLine Recognize (const eVision::EBaseROI &roi, const eVision::ERectangle &rectangle, const eVision::EFrame &frame) const
 Recognizes a text within a miniature image and returns it as an ETextLine. The returned text will conform to the ETopologyLine if one is provided via the topologyLineIndex parameter. The miniature image can be provided directly or extracted from a larger ROI using an ERectangle or an ERegion. If the text in the miniature image is not oriented along the standard reading direction, setting automaticReadingDirection to true will attempt to detect and adjust for the correct reading orientation. When ETextReader::GetHasTextAngle is true, automaticReadingDirection is ignored and the reading orientation is chosen as the closest to ETextReader::SetTextAngle. Otherewise, To ensure the oriented rectangle obtained from the region is deterministic, the reader will always snap the orientation to the horizontal axis (changing the width and height accordingly).
eVision::EasyDeepOCR::ETextLine Recognize (const eVision::EBaseROI &roi, const eVision::ERectangle &rectangle, const eVision::EFrame &frame, uint32_t topologyLineIndex, bool automaticReadingDirection) const
 Recognizes a text within a miniature image and returns it as an ETextLine. The returned text will conform to the ETopologyLine if one is provided via the topologyLineIndex parameter. The miniature image can be provided directly or extracted from a larger ROI using an ERectangle or an ERegion. If the text in the miniature image is not oriented along the standard reading direction, setting automaticReadingDirection to true will attempt to detect and adjust for the correct reading orientation. When ETextReader::GetHasTextAngle is true, automaticReadingDirection is ignored and the reading orientation is chosen as the closest to ETextReader::SetTextAngle. Otherewise, To ensure the oriented rectangle obtained from the region is deterministic, the reader will always snap the orientation to the horizontal axis (changing the width and height accordingly).
eVision::EasyDeepOCR::ETextLine Recognize (const eVision::EBaseROI &roi, const eVision::ERectangle &rectangle, const eVision::EFrame &frame, uint32_t topologyLineIndex) const
 Recognizes a text within a miniature image and returns it as an ETextLine. The returned text will conform to the ETopologyLine if one is provided via the topologyLineIndex parameter. The miniature image can be provided directly or extracted from a larger ROI using an ERectangle or an ERegion. If the text in the miniature image is not oriented along the standard reading direction, setting automaticReadingDirection to true will attempt to detect and adjust for the correct reading orientation. When ETextReader::GetHasTextAngle is true, automaticReadingDirection is ignored and the reading orientation is chosen as the closest to ETextReader::SetTextAngle. Otherewise, To ensure the oriented rectangle obtained from the region is deterministic, the reader will always snap the orientation to the horizontal axis (changing the width and height accordingly).
eVision::EasyDeepOCR::ETextLine Recognize (const eVision::EBaseROI &roi, const eVision::ERegion &region, bool automaticReadingDirection) const
 Recognizes a text within a miniature image and returns it as an ETextLine. The returned text will conform to the ETopologyLine if one is provided via the topologyLineIndex parameter. The miniature image can be provided directly or extracted from a larger ROI using an ERectangle or an ERegion. If the text in the miniature image is not oriented along the standard reading direction, setting automaticReadingDirection to true will attempt to detect and adjust for the correct reading orientation. When ETextReader::GetHasTextAngle is true, automaticReadingDirection is ignored and the reading orientation is chosen as the closest to ETextReader::SetTextAngle. Otherewise, To ensure the oriented rectangle obtained from the region is deterministic, the reader will always snap the orientation to the horizontal axis (changing the width and height accordingly).
eVision::EasyDeepOCR::ETextLine Recognize (const eVision::EBaseROI &roi, const eVision::ERegion &region) const
 Recognizes a text within a miniature image and returns it as an ETextLine. The returned text will conform to the ETopologyLine if one is provided via the topologyLineIndex parameter. The miniature image can be provided directly or extracted from a larger ROI using an ERectangle or an ERegion. If the text in the miniature image is not oriented along the standard reading direction, setting automaticReadingDirection to true will attempt to detect and adjust for the correct reading orientation. When ETextReader::GetHasTextAngle is true, automaticReadingDirection is ignored and the reading orientation is chosen as the closest to ETextReader::SetTextAngle. Otherewise, To ensure the oriented rectangle obtained from the region is deterministic, the reader will always snap the orientation to the horizontal axis (changing the width and height accordingly).
eVision::EasyDeepOCR::ETextLine Recognize (const eVision::EBaseROI &roi, const eVision::ERegion &region, uint32_t topologyLineIndex, bool automaticReadingDirection) const
 Recognizes a text within a miniature image and returns it as an ETextLine. The returned text will conform to the ETopologyLine if one is provided via the topologyLineIndex parameter. The miniature image can be provided directly or extracted from a larger ROI using an ERectangle or an ERegion. If the text in the miniature image is not oriented along the standard reading direction, setting automaticReadingDirection to true will attempt to detect and adjust for the correct reading orientation. When ETextReader::GetHasTextAngle is true, automaticReadingDirection is ignored and the reading orientation is chosen as the closest to ETextReader::SetTextAngle. Otherewise, To ensure the oriented rectangle obtained from the region is deterministic, the reader will always snap the orientation to the horizontal axis (changing the width and height accordingly).
eVision::EasyDeepOCR::ETextLine Recognize (const eVision::EBaseROI &roi, const eVision::ERegion &region, uint32_t topologyLineIndex) const
 Recognizes a text within a miniature image and returns it as an ETextLine. The returned text will conform to the ETopologyLine if one is provided via the topologyLineIndex parameter. The miniature image can be provided directly or extracted from a larger ROI using an ERectangle or an ERegion. If the text in the miniature image is not oriented along the standard reading direction, setting automaticReadingDirection to true will attempt to detect and adjust for the correct reading orientation. When ETextReader::GetHasTextAngle is true, automaticReadingDirection is ignored and the reading orientation is chosen as the closest to ETextReader::SetTextAngle. Otherewise, To ensure the oriented rectangle obtained from the region is deterministic, the reader will always snap the orientation to the horizontal axis (changing the width and height accordingly).
eVision::EasyDeepOCR::ETextLine Recognize (const eVision::EBaseROI &roi, const eVision::ERegion &region, const eVision::EFrame &frame, bool automaticReadingDirection) const
 Recognizes a text within a miniature image and returns it as an ETextLine. The returned text will conform to the ETopologyLine if one is provided via the topologyLineIndex parameter. The miniature image can be provided directly or extracted from a larger ROI using an ERectangle or an ERegion. If the text in the miniature image is not oriented along the standard reading direction, setting automaticReadingDirection to true will attempt to detect and adjust for the correct reading orientation. When ETextReader::GetHasTextAngle is true, automaticReadingDirection is ignored and the reading orientation is chosen as the closest to ETextReader::SetTextAngle. Otherewise, To ensure the oriented rectangle obtained from the region is deterministic, the reader will always snap the orientation to the horizontal axis (changing the width and height accordingly).
eVision::EasyDeepOCR::ETextLine Recognize (const eVision::EBaseROI &roi, const eVision::ERegion &region, const eVision::EFrame &frame) const
 Recognizes a text within a miniature image and returns it as an ETextLine. The returned text will conform to the ETopologyLine if one is provided via the topologyLineIndex parameter. The miniature image can be provided directly or extracted from a larger ROI using an ERectangle or an ERegion. If the text in the miniature image is not oriented along the standard reading direction, setting automaticReadingDirection to true will attempt to detect and adjust for the correct reading orientation. When ETextReader::GetHasTextAngle is true, automaticReadingDirection is ignored and the reading orientation is chosen as the closest to ETextReader::SetTextAngle. Otherewise, To ensure the oriented rectangle obtained from the region is deterministic, the reader will always snap the orientation to the horizontal axis (changing the width and height accordingly).
eVision::EasyDeepOCR::ETextLine Recognize (const eVision::EBaseROI &roi, const eVision::ERegion &region, const eVision::EFrame &frame, uint32_t topologyLineIndex, bool automaticReadingDirection) const
 Recognizes a text within a miniature image and returns it as an ETextLine. The returned text will conform to the ETopologyLine if one is provided via the topologyLineIndex parameter. The miniature image can be provided directly or extracted from a larger ROI using an ERectangle or an ERegion. If the text in the miniature image is not oriented along the standard reading direction, setting automaticReadingDirection to true will attempt to detect and adjust for the correct reading orientation. When ETextReader::GetHasTextAngle is true, automaticReadingDirection is ignored and the reading orientation is chosen as the closest to ETextReader::SetTextAngle. Otherewise, To ensure the oriented rectangle obtained from the region is deterministic, the reader will always snap the orientation to the horizontal axis (changing the width and height accordingly).
eVision::EasyDeepOCR::ETextLine Recognize (const eVision::EBaseROI &roi, const eVision::ERegion &region, const eVision::EFrame &frame, uint32_t topologyLineIndex) const
 Recognizes a text within a miniature image and returns it as an ETextLine. The returned text will conform to the ETopologyLine if one is provided via the topologyLineIndex parameter. The miniature image can be provided directly or extracted from a larger ROI using an ERectangle or an ERegion. If the text in the miniature image is not oriented along the standard reading direction, setting automaticReadingDirection to true will attempt to detect and adjust for the correct reading orientation. When ETextReader::GetHasTextAngle is true, automaticReadingDirection is ignored and the reading orientation is chosen as the closest to ETextReader::SetTextAngle. Otherewise, To ensure the oriented rectangle obtained from the region is deterministic, the reader will always snap the orientation to the horizontal axis (changing the width and height accordingly).
std::vector< eVision::EasyDeepOCR::EText > Merge (const std::vector< eVision::EasyDeepOCR::ETextLine > &textlines) const
 Merges geometrically consistent ETextLines into structured ETexts satisfying the specified ETextReader::SetTopology. Throws if no ETextReader::SetTopology has been specified.
 ETextReader (CppWrapperInternal::InternalConstructor)

Public Attributes

CppWrapperInternal::WrappedClass wrappedClass_

Detailed Description

A ETextReader aims to find and read texts inside a given ROI, through ETextReader::Read. The returned texts can be filtered by providing a ETopology. An optimization phase can be performed before starting to read, to increase the processing speed of ETextReader. This optimization phase can be launched with ETextReader::Optimize.

License(s): EasyDeepOCR

Constructor & Destructor Documentation

◆ ETextReader() [1/3]

eVision::EasyDeepOCR::ETextReader::ETextReader ( )

Creates a ETextReader.

◆ ETextReader() [2/3]

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

Creates a ETextReader.

Parameters
otherAnother ETextReader to be copied in the new ETextReader.

◆ ~ETextReader()

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

◆ ETextReader() [3/3]

eVision::EasyDeepOCR::ETextReader::ETextReader ( CppWrapperInternal::InternalConstructor )

Member Function Documentation

◆ GetExecutionSettings()

eVision::EasyDeepLearning::EDeepLearningExecutionSettings eVision::EasyDeepOCR::ETextReader::GetExecutionSettings ( ) const

◆ GetHasLocationCustomModel()

bool eVision::EasyDeepOCR::ETextReader::GetHasLocationCustomModel ( ) const

Whether the reader has a location custom model.

◆ GetHasOrientationCustomModel()

bool eVision::EasyDeepOCR::ETextReader::GetHasOrientationCustomModel ( ) const

Whether the reader has a orientation custom model.

◆ GetHasRecognitionCustomModel()

bool eVision::EasyDeepOCR::ETextReader::GetHasRecognitionCustomModel ( ) const

Whether the reader has a recognition custom model.

◆ GetHasTextAngle()

bool eVision::EasyDeepOCR::ETextReader::GetHasTextAngle ( ) const

Returns true if the text angle hint is defined.

◆ GetHasTopology()

bool eVision::EasyDeepOCR::ETextReader::GetHasTopology ( ) const

Returns true if the ETopology is set.

◆ GetTextAngle()

float eVision::EasyDeepOCR::ETextReader::GetTextAngle ( ) const

Angle hint for the text to be found.

◆ GetTextLineHeight()

eVision::EFloatRange eVision::EasyDeepOCR::ETextReader::GetTextLineHeight ( ) const

Gets the range for the text line height. Throws if not previously set. By default, it is not set, so no filtering is applied.

◆ GetTopology()

eVision::ETopology eVision::EasyDeepOCR::ETextReader::GetTopology ( ) const

◆ HasLocationCustomModel()

bool eVision::EasyDeepOCR::ETextReader::HasLocationCustomModel ( ) const

Whether the reader has a location custom model.

Deprecated

Use ETextReader::GetHasLocationCustomModel instead.

Deprecated in version 26.10. Scheduled to be removed in version 27.10.

◆ HasOrientationCustomModel()

bool eVision::EasyDeepOCR::ETextReader::HasOrientationCustomModel ( ) const

Whether the reader has a orientation custom model.

Deprecated

Use ETextReader::GetHasOrientationCustomModel instead.

Deprecated in version 26.10. Scheduled to be removed in version 27.10.

◆ HasRecognitionCustomModel()

bool eVision::EasyDeepOCR::ETextReader::HasRecognitionCustomModel ( ) const

Whether the reader has a recognition custom model.

Deprecated

Use ETextReader::GetHasRecognitionCustomModel instead.

Deprecated in version 26.10. Scheduled to be removed in version 27.10.

◆ Initialize()

void eVision::EasyDeepOCR::ETextReader::Initialize ( )

Initializes the ETextReader. ETextReader must be initialized before using ETextReader::Read.

◆ IsEqual()

bool eVision::EasyDeepOCR::ETextReader::IsEqual ( const eVision::EasyDeepOCR::ETextReader & other) const

Checks if this ETextReader instance is strictly equal to another ETextReader instance.

Parameters
otherReference to the ETextReader instance to compare with

◆ IsInitialized()

bool eVision::EasyDeepOCR::ETextReader::IsInitialized ( ) const

Returns true if the ETextReader is initialized.

◆ IsOptimized()

bool eVision::EasyDeepOCR::ETextReader::IsOptimized ( ) const

Returns true if the ETextReader has been optimized with a call to ETextReader::Optimize, and false otherwise.

◆ Load() [1/2]

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

Loads the ETextReader.

Parameters
pathPath where to save the ETextReader.

◆ Load() [2/2]

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

Loads the ETextReader.

Parameters
serializer

◆ Localize() [1/4]

std::vector< eVision::ERectangle > eVision::EasyDeepOCR::ETextReader::Localize ( const eVision::EBaseROI & roi) const

Localizes the texts within a specified region of interest (ROI). Returns the detected text areas as ERectangles.

Parameters
roiThe region of interest (ROI) in which to search for text. Only EROIBW8 and EROIC24 are supported.
Deprecated

Use ETextReader::Locate instead.

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

◆ Localize() [2/4]

std::vector< eVision::ERectangle > eVision::EasyDeepOCR::ETextReader::Localize ( const eVision::EBaseROI & roi,
const eVision::EFrame & frame ) const

Localizes the texts within a specified region of interest (ROI). Returns the detected text areas as ERectangles.

Parameters
roiThe region of interest (ROI) in which to search for text. Only EROIBW8 and EROIC24 are supported.
frameReference frame of the input region.
Deprecated

Use ETextReader::Locate instead.

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

◆ Localize() [3/4]

std::vector< eVision::ERectangle > eVision::EasyDeepOCR::ETextReader::Localize ( const eVision::EBaseROI & roi,
const eVision::ERegion & region ) const

Localizes the texts within a specified region of interest (ROI). Returns the detected text areas as ERectangles.

Parameters
roiThe region of interest (ROI) in which to search for text. Only EROIBW8 and EROIC24 are supported.
regionOptional parameter that specifies a sub-region within the ROI to limit the text search area.
Deprecated

Use ETextReader::Locate instead.

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

◆ Localize() [4/4]

std::vector< eVision::ERectangle > eVision::EasyDeepOCR::ETextReader::Localize ( const eVision::EBaseROI & roi,
const eVision::ERegion & region,
const eVision::EFrame & frame ) const

Localizes the texts within a specified region of interest (ROI). Returns the detected text areas as ERectangles.

Parameters
roiThe region of interest (ROI) in which to search for text. Only EROIBW8 and EROIC24 are supported.
regionOptional parameter that specifies a sub-region within the ROI to limit the text search area.
frameReference frame of the input region.
Deprecated

Use ETextReader::Locate instead.

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

◆ Locate() [1/4]

std::vector< eVision::ERectangle > eVision::EasyDeepOCR::ETextReader::Locate ( const eVision::EBaseROI & roi) const

Locates the texts within a specified region of interest (ROI). Returns the detected text areas as ERectangles.

Parameters
roiThe region of interest (ROI) in which to search for text. Only EROIBW8 and EROIC24 are supported.

◆ Locate() [2/4]

std::vector< eVision::ERectangle > eVision::EasyDeepOCR::ETextReader::Locate ( const eVision::EBaseROI & roi,
const eVision::EFrame & frame ) const

Locates the texts within a specified region of interest (ROI). Returns the detected text areas as ERectangles.

Parameters
roiThe region of interest (ROI) in which to search for text. Only EROIBW8 and EROIC24 are supported.
frameReference frame of the input region.

◆ Locate() [3/4]

std::vector< eVision::ERectangle > eVision::EasyDeepOCR::ETextReader::Locate ( const eVision::EBaseROI & roi,
const eVision::ERegion & region ) const

Locates the texts within a specified region of interest (ROI). Returns the detected text areas as ERectangles.

Parameters
roiThe region of interest (ROI) in which to search for text. Only EROIBW8 and EROIC24 are supported.
regionOptional parameter that specifies a sub-region within the ROI to limit the text search area.

◆ Locate() [4/4]

std::vector< eVision::ERectangle > eVision::EasyDeepOCR::ETextReader::Locate ( const eVision::EBaseROI & roi,
const eVision::ERegion & region,
const eVision::EFrame & frame ) const

Locates the texts within a specified region of interest (ROI). Returns the detected text areas as ERectangles.

Parameters
roiThe region of interest (ROI) in which to search for text. Only EROIBW8 and EROIC24 are supported.
regionOptional parameter that specifies a sub-region within the ROI to limit the text search area.
frameReference frame of the input region.

◆ Merge()

std::vector< eVision::EasyDeepOCR::EText > eVision::EasyDeepOCR::ETextReader::Merge ( const std::vector< eVision::EasyDeepOCR::ETextLine > & textlines) const

Merges geometrically consistent ETextLines into structured ETexts satisfying the specified ETextReader::SetTopology. Throws if no ETextReader::SetTopology has been specified.

Parameters
textlinesA collection of ETextLine candidates to be merged.

◆ operator=()

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

Assignment operator.

Parameters
otherAnother ETextReader to be assigned in the new ETextReader.

◆ operator==()

bool eVision::EasyDeepOCR::ETextReader::operator== ( const eVision::EasyDeepOCR::ETextReader & other) const

Checks if this ETextReader instance is strictly equal to another ETextReader instance.

Parameters
otherReference to the ETextReader instance to compare with

This operator is stricly equivalent to the ETextReader::IsEqual method.

◆ Optimize() [1/3]

eVision::EasyDeepOCR::EOptimizationReport eVision::EasyDeepOCR::ETextReader::Optimize ( const eVision::EasyDeepOCR::EOptimizationReport & optimizationReport)

Sets the optimal internal parameters by finding the text in the corresponding input image, for each ESample.

Parameters
optimizationReportOptimization report to be restored.

Once an optimization is performed, the ETextReader is specialized and only returns texts sharing geometrical properties with the ones it has learned from.

◆ Optimize() [2/3]

eVision::EasyDeepOCR::EOptimizationReport eVision::EasyDeepOCR::ETextReader::Optimize ( const eVision::EasyDeepOCR::ESampleList & samples)

Sets the optimal internal parameters by finding the text in the corresponding input image, for each ESample.

Parameters
samplesSamples to be optimized from.

Once an optimization is performed, the ETextReader is specialized and only returns texts sharing geometrical properties with the ones it has learned from.

◆ Optimize() [3/3]

eVision::EasyDeepOCR::EOptimizationReport eVision::EasyDeepOCR::ETextReader::Optimize ( const eVision::EasyDeepOCR::ESampleList & samples,
eVision::EImageType imageType )

Sets the optimal internal parameters by finding the text in the corresponding input image, for each ESample.

Parameters
samplesSamples to be optimized from.
imageTypeSpecifies the image type for loading the sample images. If not provided, the image type will be automatically determined based on the sample image files.

Once an optimization is performed, the ETextReader is specialized and only returns texts sharing geometrical properties with the ones it has learned from.

◆ Read() [1/4]

std::vector< eVision::EasyDeepOCR::EText > eVision::EasyDeepOCR::ETextReader::Read ( const eVision::EBaseROI & roi) const

Reads texts inside an EBaseROI. Texts are returned as EText. Texts comply with the ETopology previously specified with ETextReader::SetTopology, if any. The processing speed can be increased with ETextReader::Optimize.

Parameters
roiROI in which the texts have to be found. Only EROIBW8 and EROIC24 are supported.

◆ Read() [2/4]

std::vector< eVision::EasyDeepOCR::EText > eVision::EasyDeepOCR::ETextReader::Read ( const eVision::EBaseROI & roi,
const eVision::EFrame & frame ) const

Reads texts inside an EBaseROI. Texts are returned as EText. Texts comply with the ETopology previously specified with ETextReader::SetTopology, if any. The processing speed can be increased with ETextReader::Optimize.

Parameters
roiROI in which the texts have to be found. Only EROIBW8 and EROIC24 are supported.
frameReference frame of the input region.

◆ Read() [3/4]

std::vector< eVision::EasyDeepOCR::EText > eVision::EasyDeepOCR::ETextReader::Read ( const eVision::EBaseROI & roi,
const eVision::ERegion & region ) const

Reads texts inside an EBaseROI. Texts are returned as EText. Texts comply with the ETopology previously specified with ETextReader::SetTopology, if any. The processing speed can be increased with ETextReader::Optimize.

Parameters
roiROI in which the texts have to be found. Only EROIBW8 and EROIC24 are supported.
regionRegion in which the texts have to be found.

◆ Read() [4/4]

std::vector< eVision::EasyDeepOCR::EText > eVision::EasyDeepOCR::ETextReader::Read ( const eVision::EBaseROI & roi,
const eVision::ERegion & region,
const eVision::EFrame & frame ) const

Reads texts inside an EBaseROI. Texts are returned as EText. Texts comply with the ETopology previously specified with ETextReader::SetTopology, if any. The processing speed can be increased with ETextReader::Optimize.

Parameters
roiROI in which the texts have to be found. Only EROIBW8 and EROIC24 are supported.
regionRegion in which the texts have to be found.
frameReference frame of the input region.

◆ Recognize() [1/20]

eVision::EasyDeepOCR::ETextLine eVision::EasyDeepOCR::ETextReader::Recognize ( const eVision::EBaseROI & miniature) const

Recognizes a text within a miniature image and returns it as an ETextLine. The returned text will conform to the ETopologyLine if one is provided via the topologyLineIndex parameter. The miniature image can be provided directly or extracted from a larger ROI using an ERectangle or an ERegion. If the text in the miniature image is not oriented along the standard reading direction, setting automaticReadingDirection to true will attempt to detect and adjust for the correct reading orientation. When ETextReader::GetHasTextAngle is true, automaticReadingDirection is ignored and the reading orientation is chosen as the closest to ETextReader::SetTextAngle. Otherewise, To ensure the oriented rectangle obtained from the region is deterministic, the reader will always snap the orientation to the horizontal axis (changing the width and height accordingly).

Parameters
miniatureThe ROI containing the miniature image with text to recognize.

◆ Recognize() [2/20]

eVision::EasyDeepOCR::ETextLine eVision::EasyDeepOCR::ETextReader::Recognize ( const eVision::EBaseROI & miniature,
bool automaticReadingDirection ) const

Recognizes a text within a miniature image and returns it as an ETextLine. The returned text will conform to the ETopologyLine if one is provided via the topologyLineIndex parameter. The miniature image can be provided directly or extracted from a larger ROI using an ERectangle or an ERegion. If the text in the miniature image is not oriented along the standard reading direction, setting automaticReadingDirection to true will attempt to detect and adjust for the correct reading orientation. When ETextReader::GetHasTextAngle is true, automaticReadingDirection is ignored and the reading orientation is chosen as the closest to ETextReader::SetTextAngle. Otherewise, To ensure the oriented rectangle obtained from the region is deterministic, the reader will always snap the orientation to the horizontal axis (changing the width and height accordingly).

Parameters
miniatureThe ROI containing the miniature image with text to recognize.
automaticReadingDirectionWhen true, automatically detects the reading direction of the text. Default is false.

◆ Recognize() [3/20]

eVision::EasyDeepOCR::ETextLine eVision::EasyDeepOCR::ETextReader::Recognize ( const eVision::EBaseROI & miniature,
uint32_t topologyLineIndex ) const

Recognizes a text within a miniature image and returns it as an ETextLine. The returned text will conform to the ETopologyLine if one is provided via the topologyLineIndex parameter. The miniature image can be provided directly or extracted from a larger ROI using an ERectangle or an ERegion. If the text in the miniature image is not oriented along the standard reading direction, setting automaticReadingDirection to true will attempt to detect and adjust for the correct reading orientation. When ETextReader::GetHasTextAngle is true, automaticReadingDirection is ignored and the reading orientation is chosen as the closest to ETextReader::SetTextAngle. Otherewise, To ensure the oriented rectangle obtained from the region is deterministic, the reader will always snap the orientation to the horizontal axis (changing the width and height accordingly).

Parameters
miniatureThe ROI containing the miniature image with text to recognize.
topologyLineIndexThe index of the ETopologyLine to use for text recognition constraints.

◆ Recognize() [4/20]

eVision::EasyDeepOCR::ETextLine eVision::EasyDeepOCR::ETextReader::Recognize ( const eVision::EBaseROI & miniature,
uint32_t topologyLineIndex,
bool automaticReadingDirection ) const

Recognizes a text within a miniature image and returns it as an ETextLine. The returned text will conform to the ETopologyLine if one is provided via the topologyLineIndex parameter. The miniature image can be provided directly or extracted from a larger ROI using an ERectangle or an ERegion. If the text in the miniature image is not oriented along the standard reading direction, setting automaticReadingDirection to true will attempt to detect and adjust for the correct reading orientation. When ETextReader::GetHasTextAngle is true, automaticReadingDirection is ignored and the reading orientation is chosen as the closest to ETextReader::SetTextAngle. Otherewise, To ensure the oriented rectangle obtained from the region is deterministic, the reader will always snap the orientation to the horizontal axis (changing the width and height accordingly).

Parameters
miniatureThe ROI containing the miniature image with text to recognize.
topologyLineIndexThe index of the ETopologyLine to use for text recognition constraints.
automaticReadingDirectionWhen true, automatically detects the reading direction of the text. Default is false.

◆ Recognize() [5/20]

eVision::EasyDeepOCR::ETextLine eVision::EasyDeepOCR::ETextReader::Recognize ( const eVision::EBaseROI & roi,
const eVision::ERectangle & rectangle ) const

Recognizes a text within a miniature image and returns it as an ETextLine. The returned text will conform to the ETopologyLine if one is provided via the topologyLineIndex parameter. The miniature image can be provided directly or extracted from a larger ROI using an ERectangle or an ERegion. If the text in the miniature image is not oriented along the standard reading direction, setting automaticReadingDirection to true will attempt to detect and adjust for the correct reading orientation. When ETextReader::GetHasTextAngle is true, automaticReadingDirection is ignored and the reading orientation is chosen as the closest to ETextReader::SetTextAngle. Otherewise, To ensure the oriented rectangle obtained from the region is deterministic, the reader will always snap the orientation to the horizontal axis (changing the width and height accordingly).

Parameters
roiThe source ROI from which to extract the miniature image.
rectangleDefines the area within the source ROI to extract as the miniature image.

◆ Recognize() [6/20]

eVision::EasyDeepOCR::ETextLine eVision::EasyDeepOCR::ETextReader::Recognize ( const eVision::EBaseROI & roi,
const eVision::ERectangle & rectangle,
bool automaticReadingDirection ) const

Recognizes a text within a miniature image and returns it as an ETextLine. The returned text will conform to the ETopologyLine if one is provided via the topologyLineIndex parameter. The miniature image can be provided directly or extracted from a larger ROI using an ERectangle or an ERegion. If the text in the miniature image is not oriented along the standard reading direction, setting automaticReadingDirection to true will attempt to detect and adjust for the correct reading orientation. When ETextReader::GetHasTextAngle is true, automaticReadingDirection is ignored and the reading orientation is chosen as the closest to ETextReader::SetTextAngle. Otherewise, To ensure the oriented rectangle obtained from the region is deterministic, the reader will always snap the orientation to the horizontal axis (changing the width and height accordingly).

Parameters
roiThe source ROI from which to extract the miniature image.
rectangleDefines the area within the source ROI to extract as the miniature image.
automaticReadingDirectionWhen true, automatically detects the reading direction of the text. Default is false.

◆ Recognize() [7/20]

eVision::EasyDeepOCR::ETextLine eVision::EasyDeepOCR::ETextReader::Recognize ( const eVision::EBaseROI & roi,
const eVision::ERectangle & rectangle,
const eVision::EFrame & frame ) const

Recognizes a text within a miniature image and returns it as an ETextLine. The returned text will conform to the ETopologyLine if one is provided via the topologyLineIndex parameter. The miniature image can be provided directly or extracted from a larger ROI using an ERectangle or an ERegion. If the text in the miniature image is not oriented along the standard reading direction, setting automaticReadingDirection to true will attempt to detect and adjust for the correct reading orientation. When ETextReader::GetHasTextAngle is true, automaticReadingDirection is ignored and the reading orientation is chosen as the closest to ETextReader::SetTextAngle. Otherewise, To ensure the oriented rectangle obtained from the region is deterministic, the reader will always snap the orientation to the horizontal axis (changing the width and height accordingly).

Parameters
roiThe source ROI from which to extract the miniature image.
rectangleDefines the area within the source ROI to extract as the miniature image.
frameReference frame of the input region.

◆ Recognize() [8/20]

eVision::EasyDeepOCR::ETextLine eVision::EasyDeepOCR::ETextReader::Recognize ( const eVision::EBaseROI & roi,
const eVision::ERectangle & rectangle,
const eVision::EFrame & frame,
bool automaticReadingDirection ) const

Recognizes a text within a miniature image and returns it as an ETextLine. The returned text will conform to the ETopologyLine if one is provided via the topologyLineIndex parameter. The miniature image can be provided directly or extracted from a larger ROI using an ERectangle or an ERegion. If the text in the miniature image is not oriented along the standard reading direction, setting automaticReadingDirection to true will attempt to detect and adjust for the correct reading orientation. When ETextReader::GetHasTextAngle is true, automaticReadingDirection is ignored and the reading orientation is chosen as the closest to ETextReader::SetTextAngle. Otherewise, To ensure the oriented rectangle obtained from the region is deterministic, the reader will always snap the orientation to the horizontal axis (changing the width and height accordingly).

Parameters
roiThe source ROI from which to extract the miniature image.
rectangleDefines the area within the source ROI to extract as the miniature image.
frameReference frame of the input region.
automaticReadingDirectionWhen true, automatically detects the reading direction of the text. Default is false.

◆ Recognize() [9/20]

eVision::EasyDeepOCR::ETextLine eVision::EasyDeepOCR::ETextReader::Recognize ( const eVision::EBaseROI & roi,
const eVision::ERectangle & rectangle,
const eVision::EFrame & frame,
uint32_t topologyLineIndex ) const

Recognizes a text within a miniature image and returns it as an ETextLine. The returned text will conform to the ETopologyLine if one is provided via the topologyLineIndex parameter. The miniature image can be provided directly or extracted from a larger ROI using an ERectangle or an ERegion. If the text in the miniature image is not oriented along the standard reading direction, setting automaticReadingDirection to true will attempt to detect and adjust for the correct reading orientation. When ETextReader::GetHasTextAngle is true, automaticReadingDirection is ignored and the reading orientation is chosen as the closest to ETextReader::SetTextAngle. Otherewise, To ensure the oriented rectangle obtained from the region is deterministic, the reader will always snap the orientation to the horizontal axis (changing the width and height accordingly).

Parameters
roiThe source ROI from which to extract the miniature image.
rectangleDefines the area within the source ROI to extract as the miniature image.
frameReference frame of the input region.
topologyLineIndexThe index of the ETopologyLine to use for text recognition constraints.

◆ Recognize() [10/20]

eVision::EasyDeepOCR::ETextLine eVision::EasyDeepOCR::ETextReader::Recognize ( const eVision::EBaseROI & roi,
const eVision::ERectangle & rectangle,
const eVision::EFrame & frame,
uint32_t topologyLineIndex,
bool automaticReadingDirection ) const

Recognizes a text within a miniature image and returns it as an ETextLine. The returned text will conform to the ETopologyLine if one is provided via the topologyLineIndex parameter. The miniature image can be provided directly or extracted from a larger ROI using an ERectangle or an ERegion. If the text in the miniature image is not oriented along the standard reading direction, setting automaticReadingDirection to true will attempt to detect and adjust for the correct reading orientation. When ETextReader::GetHasTextAngle is true, automaticReadingDirection is ignored and the reading orientation is chosen as the closest to ETextReader::SetTextAngle. Otherewise, To ensure the oriented rectangle obtained from the region is deterministic, the reader will always snap the orientation to the horizontal axis (changing the width and height accordingly).

Parameters
roiThe source ROI from which to extract the miniature image.
rectangleDefines the area within the source ROI to extract as the miniature image.
frameReference frame of the input region.
topologyLineIndexThe index of the ETopologyLine to use for text recognition constraints.
automaticReadingDirectionWhen true, automatically detects the reading direction of the text. Default is false.

◆ Recognize() [11/20]

eVision::EasyDeepOCR::ETextLine eVision::EasyDeepOCR::ETextReader::Recognize ( const eVision::EBaseROI & roi,
const eVision::ERectangle & rectangle,
uint32_t topologyLineIndex ) const

Recognizes a text within a miniature image and returns it as an ETextLine. The returned text will conform to the ETopologyLine if one is provided via the topologyLineIndex parameter. The miniature image can be provided directly or extracted from a larger ROI using an ERectangle or an ERegion. If the text in the miniature image is not oriented along the standard reading direction, setting automaticReadingDirection to true will attempt to detect and adjust for the correct reading orientation. When ETextReader::GetHasTextAngle is true, automaticReadingDirection is ignored and the reading orientation is chosen as the closest to ETextReader::SetTextAngle. Otherewise, To ensure the oriented rectangle obtained from the region is deterministic, the reader will always snap the orientation to the horizontal axis (changing the width and height accordingly).

Parameters
roiThe source ROI from which to extract the miniature image.
rectangleDefines the area within the source ROI to extract as the miniature image.
topologyLineIndexThe index of the ETopologyLine to use for text recognition constraints.

◆ Recognize() [12/20]

eVision::EasyDeepOCR::ETextLine eVision::EasyDeepOCR::ETextReader::Recognize ( const eVision::EBaseROI & roi,
const eVision::ERectangle & rectangle,
uint32_t topologyLineIndex,
bool automaticReadingDirection ) const

Recognizes a text within a miniature image and returns it as an ETextLine. The returned text will conform to the ETopologyLine if one is provided via the topologyLineIndex parameter. The miniature image can be provided directly or extracted from a larger ROI using an ERectangle or an ERegion. If the text in the miniature image is not oriented along the standard reading direction, setting automaticReadingDirection to true will attempt to detect and adjust for the correct reading orientation. When ETextReader::GetHasTextAngle is true, automaticReadingDirection is ignored and the reading orientation is chosen as the closest to ETextReader::SetTextAngle. Otherewise, To ensure the oriented rectangle obtained from the region is deterministic, the reader will always snap the orientation to the horizontal axis (changing the width and height accordingly).

Parameters
roiThe source ROI from which to extract the miniature image.
rectangleDefines the area within the source ROI to extract as the miniature image.
topologyLineIndexThe index of the ETopologyLine to use for text recognition constraints.
automaticReadingDirectionWhen true, automatically detects the reading direction of the text. Default is false.

◆ Recognize() [13/20]

eVision::EasyDeepOCR::ETextLine eVision::EasyDeepOCR::ETextReader::Recognize ( const eVision::EBaseROI & roi,
const eVision::ERegion & region ) const

Recognizes a text within a miniature image and returns it as an ETextLine. The returned text will conform to the ETopologyLine if one is provided via the topologyLineIndex parameter. The miniature image can be provided directly or extracted from a larger ROI using an ERectangle or an ERegion. If the text in the miniature image is not oriented along the standard reading direction, setting automaticReadingDirection to true will attempt to detect and adjust for the correct reading orientation. When ETextReader::GetHasTextAngle is true, automaticReadingDirection is ignored and the reading orientation is chosen as the closest to ETextReader::SetTextAngle. Otherewise, To ensure the oriented rectangle obtained from the region is deterministic, the reader will always snap the orientation to the horizontal axis (changing the width and height accordingly).

Parameters
roiThe source ROI from which to extract the miniature image.
regionDefines the area within the source ROI to extract as the miniature image.

◆ Recognize() [14/20]

eVision::EasyDeepOCR::ETextLine eVision::EasyDeepOCR::ETextReader::Recognize ( const eVision::EBaseROI & roi,
const eVision::ERegion & region,
bool automaticReadingDirection ) const

Recognizes a text within a miniature image and returns it as an ETextLine. The returned text will conform to the ETopologyLine if one is provided via the topologyLineIndex parameter. The miniature image can be provided directly or extracted from a larger ROI using an ERectangle or an ERegion. If the text in the miniature image is not oriented along the standard reading direction, setting automaticReadingDirection to true will attempt to detect and adjust for the correct reading orientation. When ETextReader::GetHasTextAngle is true, automaticReadingDirection is ignored and the reading orientation is chosen as the closest to ETextReader::SetTextAngle. Otherewise, To ensure the oriented rectangle obtained from the region is deterministic, the reader will always snap the orientation to the horizontal axis (changing the width and height accordingly).

Parameters
roiThe source ROI from which to extract the miniature image.
regionDefines the area within the source ROI to extract as the miniature image.
automaticReadingDirectionWhen true, automatically detects the reading direction of the text. Default is false.

◆ Recognize() [15/20]

eVision::EasyDeepOCR::ETextLine eVision::EasyDeepOCR::ETextReader::Recognize ( const eVision::EBaseROI & roi,
const eVision::ERegion & region,
const eVision::EFrame & frame ) const

Recognizes a text within a miniature image and returns it as an ETextLine. The returned text will conform to the ETopologyLine if one is provided via the topologyLineIndex parameter. The miniature image can be provided directly or extracted from a larger ROI using an ERectangle or an ERegion. If the text in the miniature image is not oriented along the standard reading direction, setting automaticReadingDirection to true will attempt to detect and adjust for the correct reading orientation. When ETextReader::GetHasTextAngle is true, automaticReadingDirection is ignored and the reading orientation is chosen as the closest to ETextReader::SetTextAngle. Otherewise, To ensure the oriented rectangle obtained from the region is deterministic, the reader will always snap the orientation to the horizontal axis (changing the width and height accordingly).

Parameters
roiThe source ROI from which to extract the miniature image.
regionDefines the area within the source ROI to extract as the miniature image.
frameReference frame of the input region.

◆ Recognize() [16/20]

eVision::EasyDeepOCR::ETextLine eVision::EasyDeepOCR::ETextReader::Recognize ( const eVision::EBaseROI & roi,
const eVision::ERegion & region,
const eVision::EFrame & frame,
bool automaticReadingDirection ) const

Recognizes a text within a miniature image and returns it as an ETextLine. The returned text will conform to the ETopologyLine if one is provided via the topologyLineIndex parameter. The miniature image can be provided directly or extracted from a larger ROI using an ERectangle or an ERegion. If the text in the miniature image is not oriented along the standard reading direction, setting automaticReadingDirection to true will attempt to detect and adjust for the correct reading orientation. When ETextReader::GetHasTextAngle is true, automaticReadingDirection is ignored and the reading orientation is chosen as the closest to ETextReader::SetTextAngle. Otherewise, To ensure the oriented rectangle obtained from the region is deterministic, the reader will always snap the orientation to the horizontal axis (changing the width and height accordingly).

Parameters
roiThe source ROI from which to extract the miniature image.
regionDefines the area within the source ROI to extract as the miniature image.
frameReference frame of the input region.
automaticReadingDirectionWhen true, automatically detects the reading direction of the text. Default is false.

◆ Recognize() [17/20]

eVision::EasyDeepOCR::ETextLine eVision::EasyDeepOCR::ETextReader::Recognize ( const eVision::EBaseROI & roi,
const eVision::ERegion & region,
const eVision::EFrame & frame,
uint32_t topologyLineIndex ) const

Recognizes a text within a miniature image and returns it as an ETextLine. The returned text will conform to the ETopologyLine if one is provided via the topologyLineIndex parameter. The miniature image can be provided directly or extracted from a larger ROI using an ERectangle or an ERegion. If the text in the miniature image is not oriented along the standard reading direction, setting automaticReadingDirection to true will attempt to detect and adjust for the correct reading orientation. When ETextReader::GetHasTextAngle is true, automaticReadingDirection is ignored and the reading orientation is chosen as the closest to ETextReader::SetTextAngle. Otherewise, To ensure the oriented rectangle obtained from the region is deterministic, the reader will always snap the orientation to the horizontal axis (changing the width and height accordingly).

Parameters
roiThe source ROI from which to extract the miniature image.
regionDefines the area within the source ROI to extract as the miniature image.
frameReference frame of the input region.
topologyLineIndexThe index of the ETopologyLine to use for text recognition constraints.

◆ Recognize() [18/20]

eVision::EasyDeepOCR::ETextLine eVision::EasyDeepOCR::ETextReader::Recognize ( const eVision::EBaseROI & roi,
const eVision::ERegion & region,
const eVision::EFrame & frame,
uint32_t topologyLineIndex,
bool automaticReadingDirection ) const

Recognizes a text within a miniature image and returns it as an ETextLine. The returned text will conform to the ETopologyLine if one is provided via the topologyLineIndex parameter. The miniature image can be provided directly or extracted from a larger ROI using an ERectangle or an ERegion. If the text in the miniature image is not oriented along the standard reading direction, setting automaticReadingDirection to true will attempt to detect and adjust for the correct reading orientation. When ETextReader::GetHasTextAngle is true, automaticReadingDirection is ignored and the reading orientation is chosen as the closest to ETextReader::SetTextAngle. Otherewise, To ensure the oriented rectangle obtained from the region is deterministic, the reader will always snap the orientation to the horizontal axis (changing the width and height accordingly).

Parameters
roiThe source ROI from which to extract the miniature image.
regionDefines the area within the source ROI to extract as the miniature image.
frameReference frame of the input region.
topologyLineIndexThe index of the ETopologyLine to use for text recognition constraints.
automaticReadingDirectionWhen true, automatically detects the reading direction of the text. Default is false.

◆ Recognize() [19/20]

eVision::EasyDeepOCR::ETextLine eVision::EasyDeepOCR::ETextReader::Recognize ( const eVision::EBaseROI & roi,
const eVision::ERegion & region,
uint32_t topologyLineIndex ) const

Recognizes a text within a miniature image and returns it as an ETextLine. The returned text will conform to the ETopologyLine if one is provided via the topologyLineIndex parameter. The miniature image can be provided directly or extracted from a larger ROI using an ERectangle or an ERegion. If the text in the miniature image is not oriented along the standard reading direction, setting automaticReadingDirection to true will attempt to detect and adjust for the correct reading orientation. When ETextReader::GetHasTextAngle is true, automaticReadingDirection is ignored and the reading orientation is chosen as the closest to ETextReader::SetTextAngle. Otherewise, To ensure the oriented rectangle obtained from the region is deterministic, the reader will always snap the orientation to the horizontal axis (changing the width and height accordingly).

Parameters
roiThe source ROI from which to extract the miniature image.
regionDefines the area within the source ROI to extract as the miniature image.
topologyLineIndexThe index of the ETopologyLine to use for text recognition constraints.

◆ Recognize() [20/20]

eVision::EasyDeepOCR::ETextLine eVision::EasyDeepOCR::ETextReader::Recognize ( const eVision::EBaseROI & roi,
const eVision::ERegion & region,
uint32_t topologyLineIndex,
bool automaticReadingDirection ) const

Recognizes a text within a miniature image and returns it as an ETextLine. The returned text will conform to the ETopologyLine if one is provided via the topologyLineIndex parameter. The miniature image can be provided directly or extracted from a larger ROI using an ERectangle or an ERegion. If the text in the miniature image is not oriented along the standard reading direction, setting automaticReadingDirection to true will attempt to detect and adjust for the correct reading orientation. When ETextReader::GetHasTextAngle is true, automaticReadingDirection is ignored and the reading orientation is chosen as the closest to ETextReader::SetTextAngle. Otherewise, To ensure the oriented rectangle obtained from the region is deterministic, the reader will always snap the orientation to the horizontal axis (changing the width and height accordingly).

Parameters
roiThe source ROI from which to extract the miniature image.
regionDefines the area within the source ROI to extract as the miniature image.
topologyLineIndexThe index of the ETopologyLine to use for text recognition constraints.
automaticReadingDirectionWhen true, automatically detects the reading direction of the text. Default is false.

◆ ResetLocationCustomModel()

void eVision::EasyDeepOCR::ETextReader::ResetLocationCustomModel ( )

Removes any location custom model that was previously set and use the default location model.

◆ ResetOptimization()

void eVision::EasyDeepOCR::ETextReader::ResetOptimization ( )

Forgets the optimal parameters previously set by ETextReader::Optimize.

◆ ResetOrientationCustomModel()

void eVision::EasyDeepOCR::ETextReader::ResetOrientationCustomModel ( )

Removes any orientation custom model that was previously set and use the default orientation model.

◆ ResetRecognitionCustomModel()

void eVision::EasyDeepOCR::ETextReader::ResetRecognitionCustomModel ( )

Removes any recognition custom model that was previously set and use the default recognition model.

◆ ResetTopology()

void eVision::EasyDeepOCR::ETextReader::ResetTopology ( )

Forgets the ETopology previously set.

◆ Save() [1/2]

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

Saves the ETextReader.

Parameters
pathPath where to save the ETextReader.

◆ Save() [2/2]

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

Saves the ETextReader.

Parameters
serializer

◆ SetExecutionSettings()

void eVision::EasyDeepOCR::ETextReader::SetExecutionSettings ( const eVision::EasyDeepLearning::EDeepLearningExecutionSettings & executionSettings)

◆ SetLocationCustomModel()

void eVision::EasyDeepOCR::ETextReader::SetLocationCustomModel ( const eVision::EasyDeepLearning::EDeepOCRTool & tool)

Sets a location custom model from a EDeepOCRTool object (user trained model).

Parameters
toolTrained EDeepOCRTool tool with EDeepOCRModel::EDeepOCRModel_Location model

Note that the location custom model will be serialized as part of the text reader.

◆ SetLocationCustomModelPath()

void eVision::EasyDeepOCR::ETextReader::SetLocationCustomModelPath ( const std::string & modelPath)

Sets a location custom model using the path to a saved EDeepOCRTool (user trained model).

Parameters
modelPathPath to a EDeepOCRTool tool.

Note that the location custom model will be serialized as part of the text reader.

◆ SetOrientationCustomModel()

void eVision::EasyDeepOCR::ETextReader::SetOrientationCustomModel ( const eVision::EasyDeepLearning::EDeepOCRTool & tool)

Sets an orientation custom model from a EDeepOCRTool object (user trained model).

Parameters
toolTrained EDeepOCRTool tool with EDeepOCRModel::EDeepOCRModel_Orientation model

Note that the orientation custom model will be serialized as part of the text reader.

◆ SetOrientationCustomModelPath()

void eVision::EasyDeepOCR::ETextReader::SetOrientationCustomModelPath ( const std::string & modelPath)

Sets an orientation custom model using the path to a saved EDeepOCRTool (user trained model).

Parameters
modelPathPath to a EDeepOCRTool tool.

Note that the orientation custom model will be serialized as part of the text reader.

◆ SetRecognitionCustomModel()

void eVision::EasyDeepOCR::ETextReader::SetRecognitionCustomModel ( const eVision::EasyDeepLearning::EDeepOCRTool & tool)

Sets a recognition custom model from a EDeepOCRTool object (user trained model).

Parameters
toolTrained EDeepOCRTool tool with EDeepOCRModel::EDeepOCRModel_Recognition model

Note that the recognition custom model will be serialized as part of the text reader.

◆ SetRecognitionCustomModelPath()

void eVision::EasyDeepOCR::ETextReader::SetRecognitionCustomModelPath ( const std::string & modelPath)

Sets a recognition custom model using the path to a saved EDeepOCRTool (user trained model).

Parameters
modelPathPath to a EDeepOCRTool tool.

Note that the recognition custom model will be serialized as part of the text reader.

◆ SetTextAngle()

void eVision::EasyDeepOCR::ETextReader::SetTextAngle ( float arg0)

Angle hint for the text to be found.

◆ SetTextLineHeight()

void eVision::EasyDeepOCR::ETextReader::SetTextLineHeight ( int minHeight,
int maxHeight )

Sets the range for the text line height. All returned text lines will have a height in the range [minHeight, maxHeight]. Any text line that does not fit this constraint, will be discarded. By default, it is not set, so no filtering is applied.

Parameters
minHeightLower bound for the line height range.
maxHeightUpper bound for the line height range.

◆ SetTopology()

void eVision::EasyDeepOCR::ETextReader::SetTopology ( const eVision::ETopology & topology)

◆ UnsetTextAngle()

void eVision::EasyDeepOCR::ETextReader::UnsetTextAngle ( )

Unsets the text angle hint.

Member Data Documentation

◆ wrappedClass_

CppWrapperInternal::WrappedClass eVision::EasyDeepOCR::ETextReader::wrappedClass_