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.
eVision.EBaseROI Image (self)
 Returns the image of the sample.
eVision.EBaseROI ROI (self)
 Returns the ROI enclosing the region of the sample.
eVision.EImageType AutomaticImageType (self)
 Returns the image type of eVision.EasyDeepOCR.ESample.GetImage when called without arguments.
str ImagePath (self)
 Path to the image of the sample.
 ImagePath (self, str value)
 Path to the image of the sample.
list[eVision._eVision.EasyDeepOCR.EText] Texts (self)
 List of texts.
 Texts (self, list[eVision._eVision.EasyDeepOCR.EText] value)
 List of texts.
eVision.ERegion Region (self)
 Region of the sample.
 Region (self, eVision.ERegion value)
 Region of the sample.
bool HasRegion (self)
 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

◆ AutomaticImageType()

eVision.EImageType eVision.EasyDeepOCR.ESample.AutomaticImageType ( self)

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

◆ 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.

◆ HasRegion()

bool eVision.EasyDeepOCR.ESample.HasRegion ( self)

Returns whether there is a region attached to this sample.

◆ Image()

eVision.EBaseROI eVision.EasyDeepOCR.ESample.Image ( self)

Returns the image of the sample.

◆ ImagePath() [1/2]

str eVision.EasyDeepOCR.ESample.ImagePath ( self)

Path to the image of the sample.

◆ ImagePath() [2/2]

eVision.EasyDeepOCR.ESample.ImagePath ( self,
str value )

Path to the image of the sample.

◆ 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.

◆ Region() [1/2]

eVision.ERegion eVision.EasyDeepOCR.ESample.Region ( self)

Region of the sample.

◆ Region() [2/2]

eVision.EasyDeepOCR.ESample.Region ( self,
eVision.ERegion value )

Region of the sample.

◆ 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.

◆ ROI()

eVision.EBaseROI eVision.EasyDeepOCR.ESample.ROI ( self)

Returns the ROI enclosing the region of the sample.

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

◆ 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.

◆ Texts() [1/2]

list[eVision._eVision.EasyDeepOCR.EText] eVision.EasyDeepOCR.ESample.Texts ( self)

List of texts.

◆ Texts() [2/2]

eVision.EasyDeepOCR.ESample.Texts ( self,
list[eVision._eVision.EasyDeepOCR.EText] value )

List of texts.