VAT  3.0
Video Analysis Tool
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
PersonalityModule Class Reference
Inheritance diagram for PersonalityModule:
ModuleInterface

Public Member Functions

 PersonalityModule (Datapool *i_data)
 
bool setParameters (QDomNode &config)
 
bool init ()
 
bool run ()
 
bool updateParameters ()
 
int readSupervisedData ()
 
void getPersonality (QImage *current, SupervisedStatisticalInfo &sup)
 
void getPersonalityPreAngular (QImage *current, std::vector< std::vector< cv::Point > > &ccontours)
 
void getPersonalityFromAngular (std::vector< std::vector< cv::Point > > &contours, SupervisedStatisticalInfo &sup)
 
void getNormalIntersections (cv::Mat &f, cv::Rect &roi, std::vector< cv::Point > &hull, cv::Point2f &r1, cv::Point2f &r2, int n1, int n2, float dx, float dy, std::vector< segment2D< float > > &segs)
 
void setForegroundSegment (cv::Mat &f, cv::Rect &roi, std::vector< cv::Point > &hull, segment2D< float > &seg, float x, float y, float dx, float dy, int &I1, int &I2)
 
void connectContours (std::vector< std::vector< cv::Point > > &contours, std::vector< std::vector< cv::Point > > &ccontours)
 
void filterContours (std::vector< std::vector< cv::Point > > &contours, std::vector< std::vector< cv::Point > > &fcontours, int min_length)
 
void drawPointsToMat (std::vector< cv::Point2f > &pca_points, cv::Mat &m)
 
void drawKMeansPointsToMat (std::vector< cv::Point2f > &pca_points, cv::Mat &m, cv::Mat &klabels, cv::Mat &kcenters, int K)
 
void prepareImage (cv::Mat &current)
 
void getShapeBorder (cv::Mat &current, cv::Mat &border)
 
int getCentroid (cv::Mat &image, float x, float y)
 
void getMainAxis (cv::Mat &image, float x, float y, int n, cv::Point2f &r1, cv::Point2f &r2)
 
void getAngularFunction (std::vector< float > &angular, std::vector< std::vector< cv::Point > > &contours)
 
void getHistogram (std::vector< float > &input, cv::MatND &hist)
 
cv::PCA * getPCAfromHistograms (std::vector< cv::MatND > h)
 
cv::PCA * getPCAfromHistograms (std::vector< cv::MatND > h, cv::Mat &pcadata, cv::Mat &pcamean)
 
cv::PCA * getPCA (cv::Mat &pcadata, cv::Mat &pcamean)
 
cv::Mat getKMeansFromPCA (cv::PCA *pca, cv::Mat &pcadata, cv::Mat &pcamean)
 
float crossValidation (std::vector< SupervisedStatisticalInfo > &supervised, std::vector< CvANN_MLP > &anns, float &rel_error)
 
void getModel (std::vector< SupervisedStatisticalInfo > &sup, CvANN_MLP &ann, bool mean, bool reliability)
 
float getPrediction (CvANN_MLP &ann, SupervisedStatisticalInfo &sup)
 
- 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)
 

Static Public Member Functions

static void getFarPoints (cv::Mat im, float dx, float dy, cv::Point2f &r1, cv::Point2f &r2, float mean_x, float mean_y)
 
static bool pointInNeighborhood (cv::Mat im, float pos_x, float pos_y, int &x, int &y)
 
static bool movementFound (cv::Mat f, int wsize, int i0, int j0)
 
static bool movementFound (cv::Mat f, int wsize, int i0, int j0, cv::Rect roi)
 
static double histogramDistance (cv::MatND h1, cv::MatND h2)
 
static double distanceToSegment (int i1, int i2, std::vector< cv::Point > &contour)
 
static bool lineSegmentIntersection (cv::Point3f &line, cv::Point2f &p1, cv::Point2f &p2, cv::Point2f &r)
 
static bool getGeneralLineForm (cv::Point2f p1, cv::Point2f p2, cv::Point3f &rline)
 
static bool getGeneralLineForm (float x, float y, float dx, float dy, cv::Point3f &rline)
 
static int getContourToLineIntersection (std::vector< cv::Point > &hull, cv::Point3f &rline, cv::Point2f &r1, cv::Point2f &r2, int *n1=NULL, int *n2=NULL)
 
static int getContourToLineIntersectionIndexed (std::vector< cv::Point > &polygon, cv::Point3f &rline, cv::Point2f &r1, cv::Point2f &r2, int &n1, int &n2)
 
static int movementCount (cv::Mat f, int wsize, int i0, int j0, cv::Rect roi)
 
static void safeCopyQImageToMat (QImage &q, cv::Mat &m)
 
static void drawContourToMat (std::vector< cv::Point > &v, cv::Mat &m)
 
static void drawContourToMat (std::vector< cv::Point > &v, cv::Mat &m, cv::Scalar color)
 
static void blurContour (std::vector< cv::Point > &contour, int scale, int step)
 

Public Attributes

std::vector< CvANN_MLP > anns
 
int line
 
int cont
 
int m_min_images_to_process
 
int processed_images
 
int m_bins
 
int w_size
 
int m_hullOffset
 
bool m_abs_angular_diff
 
float m_K
 
int m_num_ev
 
int m_clusters
 
cv::Mat kcenters
 
bool m_use_mean
 
bool m_use_reliability
 
std::vector< cv::MatND > histograms
 
std::vector< SupervisedStatisticalInfosupervised
 
std::vector< std::vector< std::vector< cv::Point > > > image_contours
 
std::map< int, double > gaussianConstant
 
std::map< int, double > gaussianFactor
 
std::vector< std::string > names
 
std::vector< bool > elegant
 
std::string m_supervisedFile
 
int m_min_contour_length
 
bool first
 
int m_scale
 
int m_ostep
 
bool m_tuning_mode
 
- 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
 

Additional Inherited Members

- Protected Attributes inherited from ModuleInterface
Datapoolm_data
 

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