A sample is composed of an image, and optionally a region, together with one or several texts, which are visible in the image. These texts indicate what outputs are expected when calling ETextReader::Read on this image. A ESample is only meant to be contained in ESampleList. More...
#include <eVision/EasyOcr/EasyDeepOCR/ESample.h>
Public Member Functions | |
| ESample () | |
| Creates a ESample. | |
| ESample (const eVision::EasyDeepOCR::ESample &other) | |
| Creates a ESample. | |
| ESample (const std::string &path) | |
| Creates a ESample. | |
| ESample (const std::string &path, const std::vector< eVision::EasyDeepOCR::EText > &texts) | |
| Creates a ESample. | |
| ESample (const std::string &path, const eVision::ERegion ®ion) | |
| Creates a ESample. | |
| ESample (const std::string &path, const eVision::ERegion ®ion, const std::vector< eVision::EasyDeepOCR::EText > &texts) | |
| Creates a ESample. | |
| virtual | ~ESample () throw () |
| eVision::EasyDeepOCR::ESample & | operator= (const eVision::EasyDeepOCR::ESample &other) |
| Assignment operator. | |
| bool | operator== (const eVision::EasyDeepOCR::ESample &other) const |
| Checks if this ESample instance is strictly equal to another ESample instance. | |
| bool | operator!= (const eVision::EasyDeepOCR::ESample &other) const |
| Checks if this ESample instance is not equal to another ESample instance. | |
| bool | IsEqual (const eVision::EasyDeepOCR::ESample &other) const |
| Checks if this ESample instance is strictly equal to another ESample instance. | |
| void | Load (const std::string &path) |
| Loads the ESample. | |
| void | Load (eVision::ESerializer *serializer) |
| Loads the ESample. | |
| void | Save (const std::string &path) |
| Saves the ESample. | |
| void | Save (eVision::ESerializer *serializer) |
| Saves the ESample. | |
| const eVision::EBaseROI & | GetImage (eVision::EImageType imageType) const |
| Returns the image of the sample. | |
| const eVision::EBaseROI & | GetImage () const |
| Returns the image of the sample. | |
| const eVision::EBaseROI & | GetROI (eVision::EImageType imageType) const |
| Returns the ROI enclosing the region of the sample. If no region is defined, the full image is returned. | |
| const eVision::EBaseROI & | GetROI () const |
| Returns the ROI enclosing the region of the sample. If no region is defined, the full image is returned. | |
| eVision::EImageType | GetAutomaticImageType () const |
| Returns the image type of ESample::GetImage when called without arguments. | |
| void | SetImagePath (const std::string &path) |
| Path to the image of the sample. | |
| std::string | GetImagePath () const |
| Path to the image of the sample. | |
| void | ReplaceBasePath (const std::string &oldBasePath, const std::string &newBasePath) |
| Replaces the old base path with a new base path in the image path. Throws if the old base path is not contained in the image path. | |
| std::vector< eVision::EasyDeepOCR::EText > | GetTexts () const |
| List of texts. | |
| void | SetTexts (const std::vector< eVision::EasyDeepOCR::EText > &texts) |
| List of texts. | |
| void | SetRegion (const eVision::ERegion ®ion) |
| Region of the sample. | |
| eVision::ERegion | GetRegion () const |
| Region of the sample. | |
| bool | GetHasRegion () const |
| Returns whether there is a region attached to this sample. | |
| ESample (CppWrapperInternal::InternalConstructor) | |
Public Attributes | |
| CppWrapperInternal::WrappedClass | wrappedClass_ |
A sample is composed of an image, and optionally a region, together with one or several texts, which are visible in the image. These texts indicate what outputs are expected when calling ETextReader::Read on this image. A ESample is only meant to be contained in ESampleList.
License(s): EasyDeepOCR
| eVision::EasyDeepOCR::ESample::ESample | ( | ) |
Creates a ESample.
| eVision::EasyDeepOCR::ESample::ESample | ( | const eVision::EasyDeepOCR::ESample & | other | ) |
| eVision::EasyDeepOCR::ESample::ESample | ( | const std::string & | path | ) |
Creates a ESample.
| path | Path to the image. |
| eVision::EasyDeepOCR::ESample::ESample | ( | const std::string & | path, |
| const std::vector< eVision::EasyDeepOCR::EText > & | texts ) |
Creates a ESample.
| path | Path to the image. |
| texts | Texts of interest. |
| eVision::EasyDeepOCR::ESample::ESample | ( | const std::string & | path, |
| const eVision::ERegion & | region ) |
Creates a ESample.
| path | Path to the image. |
| region | Region containing the texts of interest. |
| eVision::EasyDeepOCR::ESample::ESample | ( | const std::string & | path, |
| const eVision::ERegion & | region, | ||
| const std::vector< eVision::EasyDeepOCR::EText > & | texts ) |
Creates a ESample.
| path | Path to the image. |
| region | Region containing the texts of interest. |
| texts | Texts of interest. |
|
virtual | ||||||||||||
| eVision::EasyDeepOCR::ESample::ESample | ( | CppWrapperInternal::InternalConstructor | ) |
| eVision::EImageType eVision::EasyDeepOCR::ESample::GetAutomaticImageType | ( | ) | const |
Returns the image type of ESample::GetImage when called without arguments.
| bool eVision::EasyDeepOCR::ESample::GetHasRegion | ( | ) | const |
Returns whether there is a region attached to this sample.
| const eVision::EBaseROI & eVision::EasyDeepOCR::ESample::GetImage | ( | ) | const |
Returns the image of the sample.
| const eVision::EBaseROI & eVision::EasyDeepOCR::ESample::GetImage | ( | eVision::EImageType | imageType | ) | const |
Returns the image of the sample.
| imageType | Specifies the image type for loading the sample image. If not provided, the image type will be automatically determined based on the sample image files. |
| std::string eVision::EasyDeepOCR::ESample::GetImagePath | ( | ) | const |
Path to the image of the sample.
| eVision::ERegion eVision::EasyDeepOCR::ESample::GetRegion | ( | ) | const |
Region of the sample.
| const eVision::EBaseROI & eVision::EasyDeepOCR::ESample::GetROI | ( | ) | const |
Returns the ROI enclosing the region of the sample. If no region is defined, the full image is returned.
| const eVision::EBaseROI & eVision::EasyDeepOCR::ESample::GetROI | ( | eVision::EImageType | imageType | ) | const |
Returns the ROI enclosing the region of the sample. If no region is defined, the full image is returned.
| imageType | Specifies the image type for loading the sample image. If not provided, the image type will be automatically determined based on the sample image files. |
| std::vector< eVision::EasyDeepOCR::EText > eVision::EasyDeepOCR::ESample::GetTexts | ( | ) | const |
List of texts.
| bool eVision::EasyDeepOCR::ESample::IsEqual | ( | const eVision::EasyDeepOCR::ESample & | other | ) | const |
| void eVision::EasyDeepOCR::ESample::Load | ( | const std::string & | path | ) |
| void eVision::EasyDeepOCR::ESample::Load | ( | eVision::ESerializer * | serializer | ) |
Loads the ESample.
| serializer |
| bool eVision::EasyDeepOCR::ESample::operator!= | ( | const eVision::EasyDeepOCR::ESample & | other | ) | const |
| eVision::EasyDeepOCR::ESample & eVision::EasyDeepOCR::ESample::operator= | ( | const eVision::EasyDeepOCR::ESample & | other | ) |
| bool eVision::EasyDeepOCR::ESample::operator== | ( | const eVision::EasyDeepOCR::ESample & | other | ) | const |
Checks if this ESample instance is strictly equal to another ESample instance.
| other | Reference to the ESample instance to compare with |
This operator is stricly equivalent to the ESample::IsEqual method.
| void eVision::EasyDeepOCR::ESample::ReplaceBasePath | ( | const std::string & | oldBasePath, |
| const std::string & | newBasePath ) |
Replaces the old base path with a new base path in the image path. Throws if the old base path is not contained in the image path.
| oldBasePath | Old base path to be replaced. |
| newBasePath | New path to replace the old base path with. |
| void eVision::EasyDeepOCR::ESample::Save | ( | const std::string & | path | ) |
| void eVision::EasyDeepOCR::ESample::Save | ( | eVision::ESerializer * | serializer | ) |
Saves the ESample.
| serializer |
| void eVision::EasyDeepOCR::ESample::SetImagePath | ( | const std::string & | path | ) |
Path to the image of the sample.
| void eVision::EasyDeepOCR::ESample::SetRegion | ( | const eVision::ERegion & | region | ) |
Region of the sample.
| void eVision::EasyDeepOCR::ESample::SetTexts | ( | const std::vector< eVision::EasyDeepOCR::EText > & | texts | ) |
List of texts.
| CppWrapperInternal::WrappedClass eVision::EasyDeepOCR::ESample::wrappedClass_ |