C# Class Ocronet.Dynamic.Interfaces.IGrouper

Inheritance: IComponent
显示文件 Open project: nickun/OCRonet Class Usage Examples

Public Methods

Method Description
BoundingBox ( int index ) : System.Drawing.Rect

Get the bounding box for the group "index".

ClearLattice ( ) : void

Clear the lattice to allow constructing a new lattice.

End ( int index ) : int

Return the last segment

Extract ( Bytearray outa, Bytearray source, byte dflt, int index, int grow ) : void
Extract ( Floatarray outa, Floatarray source, float dflt, int index, int grow ) : void
ExtractSliced ( Bytearray outa, Bytearray mask, Bytearray source, int index, int grow ) : void
ExtractSliced ( Bytearray outa, Bytearray source, byte dflt, int index, int grow ) : void
ExtractSliced ( Floatarray outa, Bytearray mask, Floatarray source, int index, int grow ) : void
ExtractSliced ( Floatarray outa, Floatarray source, float dflt, int index, int grow ) : void
ExtractWithMask ( Bytearray outa, Bytearray mask, Bytearray source, int index, int grow ) : void
ExtractWithMask ( Floatarray outa, Bytearray mask, Floatarray source, int index, int grow ) : void
GetGtClass ( int index ) : int
GetGtIndex ( int index ) : int
GetLattice ( IGenericFst fst ) : void

Extract the lattice corresponding to the classifications stored in the Grouper.

GetMask ( System.Drawing.Rect &r, Bytearray &outmask, int index, int margin ) : void

Get the bounding rectangle and mask for group "index". Optionally, expand the mask by the given margin.

GetMaskAt ( Bytearray &outmask, int index, System.Drawing.Rect b ) : void

Get the mask around a given rectangle.

GetSegments ( Intarray result, int index ) : void

Return a list of all segments

Length ( ) : int

Number of groups generated.

PixelSpace ( int i ) : int

Space handling. For any component, pixelSpace gets the amount of subsequent space (-1 for the last component).

SetCSegmentation ( Intarray segmentation ) : void

Set the grouper for iterating over a pre-segmented image (i.e., one group per input segment).

SetClass ( int index, int cls, float cost ) : void

Set the cost for classifying group "index" as class cls.

SetClass ( int index, string cls, float cost ) : void

Set the cost for classifying group "index" as a sequence of strings

SetSegmentation ( Intarray segmentation ) : void

Set the grouper for iterating over the elements of the segmentation.

SetSegmentationAndGt ( Intarray segmentation, Intarray cseg, string &text ) : void

Set the grouper for iterating over the elements of the segmentation; This also computes the ground truth alignment.

SetSpaceCost ( int index, float yes, float no ) : void

Sets the costs associated with inserting a space after the character and not inserting the space.

Start ( int index ) : int

Method Details

BoundingBox() public abstract method

Get the bounding box for the group "index".
public abstract BoundingBox ( int index ) : System.Drawing.Rect
index int
return System.Drawing.Rect

ClearLattice() public abstract method

Clear the lattice to allow constructing a new lattice.
public abstract ClearLattice ( ) : void
return void

End() public abstract method

Return the last segment
public abstract End ( int index ) : int
index int
return int

Extract() public abstract method

public abstract Extract ( Bytearray outa, Bytearray source, byte dflt, int index, int grow ) : void
outa Bytearray
source Bytearray
dflt byte
index int
grow int
return void

Extract() public abstract method

public abstract Extract ( Floatarray outa, Floatarray source, float dflt, int index, int grow ) : void
outa Floatarray
source Floatarray
dflt float
index int
grow int
return void

ExtractSliced() public abstract method

public abstract ExtractSliced ( Bytearray outa, Bytearray mask, Bytearray source, int index, int grow ) : void
outa Bytearray
mask Bytearray
source Bytearray
index int
grow int
return void

ExtractSliced() public abstract method

public abstract ExtractSliced ( Bytearray outa, Bytearray source, byte dflt, int index, int grow ) : void
outa Bytearray
source Bytearray
dflt byte
index int
grow int
return void

ExtractSliced() public abstract method

public abstract ExtractSliced ( Floatarray outa, Bytearray mask, Floatarray source, int index, int grow ) : void
outa Floatarray
mask Bytearray
source Floatarray
index int
grow int
return void

ExtractSliced() public abstract method

public abstract ExtractSliced ( Floatarray outa, Floatarray source, float dflt, int index, int grow ) : void
outa Floatarray
source Floatarray
dflt float
index int
grow int
return void

ExtractWithMask() public abstract method

public abstract ExtractWithMask ( Bytearray outa, Bytearray mask, Bytearray source, int index, int grow ) : void
outa Bytearray
mask Bytearray
source Bytearray
index int
grow int
return void

ExtractWithMask() public abstract method

public abstract ExtractWithMask ( Floatarray outa, Bytearray mask, Floatarray source, int index, int grow ) : void
outa Floatarray
mask Bytearray
source Floatarray
index int
grow int
return void

GetGtClass() public abstract method

public abstract GetGtClass ( int index ) : int
index int
return int

GetGtIndex() public abstract method

public abstract GetGtIndex ( int index ) : int
index int
return int

GetLattice() public abstract method

Extract the lattice corresponding to the classifications stored in the Grouper.
public abstract GetLattice ( IGenericFst fst ) : void
fst IGenericFst
return void

GetMask() public abstract method

Get the bounding rectangle and mask for group "index". Optionally, expand the mask by the given margin.
public abstract GetMask ( System.Drawing.Rect &r, Bytearray &outmask, int index, int margin ) : void
r System.Drawing.Rect
outmask Bytearray
index int
margin int
return void

GetMaskAt() public abstract method

Get the mask around a given rectangle.
public abstract GetMaskAt ( Bytearray &outmask, int index, System.Drawing.Rect b ) : void
outmask Bytearray
index int
b System.Drawing.Rect
return void

GetSegments() public abstract method

Return a list of all segments
public abstract GetSegments ( Intarray result, int index ) : void
result Intarray
index int
return void

Length() public abstract method

Number of groups generated.
public abstract Length ( ) : int
return int

PixelSpace() public abstract method

Space handling. For any component, pixelSpace gets the amount of subsequent space (-1 for the last component).
public abstract PixelSpace ( int i ) : int
i int
return int

SetCSegmentation() public abstract method

Set the grouper for iterating over a pre-segmented image (i.e., one group per input segment).
public abstract SetCSegmentation ( Intarray segmentation ) : void
segmentation Intarray
return void

SetClass() public method

Set the cost for classifying group "index" as class cls.
public SetClass ( int index, int cls, float cost ) : void
index int
cls int
cost float
return void

SetClass() public abstract method

Set the cost for classifying group "index" as a sequence of strings
public abstract SetClass ( int index, string cls, float cost ) : void
index int
cls string
cost float
return void

SetSegmentation() public abstract method

Set the grouper for iterating over the elements of the segmentation.
public abstract SetSegmentation ( Intarray segmentation ) : void
segmentation Intarray
return void

SetSegmentationAndGt() public abstract method

Set the grouper for iterating over the elements of the segmentation; This also computes the ground truth alignment.
public abstract SetSegmentationAndGt ( Intarray segmentation, Intarray cseg, string &text ) : void
segmentation Intarray
cseg Intarray
text string
return void

SetSpaceCost() public abstract method

Sets the costs associated with inserting a space after the character and not inserting the space.
public abstract SetSpaceCost ( int index, float yes, float no ) : void
index int
yes float
no float
return void

Start() public abstract method

public abstract Start ( int index ) : int
index int
return int