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>
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_ |
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
| eVision::EasyDeepOCR::ESampleList::ESampleList | ( | ) |
Creates a ESampleList.
| eVision::EasyDeepOCR::ESampleList::ESampleList | ( | const eVision::EasyDeepOCR::ESampleList & | other | ) |
Creates a ESampleList.
| other | Another ESampleList to be copied in the new ESampleList. |
| eVision::EasyDeepOCR::ESampleList::ESampleList | ( | const std::vector< eVision::EasyDeepOCR::ESample > & | samples | ) |
Creates a ESampleList.
| samples | List of ESample to add to the ESampleList. |
|
virtual | ||||||||||||
| eVision::EasyDeepOCR::ESampleList::ESampleList | ( | CppWrapperInternal::InternalConstructor | ) |
| 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.
| 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.
| std::vector< eVision::EasyDeepOCR::ESample > eVision::EasyDeepOCR::ESampleList::GetSamples | ( | ) | const |
List of ESample.
| bool eVision::EasyDeepOCR::ESampleList::IsEqual | ( | const eVision::EasyDeepOCR::ESampleList & | other | ) | const |
Checks if this ESampleList instance is strictly equal to another ESampleList instance.
| other | Reference to the ESampleList instance to compare with |
| void eVision::EasyDeepOCR::ESampleList::Load | ( | const std::string & | path | ) |
Loads the ESampleList.
| path | Path where to save the ESampleList. |
| void eVision::EasyDeepOCR::ESampleList::Load | ( | eVision::ESerializer * | serializer | ) |
Loads the ESampleList.
| serializer |
| bool eVision::EasyDeepOCR::ESampleList::operator!= | ( | const eVision::EasyDeepOCR::ESampleList & | other | ) | const |
Checks if this ESampleList instance is not equal to another ESampleList instance.
| other | Reference to the ESampleList instance to compare with |
| eVision::EasyDeepOCR::ESampleList & eVision::EasyDeepOCR::ESampleList::operator= | ( | const eVision::EasyDeepOCR::ESampleList & | other | ) |
Assignment operator.
| other | Another ESampleList to be assigned in the new ESampleList. |
| bool eVision::EasyDeepOCR::ESampleList::operator== | ( | const eVision::EasyDeepOCR::ESampleList & | other | ) | const |
Checks if this ESampleList instance is strictly equal to another ESampleList instance.
| other | Reference to the ESampleList instance to compare with |
This operator is stricly equivalent to the ESampleList::IsEqual method.
| 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.
| oldBasePath | Old base path to be replaced. |
| newBasePath | New path to replace the old base path with. |
| void eVision::EasyDeepOCR::ESampleList::Save | ( | const std::string & | path | ) |
Saves the ESampleList.
| path | Path where to save the ESampleList. |
| void eVision::EasyDeepOCR::ESampleList::Save | ( | eVision::ESerializer * | serializer | ) |
Saves the ESampleList.
| serializer |
| void eVision::EasyDeepOCR::ESampleList::SetSamples | ( | const std::vector< eVision::EasyDeepOCR::ESample > & | list | ) |
List of ESample.
| CppWrapperInternal::WrappedClass eVision::EasyDeepOCR::ESampleList::wrappedClass_ |