VAT  3.0
Video Analysis Tool
Public Member Functions | List of all members
PoppeFootball Class Reference

#include <PoppeFootball.h>

Inheritance diagram for PoppeFootball:
ModuleInterface

Public Member Functions

 PoppeFootball (Datapool *i_data)
 PoppeFootball::PoppeFootball PoppeFootball module. This is an implementation for "Multi-Camera Analysis of Soccer Sequences" from Chris Poppe et. al paper, used to tracking football players with a single-view camera. More...
 
 ~PoppeFootball ()
 PoppeFootball::~PoppeFootball Destructor.
 
bool setParameters (QDomNode &config)
 PoppeFootball::setParameters Inherited from ModuleInterface class virtual method. SetParameters reads the XML configuration file (default_config.xml?) and allows to pass those parameters to our variables. Please refer to this class reference to see what XML configuration is needed. More...
 
bool init ()
 PoppeFootball::init This is first called when the module is initialized. More...
 
bool run ()
 PoppeFootball::run This is run for each frame. The main processing is made here. More...
 
bool updateParameters ()
 PoppeFootball::updateParameters I have absolutely no idea what does this function do. More...
 
void retrieveFGMask ()
 PoppeFootball::retrieveFGMask Run operation to get the segmentation image. It is based in a codebook model whose parameters you can adjust using the XML config file (see the class description for more details). It's important to set those parameters properly in order to get a good FG mask. If relatively too much foreground is detected, the Codebook model is considered stale and learned again. This function also takes care of resetting the variables in order to resume that cycle in the run function. The output of this function is the segmentation: the Datapool (m_data->fgImage) foreground mask is updated for a Connected Components algorithm to be applied to it.
 
void prepareStructuralElem (cv::Mat &output, morpho_param par)
 PoppeFootball::prepareStructuralElem Prepares a Mat with a structural element for morphology operations. More...
 
cv::Scalar colorName (QString colorcode, bool *convsuccess=NULL)
 PoppeFootball::colorName Transforms a "#RRGGBB" string into a scalar. Support for color names intended, but not implemented. More...
 
cv::Scalar colorToHSV (cv::Scalar BGRinput)
 
- Public Member Functions inherited from ModuleInterface
 ModuleInterface (Datapool *i_data)
 
void addParameter (QString name, QString value, QString type)
 
void addParameterChild (QString name, QString value, QString type, parameter *parent)
 
parametergetParameter (QString name)
 
parametergetParameter (QString name, parameter *parent)
 
parametergetParameter (QString name, std::multimap< QString, parameter > subList)
 
Parameter2getParameterFromTree (const QString name)
 
Parameter2getParameterFromTree (const QString name, Parameter2 *parent)
 
Parameter2getParameterFromTree (const QString name, std::multimap< QString, Parameter2 > subList)
 
void addParameterToTree (const QString name, const QString value, const QString defaultValue, const ParameterDataType &type)
 
void addChildParameterToTree (const QString &name, const QString &value, const QString &defaultValue, const ParameterDataType &type, Parameter2 *parent)
 
