eVision Python API
Loading...
Searching...
No Matches
eVision.EasyDeepOCR.ESample Class Reference

A sample is composed of an image, and optionally a region, together with one or several texts, which are visible in the image. More...

Public Member Functions

None __init__ (self)
 Creates a eVision.EasyDeepOCR.ESample.
None __init__ (self, eVision.EasyDeepOCR.ESample other)
 Creates a eVision.EasyDeepOCR.ESample.
None __init__ (self, str path)
 Creates a eVision.EasyDeepOCR.ESample.
None __init__ (self, str path, list[eVision._eVision.EasyDeepOCR.EText] texts)
 Creates a eVision.EasyDeepOCR.ESample.
None __init__ (self, str path, eVision.ERegion region)
 Creates a eVision.EasyDeepOCR.ESample.
None __init__ (self, str path, eVision.ERegion region, list[eVision._eVision.EasyDeepOCR.EText] texts)
 Creates a eVision.EasyDeepOCR.ESample.
bool IsEqual (self, eVision.EasyDeepOCR.ESample other)
 Checks if this eVision.EasyDeepOCR.ESample instance is strictly equal to another eVision.EasyDeepOCR.ESample instance.
None Load (self, str path)
 Loads the eVision.EasyDeepOCR.ESample.
None Load (self, eVision.ESerializer|None serializer)
 Loads the eVision.EasyDeepOCR.ESample.
None Save (self, str path)
 Saves the eVision.EasyDeepOCR.ESample.
None Save (self, eVision.ESerializer|None serializer)
 Saves the eVision.EasyDeepOCR.ESample.
eVision.EBaseROI GetImage (self, eVision.EImageType imageType)
 Returns the image of the sample.
eVision.EBaseROI GetROI (self, eVision.EImageType imageType)
 Returns the ROI enclosing the region of the sample.
None ReplaceBasePath (self, str oldBasePath, str newBasePath)
 Replaces the old base path with a new base path in the image path.

Properties

 Image = property(_Image__getter, None)
 Returns the image of the sample.
 ROI = property(_ROI__getter, None)
 Returns the ROI enclosing the region of the sample.
 AutomaticImageType = property(_AutomaticImageType__getter, None)
 Returns the image type of eVision.EasyDeepOCR.ESample.GetImage when called without arguments.
 ImagePath = property(_ImagePath__getter, _ImagePath__setter)
 Path to the image of the sample.
 Texts = property(_Texts__getter, _Texts__setter)
 List of texts.
 Region = property(_Region__getter, _Region__setter)
 Region of the sample.
 HasRegion = property(_HasRegion__getter, None)
 Returns whether there is a region attached to this sample.

Detailed Description

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 eVision.EasyDeepOCR.ETextReader.Read on this image. A eVision.EasyDeepOCR.ESample is only meant to be contained in eVision.EasyDeepOCR.ESampleList.

Remarks:

License(s): EasyDeepOCR

Constructor & Destructor Documentation

◆ __init__() [1/6]

None eVision.EasyDeepOCR.ESample.__init__ ( self)

◆ __init__() [2/6]

None eVision.EasyDeepOCR.ESample.__init__ ( self,
eVision.EasyDeepOCR.ESample other )

Creates a eVision.EasyDeepOCR.ESample.

Parameters
otherAnother eVision.EasyDeepOCR.ESample to be copied in the new eVision.EasyDeepOCR.ESample.

◆ __init__() [3/6]

None eVision.EasyDeepOCR.ESample.__init__ ( self,
str path )

Creates a eVision.EasyDeepOCR.ESample.

Parameters
pathPath to the image.

◆ __init__() [4/6]

None eVision.EasyDeepOCR.ESample.__init__ ( self,
str path,
list[eVision._eVision.EasyDeepOCR.EText] texts )

Creates a eVision.EasyDeepOCR.ESample.

Parameters
pathPath to the image.
textsTexts of interest.

◆ __init__() [5/6]

None eVision.EasyDeepOCR.ESample.__init__ ( self,
str path,
eVision.ERegion region )

Creates a eVision.EasyDeepOCR.ESample.

Parameters
pathPath to the image.
regionRegion containing the texts of interest.

◆ __init__() [6/6]

None eVision.EasyDeepOCR.ESample.__init__ ( self,
str path,
eVision.ERegion region,
list[eVision._eVision.EasyDeepOCR.EText] texts )

Creates a eVision.EasyDeepOCR.ESample.

Parameters
pathPath to the image.
regionRegion containing the texts of interest.
textsTexts of interest.

Member Function Documentation

◆ GetImage()

eVision.EBaseROI eVision.EasyDeepOCR.ESample.GetImage ( self,
eVision.EImageType imageType )

Returns the image of the sample.

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

◆ GetROI()

eVision.EBaseROI eVision.EasyDeepOCR.ESample.GetROI ( self,
eVision.EImageType imageType )

Returns the ROI enclosing the region of the sample.

If no region is defined, the full image is returned.

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

◆ IsEqual()

bool eVision.EasyDeepOCR.ESample.IsEqual ( self,
eVision.EasyDeepOCR.ESample other )

Checks if this eVision.EasyDeepOCR.ESample instance is strictly equal to another eVision.EasyDeepOCR.ESample instance.

Parameters
otherReference to the eVision.EasyDeepOCR.ESample instance to compare with

◆ Load() [1/2]

None eVision.EasyDeepOCR.ESample.Load ( self,
eVision.ESerializer | None serializer )

Loads the eVision.EasyDeepOCR.ESample.

Parameters
serializer-

◆ Load() [2/2]

None eVision.EasyDeepOCR.ESample.Load ( self,
str path )

Loads the eVision.EasyDeepOCR.ESample.

Parameters
pathPath where to save the eVision.EasyDeepOCR.ESample.

◆ ReplaceBasePath()

None eVision.EasyDeepOCR.ESample.ReplaceBasePath ( self,
str oldBasePath,
str 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.

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

◆ Save() [1/2]

None eVision.EasyDeepOCR.ESample.Save ( self,
eVision.ESerializer | None serializer )

Saves the eVision.EasyDeepOCR.ESample.

Parameters
serializer-

◆ Save() [2/2]

None eVision.EasyDeepOCR.ESample.Save ( self,
str path )

Saves the eVision.EasyDeepOCR.ESample.

Parameters
pathPath where to save the eVision.EasyDeepOCR.ESample.

Property Documentation

◆ AutomaticImageType

eVision.EasyDeepOCR.ESample.AutomaticImageType = property(_AutomaticImageType__getter, None)
static

Returns the image type of eVision.EasyDeepOCR.ESample.GetImage when called without arguments.

◆ HasRegion

eVision.EasyDeepOCR.ESample.HasRegion = property(_HasRegion__getter, None)
static

Returns whether there is a region attached to this sample.

◆ Image

eVision.EasyDeepOCR.ESample.Image = property(_Image__getter, None)
static

Returns the image of the sample.

◆ ImagePath

eVision.EasyDeepOCR.ESample.ImagePath = property(_ImagePath__getter, _ImagePath__setter)
static

Path to the image of the sample.

◆ Region

eVision.EasyDeepOCR.ESample.Region = property(_Region__getter, _Region__setter)
static

Region of the sample.

◆ ROI

eVision.EasyDeepOCR.ESample.ROI = property(_ROI__getter, None)
static

Returns the ROI enclosing the region of the sample.

If no region is defined, the full image is returned.

◆ Texts

eVision.EasyDeepOCR.ESample.Texts = property(_Texts__getter, _Texts__setter)
static

List of texts.