ReadFramework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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())
 
bool loadTemplateDatabase (QString db)
 
QVector< rdf::FormFeaturestemplatesDb () const
 
cv::Mat getMatchedLineImg (const cv::Mat &srcImg, const Vector2D &offset=Vector2D(0, 0)) const
 
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 compareWithTemplate (const FormFeatures &fTempl)
 
cv::Size sizeImg () const
 
void setSize (cv::Size s)
 
QVector< rdf::LinehorLines () const
 
void setHorLines (const QVector< rdf::Line > &h)
 
QVector< rdf::LinehorLinesMatched () const
 
QVector< rdf::LineverLines () const
 
void setVerLines (const QVector< rdf::Line > &v)
 
QVector< rdf::LineverLinesMatched () const
 
cv::Point offset () const
 
double error () const
 
QSharedPointer
< FormFeaturesConfig
config () const
 
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
 
- 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
 

Protected Member Functions

float errLine (const cv::Mat &distImg, const rdf::Line l, cv::Point offset=cv::Point(0, 0))
 
void findOffsets (const QVector< Line > &hT, const QVector< Line > &vT, QVector< int > &offX, QVector< int > &offY) const
 
- Protected Member Functions inherited from rdf::Module
QString debugName () const
 

Additional Inherited Members

- 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

cv::Mat rdf::FormFeatures::binaryImage ( ) const
bool rdf::FormFeatures::compareWithTemplate ( const FormFeatures fTempl)
bool rdf::FormFeatures::compute ( )
overridevirtual

Runs the algorithm implemented by the module.

Returns
True on success.

Implements rdf::Module.

bool rdf::FormFeatures::computeBinaryInput ( )
QSharedPointer< FormFeaturesConfig > rdf::FormFeatures::config ( ) const
float rdf::FormFeatures::errLine ( const cv::Mat &  distImg,
const rdf::Line  l,
cv::Point  offset = cv::Point(0,0) 
)
protected
double rdf::FormFeatures::error ( ) const
void rdf::FormFeatures::findOffsets ( const QVector< Line > &  hT,
const QVector< Line > &  vT,
QVector< int > &  offX,
QVector< int > &  offY 
) const
protected
QString rdf::FormFeatures::formName ( ) const
cv::Mat rdf::FormFeatures::getMatchedLineImg ( const cv::Mat &  srcImg,
const Vector2D offset = Vector2D(0,0) 
) const
QVector< rdf::Line > rdf::FormFeatures::horLines ( ) const
QVector< rdf::Line > rdf::FormFeatures::horLinesMatched ( ) 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::loadTemplateDatabase ( QString  db)
cv::Point rdf::FormFeatures::offset ( ) const
void rdf::FormFeatures::setEstimateSkew ( bool  s)
void rdf::FormFeatures::setFormName ( QString  s)
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::setSize ( cv::Size  s)
void rdf::FormFeatures::setVerLines ( const QVector< rdf::Line > &  v)
cv::Size rdf::FormFeatures::sizeImg ( ) const
QVector< rdf::FormFeatures > rdf::FormFeatures::templatesDb ( ) const
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::verLines ( ) const
QVector< rdf::Line > rdf::FormFeatures::verLinesMatched ( ) const

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