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

Holds a list of samples. A sample is composed of an image, and optionally a region, together with one or several text strings of interests. These text strings indicate what outputs are expected when calling ETextReader::Read on this image. A ESampleList is meant to be used with ETextReader::Optimize, to specialize and increase the processing speed of subsequent calls to ETextReader::Read. For the ESampleList to be consistent, all the texts must belong to the same context, i.e. all the texts must share similar geometrical properties. More...

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

Collaboration diagram for eVision::EasyDeepOCR::ESampleList:

Public Member Functions

 ESampleList ()
 Creates a ESampleList.
 ESampleList (const eVision::EasyDeepOCR::ESampleList &other)
 Creates a ESampleList.
 ESampleList (const std::vector< eVision::EasyDeepOCR::ESample > &samples)
 Creates a ESampleList.
virtual ~ESampleList () throw ()
eVision::EasyDeepOCR::ESampleList & operator= (const eVision::EasyDeepOCR::ESampleList &other)
 Assignment operator.
bool operator== (const eVision::EasyDeepOCR::ESampleList &other) const
 Checks if this ESampleList instance is strictly equal to another ESampleList instance.
bool operator!= (const eVision::EasyDeepOCR::ESampleList &other) const
 Checks if this ESampleList instance is not equal to another ESampleList instance.
bool IsEqual (const eVision::EasyDeepOCR::ESampleList &other) const
 Checks if this ESampleList instance is strictly equal to another ESampleList instance.
void Load (const std::string &path)
 Loads the ESampleList.
void Load (eVision::ESerializer *serializer)
 Loads the ESampleList.
void Save (const std::string &path)
 Saves the ESampleList.
void Save (eVision::ESerializer *serializer)
 Saves the ESampleList.
void ReplaceBasePath (const std::string &oldBasePath, const std::string &newBasePath)
 Replaces the old base path with a new base path in the image path of all ESample of the list. Throws if the old base path is not contained in one of the image paths.
std::string GetCommonBasePath () const
 Returns the longuest base path shared by the all the image paths of the ESample in the list.
std::vector< eVision::EasyDeepOCR::ESample > GetSamples () const
 List of ESample.
void SetSamples (const std::vector< eVision::EasyDeepOCR::ESample > &list)
 List of ESample.
eVision::EImageType GetAutomaticImageType () const
 Returns the automatically deduced type of the sample images, provided it is the same for all samples in the list. Throws an exception otherwise.
 ESampleList (CppWrapperInternal::InternalConstructor)

Public Attributes

CppWrapperInternal::WrappedClass wrappedClass_

Detailed Description

Holds a list of samples. A sample is composed of an image, and optionally a region, together with one or several text strings of interests. These text strings indicate what outputs are expected when calling ETextReader::Read on this image. A ESampleList is meant to be used with ETextReader::Optimize, to specialize and increase the processing speed of subsequent calls to ETextReader::Read. For the ESampleList to be consistent, all the texts must belong to the same context, i.e. all the texts must share similar geometrical properties.

License(s): EasyDeepOCR

Constructor & Destructor Documentation

◆ ESampleList() [1/4]

eVision::EasyDeepOCR::ESampleList::ESampleList ( )

Creates a ESampleList.

◆ ESampleList() [2/4]

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

Creates a ESampleList.

Parameters
otherAnother ESampleList to be copied in the new ESampleList.

◆ ESampleList() [3/4]

eVision::EasyDeepOCR::ESampleList::ESampleList ( const std::vector< eVision::EasyDeepOCR::ESample > & samples)

Creates a ESampleList.

Parameters
samplesList of ESample to add to the ESampleList.

◆ ~ESampleList()

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

◆ ESampleList() [4/4]

eVision::EasyDeepOCR::ESampleList::ESampleList ( CppWrapperInternal::InternalConstructor )

Member Function Documentation

◆ GetAutomaticImageType()

eVision::EImageType eVision::EasyDeepOCR::ESampleList::GetAutomaticImageType ( ) const

Returns the automatically deduced type of the sample images, provided it is the same for all samples in the list. Throws an exception otherwise.

◆ GetCommonBasePath()

std::string eVision::EasyDeepOCR::ESampleList::GetCommonBasePath ( ) const

Returns the longuest base path shared by the all the image paths of the ESample in the list.

◆ GetSamples()

std::vector< eVision::EasyDeepOCR::ESample > eVision::EasyDeepOCR::ESampleList::GetSamples ( ) const

List of ESample.

◆ IsEqual()

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

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

Parameters
otherReference to the ESampleList instance to compare with

◆ Load() [1/2]

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

Loads the ESampleList.

Parameters
pathPath where to save the ESampleList.

◆ Load() [2/2]

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

Loads the ESampleList.

Parameters
serializer

◆ operator!=()

bool eVision::EasyDeepOCR::ESampleList::operator!= ( const eVision::EasyDeepOCR::ESampleList & other) const

Checks if this ESampleList instance is not equal to another ESampleList instance.

Parameters
otherReference to the ESampleList instance to compare with

◆ operator=()

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

Assignment operator.

Parameters
otherAnother ESampleList to be assigned in the new ESampleList.

◆ operator==()

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

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

Parameters
otherReference to the ESampleList instance to compare with

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

◆ ReplaceBasePath()

void eVision::EasyDeepOCR::ESampleList::ReplaceBasePath ( const std::string & oldBasePath,
const std::string & newBasePath )

Replaces the old base path with a new base path in the image path of all ESample of the list. Throws if the old base path is not contained in one of the image paths.

Parameters
oldBasePathOld base path to be replaced.
newBasePathNew path to replace the old base path with.

◆ Save() [1/2]

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

Saves the ESampleList.

Parameters
pathPath where to save the ESampleList.

◆ Save() [2/2]

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

Saves the ESampleList.

Parameters
serializer

◆ SetSamples()

void eVision::EasyDeepOCR::ESampleList::SetSamples ( const std::vector< eVision::EasyDeepOCR::ESample > & list)

List of ESample.

Member Data Documentation

◆ wrappedClass_

CppWrapperInternal::WrappedClass eVision::EasyDeepOCR::ESampleList::wrappedClass_