ReadFramework
rdf::FormFeatures Class Reference

#include <FormAnalysis.h>

Inheritance diagram for rdf::FormFeatures:
Collaboration diagram for rdf::FormFeatures:

Public Member Functions

 FormFeatures ()
 
 FormFeatures (const cv::Mat &img, const cv::Mat &mask=cv::Mat())
 
void setInputImg (const cv::Mat &img)
 
void setMask (const cv::Mat &mask)
 
bool isEmpty () const override
 Returns true if the module was initialized with the default constructor. Note, if empty is true, nothing can be computed. More...
 
bool compute () override
 Runs the algorithm implemented by the module. More...
 
bool computeBinaryInput ()
 
bool readTemplate (QSharedPointer< rdf::FormFeatures > templateForm)
 
bool estimateRoughAlignment (bool useBinaryImg=false)
 
cv::Mat drawAlignment (cv::Mat img=cv::Mat())
 
cv::Mat drawMatchedForm (cv::Mat img=cv::Mat(), float t=10.0)
 
cv::Mat drawLinesNotUsedForm (cv::Mat img=cv::Mat(), float t=10.0)
 
cv::Mat drawLines (cv::Mat img=cv::Mat(), float t=10.0)
 
cv::Mat drawMaxClique (cv::Mat img=cv::Mat(), float t=10.0, int idx=0)
 
cv::Mat drawMaxCliqueNeighbours (int cellIdx, AssociationGraphNode::LinePosition lp, int nodeCnt=-1, cv::Mat img=cv::Mat(), float t=10.0)
 
QSharedPointer< rdf::TableRegiontableRegion ()
 
QSharedPointer< rdf::TableRegiontableRegionTemplate ()
 
QVector< QSharedPointer< rdf::TableCellRaw > > createRawTableFromTemplate ()
 
void createAssociationGraphNodes (QVector< QSharedPointer< rdf::TableCellRaw >> cellsR)
 
void createReducedAssociationGraphNodes (QVector< QSharedPointer< rdf::TableCellRaw >> cellsR)
 
QVector< QSharedPointer< rdf::AssociationGraphNode > > mergeColinearNodes (QVector< QSharedPointer< rdf::AssociationGraphNode >> &tmpNodes)
 
void createAssociationGraph ()
 
bool ** adjacencyMatrix (const QVector< QSharedPointer< rdf::AssociationGraphNode >> &associationGraphNodes)
 
void findMaxCliques ()
 
void createTableFromMaxClique (const QVector< QSharedPointer< rdf::TableCell >> &cells)
 
void createTableFromMaxCliqueReduced (const QVector< QSharedPointer< rdf::TableCell >> &cells)
 
QVector< QSet< int > > getMaxCliqueHor () const
 
QVector< QSet< int > > getMaxCliqueVer () const
 
bool matchTemplate ()
 
rdf::LineCandidates findLineCandidates (rdf::Line l, double distThreshold, bool horizontal=true)
 
double findMinWidth (QVector< QSharedPointer< rdf::TableCellRaw >> cellsR, int cellIdx, int neighbour)
 
rdf::Polygon createPolygon (rdf::Line tl, rdf::Line ll, rdf::Line rl, rdf::Line bl)
 
void createCellfromLineCandidates (QVector< QSharedPointer< rdf::TableCellRaw >> cellsR)
 
bool isEmptyLines () const
 
bool isEmptyTable () const
 
bool setTemplateName (QString s)
 
QString templateName () const
 
cv::Size sizeImg () const
 
void setSize (cv::Size s)
 
QVector< rdf::LinehorLines () const
 
void setHorLines (const QVector< rdf::Line > &h)
 
QVector< rdf::LineverLines () const
 
void setVerLines (const QVector< rdf::Line > &v)
 
QVector< rdf::LineusedHorLines () const
 
QVector< rdf::LinenotUsedHorLines () const
 
QVector< rdf::LinefilterHorLines (double minOverlap=0.1, double distThreshold=20) const
 
QVector< rdf::LineuseVerLines () const
 
QVector< rdf::LinenotUseVerLines () const
 
QVector< rdf::LinefilterVerLines (double minOverlap=0.1, double distThreshold=20) const
 
double lineDistance (rdf::Line templateLine, rdf::Line formLine, double minOverlap=0.1, bool horizontal=true)
 
cv::Point offset () const
 
double error () const
 
QSharedPointer< FormFeaturesConfigconfig () const
 
void setConfig (QSharedPointer< FormFeaturesConfig > c)
 
cv::Mat binaryImage () const
 
void setEstimateSkew (bool s)
 
