public class

TextBlockTopology

extends Object
java.lang.Object
   ↳ com.sap.cloud.mobile.fiori.ocr.TextBlockTopology

Class Overview

class to represent topology of the detected texts.

Summary

Public Constructors
TextBlockTopology(Collection<FioriOcrObservation.Element> elements)
Public Methods
List<FioriOcrObservation.Column> getCols()
get list of all detected columns in the topology
List<FioriOcrObservation.Element> getElements()
get list of all elements on the topology
FioriOcrObservation.Element getNextElementInColumn(FioriOcrObservation.Element element)
Get the next element in column major after given element
FioriOcrObservation.Element getNextElementInRow(FioriOcrObservation.Element element)
Get the next element in the row major after given element
FioriOcrObservation.Element getPrevElementInColumn(FioriOcrObservation.Element element)
Get the previous element in the column major before the given element
FioriOcrObservation.Element getPrevElementInRow(FioriOcrObservation.Element element)
Get the previous element in the row major before the given element
List<FioriOcrObservation.Row> getRows()
get list of all detected rows in the topology
void setAcceptableError(double acceptableError)
Set the acceptable error margin while creating rows and columns
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public TextBlockTopology (Collection<FioriOcrObservation.Element> elements)

Public Methods

public List<FioriOcrObservation.Column> getCols ()

get list of all detected columns in the topology

Returns
  • List

public List<FioriOcrObservation.Element> getElements ()

get list of all elements on the topology

Returns
  • List

public FioriOcrObservation.Element getNextElementInColumn (FioriOcrObservation.Element element)

Get the next element in column major after given element

Parameters
element FioriOcrObservation.Element

public FioriOcrObservation.Element getNextElementInRow (FioriOcrObservation.Element element)

Get the next element in the row major after given element

Parameters
element FioriOcrObservation.Element
Returns

public FioriOcrObservation.Element getPrevElementInColumn (FioriOcrObservation.Element element)

Get the previous element in the column major before the given element

Parameters
element FioriOcrObservation.Element

public FioriOcrObservation.Element getPrevElementInRow (FioriOcrObservation.Element element)

Get the previous element in the row major before the given element

Parameters
element FioriOcrObservation.Element

public List<FioriOcrObservation.Row> getRows ()

get list of all detected rows in the topology

Returns
  • List

public void setAcceptableError (double acceptableError)

Set the acceptable error margin while creating rows and columns

Parameters
acceptableError acceptable error margin in double