bool getParameterValueFromXml (const QDomNode &rootNode, const QString &parameterName, const bool &defaulValue, bool &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool getParameterValueFromXml (const QDomNode &rootNode, const QString &parameterName, const char &defaulValue, char &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool getParameterValueFromXml (const QDomNode &rootNode, const QString &parameterName, const uchar &defaulValue, uchar &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool getParameterValueFromXml (const QDomNode &rootNode, const QString &parameterName, const int &defaulValue, int &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool getParameterValueFromXml (const QDomNode &rootNode, const QString &parameterName, const uint &defaulValue, uint &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool getParameterValueFromXml (const QDomNode &rootNode, const QString &parameterName, const long &defaulValue, long &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool getParameterValueFromXml (const QDomNode &rootNode, const QString &parameterName, const ulong &defaulValue, ulong &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool getParameterValueFromXml (const QDomNode &rootNode, const QString &parameterName, const float &defaulValue, float &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool getParameterValueFromXml (const QDomNode &rootNode, const QString &parameterName, const double &defaulValue, double &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool getParameterValueFromXml (const QDomNode &rootNode, const QString &parameterName, const QString &defaulValue, QString &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool setNodeParameterModule (const QDomNode &rootNode, const QString &parameterName, const bool defaulValue, bool &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool setNodeParameterModule (const QDomNode &rootNode, const QString &parameterName, const int defaulValue, int &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool setNodeParameterModule (const QDomNode &rootNode, const QString &parameterName, const char defaulValue, char &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool setNodeParameterModule (const QDomNode &rootNode, const QString &parameterName, const uchar defaulValue, uchar &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool setNodeParameterModule (const QDomNode &rootNode, const QString &parameterName, const uint defaulValue, uint &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool setNodeParameterModule (const QDomNode &rootNode, const QString &parameterName, const long defaulValue, long &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool setNodeParameterModule (const QDomNode &rootNode, const QString &parameterName, const ulong defaulValue, ulong &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool setNodeParameterModule (const QDomNode &rootNode, const QString &parameterName, const float defaulValue, float &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool setNodeParameterModule (const QDomNode &rootNode, const QString &parameterName, const double defaulValue, double &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool setNodeParameterModule (const QDomNode &rootNode, const QString &parameterName, const QString defaulValue, QString &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool setChildParameterModule (const QDomNode &rootNode, const QString &parameterName, const bool defaulValue, bool &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool setChildParameterModule (const QDomNode &rootNode, const QString &parameterName, const int defaulValue, int &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool setChildParameterModule (const QDomNode &rootNode, const QString &parameterName, const char defaulValue, char &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool setChildParameterModule (const QDomNode &rootNode, const QString &parameterName, const uchar defaulValue, uchar &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool setChildParameterModule (const QDomNode &rootNode, const QString &parameterName, const uint defaulValue, uint &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool setChildParameterModule (const QDomNode &rootNode, const QString &parameterName, const long defaulValue, long &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool setChildParameterModule (const QDomNode &rootNode, const QString &parameterName, const ulong defaulValue, ulong &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool setChildParameterModule (const QDomNode &rootNode, const QString &parameterName, const float defaulValue, float &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool setChildParameterModule (const QDomNode &rootNode, const QString &parameterName, const double defaulValue, double &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool setChildParameterModule (const QDomNode &rootNode, const QString &parameterName, const QString defaulValue, QString &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 

Additional Inherited Members

- Public Attributes inherited from ModuleInterface
std::deque< QString > nameParameters
 
std::deque< QString > valueParameters
 
std::deque< QString > typeParameters
 
std::deque< parameterlistParameters
 
std::deque< Parameter2parametersTree
 
std::string name
 
ModuleType type
 
- Protected Attributes inherited from ModuleInterface
Datapoolm_data
 

Detailed Description

It's a VAT Module, so it inherits from ModuleInterface for it to be integrated with the workbench.

How to integrate this module into VAT: It's a rather simple task. All we have to do is:

  1. Go to VAT modules.cpp file, and incorpore our class using the corresponding #include, and putting all the necessary ADD_MODULE and REGISTER_MODULE macros with the name of our class, and we're ready to use it.
  2. Write "PoppeFootball" as a new line in default_module_sequence.txt.
  3. In the log, should appear "POPPEFOOTBALL: Module armed and ready."

This module relies on a lot of external functions, declared in CommonImage and CodebookModel classes. As interaction between Qt and OpenCV's image formats sure gave us more than one headache, we hope these will be useful for another projects besides ours.

TODO:

TO VIEW OUR RESULTS:

XML CONFIG PARAMETERS:

RECOMMENDED USE OF THIS MODULE: This is a segmentation module, it should be used after an adquisition module (like a camera or a video file). Blobs must be taken from the results of this module. Then, the order should be the following:

Constructor & Destructor Documentation

PoppeFootball::PoppeFootball ( Datapool i_data)

PoppeFootball::PoppeFootball PoppeFootball module. This is an implementation for "Multi-Camera Analysis of Soccer Sequences" from Chris Poppe et. al paper, used to tracking football players with a single-view camera.

Parameters
i_dataModule parameter for VAT, centralizes every captured frame.

Member Function Documentation

Scalar PoppeFootball::colorName ( QString  colorcode,
bool *  convsuccess = NULL 
)

PoppeFootball::colorName Transforms a "#RRGGBB" string into a scalar. Support for color names intended, but not implemented.

Parameters
colorcode
Returns
bool PoppeFootball::init ( )
virtual

PoppeFootball::init This is first called when the module is initialized.

Returns

Implements ModuleInterface.

void PoppeFootball::prepareStructuralElem ( cv::Mat &  output,
morpho_param  par 
)

PoppeFootball::prepareStructuralElem Prepares a Mat with a structural element for morphology operations.

Parameters
outputOutput Mat
parStructural element parameters
bool PoppeFootball::run ( )
virtual

PoppeFootball::run This is run for each frame. The main processing is made here.

Returns

Implements ModuleInterface.

bool PoppeFootball::setParameters ( QDomNode &  config)
virtual

PoppeFootball::setParameters Inherited from ModuleInterface class virtual method. SetParameters reads the XML configuration file (default_config.xml?) and allows to pass those parameters to our variables. Please refer to this class reference to see what XML configuration is needed.

Parameters
configHolds the config XML nodes.
Returns
False if some required parameters (like player template route) are undefined.

Implements ModuleInterface.

bool PoppeFootball::updateParameters ( )
virtual

PoppeFootball::updateParameters I have absolutely no idea what does this function do.

Returns
No idea either.

Implements ModuleInterface.


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