QString toString () const override
 Converts the module's parameters and results to a string. More...
 
void setFormName (QString s)
 
QString formName () const
 
void setCells (QVector< QSharedPointer< rdf::TableCell >> c)
 
QVector< QSharedPointer< rdf::TableCell > > cells () const
 
void setRegion (QSharedPointer< rdf::TableRegion > r)
 
QSharedPointer< rdf::TableRegionregion () const
 
void setSeparators (QSharedPointer< rdf::Region > r)
 
- Public Member Functions inherited from rdf::Module
 Module ()
 Default constructor Initializes a new instance of the Module class. More...
 
virtual QString name () const
 Returns the module's name. More...
 
virtual void setConfig (QSharedPointer< ModuleConfig > config)
 
QSharedPointer< ModuleConfigconfig () const
 

Additional Inherited Members

- Protected Member Functions inherited from rdf::Module
QString debugName () const
 
- Protected Attributes inherited from rdf::Module
QSharedPointer< ModuleConfigmConfig
 

Constructor & Destructor Documentation

rdf::FormFeatures::FormFeatures ( )
rdf::FormFeatures::FormFeatures ( const cv::Mat &  img,
const cv::Mat &  mask = cv::Mat() 
)

Member Function Documentation

bool ** rdf::FormFeatures::adjacencyMatrix ( const QVector< QSharedPointer< rdf::AssociationGraphNode >> &  associationGraphNodes)

Here is the caller graph for this function:

cv::Mat rdf::FormFeatures::binaryImage ( ) const
QVector< QSharedPointer< rdf::TableCell > > rdf::FormFeatures::cells ( ) const

Here is the caller graph for this function:

bool rdf::FormFeatures::compute ( )
overridevirtual

Runs the algorithm implemented by the module.

Returns
True on success.

Implements rdf::Module.

Here is the caller graph for this function:

bool rdf::FormFeatures::computeBinaryInput ( )

Here is the caller graph for this function:

QSharedPointer< FormFeaturesConfig > rdf::FormFeatures::config ( ) const

Here is the caller graph for this function:

void rdf::FormFeatures::createAssociationGraph ( )

Here is the caller graph for this function:

void rdf::FormFeatures::createAssociationGraphNodes ( QVector< QSharedPointer< rdf::TableCellRaw >>  cellsR)
void rdf::FormFeatures::createCellfromLineCandidates ( QVector< QSharedPointer< rdf::TableCellRaw >>  cellsR)

Here is the caller graph for this function:

rdf::Polygon rdf::FormFeatures::createPolygon ( rdf::Line  tl,
rdf::Line  ll,
rdf::Line  rl,
rdf::Line  bl 
)

Here is the caller graph for this function:

QVector< QSharedPointer< rdf::TableCellRaw > > rdf::FormFeatures::createRawTableFromTemplate ( )

Here is the caller graph for this function:

void rdf::FormFeatures::createReducedAssociationGraphNodes ( QVector< QSharedPointer< rdf::TableCellRaw >>  cellsR)

Here is the caller graph for this function:

void rdf::FormFeatures::createTableFromMaxClique ( const QVector< QSharedPointer< rdf::TableCell >> &  cells)
void rdf::FormFeatures::createTableFromMaxCliqueReduced ( const QVector< QSharedPointer< rdf::TableCell >> &  cells)

Here is the caller graph for this function:

cv::Mat rdf::FormFeatures::drawAlignment ( cv::Mat  img = cv::Mat())

Here is the caller graph for this function:

cv::Mat rdf::FormFeatures::drawLines ( cv::Mat  img = cv::Mat(),
float  t = 10.0 
)
cv::Mat rdf::FormFeatures::drawLinesNotUsedForm ( cv::Mat  img = cv::Mat(),
float  t = 10.0 
)
cv::Mat rdf::FormFeatures::drawMatchedForm ( cv::Mat  img = cv::Mat(),
float  t = 10.0 
)
cv::Mat rdf::FormFeatures::drawMaxClique ( cv::Mat  img = cv::Mat(),
float  t = 10.0,
int  idx = 0 
)
cv::Mat rdf::FormFeatures::drawMaxCliqueNeighbours ( int  cellIdx,
AssociationGraphNode::LinePosition  lp,
int  nodeCnt = -1,
cv::Mat  img = cv::Mat(),
float  t = 10.0 
)
double rdf::FormFeatures::error ( ) const
bool rdf::FormFeatures::estimateRoughAlignment ( bool  useBinaryImg = false)

Here is the caller graph for this function:

QVector< rdf::Line > rdf::FormFeatures::filterHorLines ( double  minOverlap = 0.1,
double  distThreshold = 20 
) const

