Class ERFilter
Base class for 1st and 2nd stages of Neumann and Matas scene text detection algorithm
public abstract class ERFilter : SharedPtrObject, IDisposable
- Inheritance
-
ERFilter
- Implements
- Derived
- Inherited Members
Constructors
ERFilter()
protected ERFilter()
Methods
DisposeObject()
Release all the unmanaged memory associate with this ERFilter
protected override void DisposeObject()
ERGrouping(IInputArray, IInputArrayOfArrays, VectorOfERStat[], GroupingMethod, string, float)
Find groups of Extremal Regions that are organized as text blocks.
public static Rectangle[] ERGrouping(IInputArray image, IInputArrayOfArrays channels, VectorOfERStat[] erstats, ERFilter.GroupingMethod groupMethods = GroupingMethod.OrientationHoriz, string groupingTrainedFileName = null, float minProbability = 0.5)
Parameters
image
IInputArrayThe image where ER grouping is to be perform on
channels
IInputArrayOfArraysArray of single channel images from which the regions were extracted
erstats
VectorOfERStat[]Vector of ER’s retrieved from the ERFilter algorithm from each channel
groupMethods
ERFilter.GroupingMethodThe grouping methods
groupingTrainedFileName
stringThe XML or YAML file with the classifier model (e.g. trained_classifier_erGrouping.xml)
minProbability
floatThe minimum probability for accepting a group.
Returns
- Rectangle[]
The output of the algorithm that indicates the text regions
Run(IInputArray, VectorOfERStat)
Takes image on input and returns the selected regions in a vector of ERStat only distinctive ERs which correspond to characters are selected by a sequential classifier
public void Run(IInputArray image, VectorOfERStat regions)
Parameters
image
IInputArraySingle channel image CV_8UC1
regions
VectorOfERStatOutput for the 1st stage and Input/Output for the 2nd. The selected Extremal Regions are stored here.