Here is the caller graph for this function:

QVector< rdf::Line > rdf::FormFeatures::filterVerLines ( double  minOverlap = 0.1,
double  distThreshold = 20 
) const

Here is the caller graph for this function:

rdf::LineCandidates rdf::FormFeatures::findLineCandidates ( rdf::Line  l,
double  distThreshold,
bool  horizontal = true 
)

Here is the caller graph for this function:

void rdf::FormFeatures::findMaxCliques ( )

Here is the caller graph for this function:

double rdf::FormFeatures::findMinWidth ( QVector< QSharedPointer< rdf::TableCellRaw >>  cellsR,
int  cellIdx,
int  neighbour 
)

Here is the caller graph for this function:

QString rdf::FormFeatures::formName ( ) const

Here is the caller graph for this function:

QVector< QSet< int > > rdf::FormFeatures::getMaxCliqueHor ( ) const
QVector< QSet< int > > rdf::FormFeatures::getMaxCliqueVer ( ) const
QVector< rdf::Line > rdf::FormFeatures::horLines ( ) const
bool rdf::FormFeatures::isEmpty ( ) const
overridevirtual

Returns true if the module was initialized with the default constructor. Note, if empty is true, nothing can be computed.

Returns
Returns true if the module was initialized.

Implements rdf::Module.

bool rdf::FormFeatures::isEmptyLines ( ) const

Here is the caller graph for this function:

bool rdf::FormFeatures::isEmptyTable ( ) const
double rdf::FormFeatures::lineDistance ( rdf::Line  templateLine,
rdf::Line  formLine,
double  minOverlap = 0.1,
bool  horizontal = true 
)
bool rdf::FormFeatures::matchTemplate ( )

Here is the caller graph for this function:

QVector< QSharedPointer< rdf::AssociationGraphNode > > rdf::FormFeatures::mergeColinearNodes ( QVector< QSharedPointer< rdf::AssociationGraphNode >> &  tmpNodes)

Here is the caller graph for this function:

QVector< rdf::Line > rdf::FormFeatures::notUsedHorLines ( ) const

Here is the caller graph for this function:

QVector< rdf::Line > rdf::FormFeatures::notUseVerLines ( ) const

Here is the caller graph for this function:

cv::Point rdf::FormFeatures::offset ( ) const
bool rdf::FormFeatures::readTemplate ( QSharedPointer< rdf::FormFeatures templateForm)

Here is the caller graph for this function:

QSharedPointer< rdf::TableRegion > rdf::FormFeatures::region ( ) const

Here is the caller graph for this function:

void rdf::FormFeatures::setCells ( QVector< QSharedPointer< rdf::TableCell >>  c)
void rdf::FormFeatures::setConfig ( QSharedPointer< FormFeaturesConfig c)

Here is the caller graph for this function:

void rdf::FormFeatures::setEstimateSkew ( bool  s)
void rdf::FormFeatures::setFormName ( QString  s)

Here is the caller graph for this function:

void rdf::FormFeatures::setHorLines ( const QVector< rdf::Line > &  h)
void rdf::FormFeatures::setInputImg ( const cv::Mat &  img)
void rdf::FormFeatures::setMask ( const cv::Mat &  mask)
void rdf::FormFeatures::setRegion ( QSharedPointer< rdf::TableRegion r)
void rdf::FormFeatures::setSeparators ( QSharedPointer< rdf::Region r)

Here is the caller graph for this function:

void rdf::FormFeatures::setSize ( cv::Size  s)

Here is the caller graph for this function:

bool rdf::FormFeatures::setTemplateName ( QString  s)

Here is the caller graph for this function:

void rdf::FormFeatures::setVerLines ( const QVector< rdf::Line > &  v)
cv::Size rdf::FormFeatures::sizeImg ( ) const

Here is the caller graph for this function:

QSharedPointer< rdf::TableRegion > rdf::FormFeatures::tableRegion ( )

Here is the caller graph for this function:

QSharedPointer< rdf::TableRegion > rdf::FormFeatures::tableRegionTemplate ( )
QString rdf::FormFeatures::templateName ( ) const

Here is the caller graph for this function:

QString rdf::FormFeatures::toString ( ) const
overridevirtual

Converts the module's parameters and results to a string.

Returns
The string containing all parameters and results of the module.

Reimplemented from rdf::Module.

QVector< rdf::Line > rdf::FormFeatures::usedHorLines ( ) const
QVector< rdf::Line > rdf::FormFeatures::useVerLines ( ) const
QVector< rdf::Line > rdf::FormFeatures::verLines ( ) const

The documentation for this class was generated from the following files: