1 #ifndef CODEBOOKMODEL_H 2 #define CODEBOOKMODEL_H 4 #include <opencv2/core/core.hpp> 5 #include <opencv2/legacy/legacy.hpp> 7 #include "commonimage.h" 29 void getFG(cv::Mat& output);
30 void getFG(QImage& output);
46 static void getConnectedComponents(
const cv::Mat& fginput, std::vector<cv::Mat>& masks, std::vector<cv::Rect>& boundingBoxes);
59 double relstalethreshold;
66 IplImage yuvimgshadow;
69 CvBGCodeBookModel* cbmodel;
72 #endif // CODEBOOKMODEL_H bool verifyNotNullity()
CodebookModel::verifyNotNullity Simply verifies if the associated image is not null.
Definition: codebookmodel.cpp:264
void clearStales()
CodebookModel::clearStales Clears stale entries in the Codebook Model, using the ratio set in setStal...
Definition: codebookmodel.cpp:210
void cleanse()
CodebookModel::cleanse Cleanse private variables.
Definition: codebookmodel.cpp:278
int getLearnedFrames() const
CodebookModel::getLearnedFrames Gets the amount of frames this codebook model has learned...
Definition: codebookmodel.cpp:240
bool updateFGMask()
CodebookModel::updateFGMask Uses the codebook model to extract the Foreground Mask from the current f...
Definition: codebookmodel.cpp:104
void associateCommonImage(CommonImage *asoc)
CodebookModel::associateCommonImage Associates another CommonImage to this Codebook model...
Definition: codebookmodel.cpp:43
double getRelativeStaleThreshold() const
CodebookModel::getRelativeStaleThreshold Gets the relative stale threshold. Read setRelativeStaleThre...
Definition: codebookmodel.cpp:230
~CodebookModel()
CodebookModel::~CodebookModel Destructor.
Definition: codebookmodel.cpp:249
CodebookModel()
CodebookModel::CodebookModel Default constructor. To use this codebook model you must associate a Com...
Definition: codebookmodel.cpp:19
static void getConnectedComponents(const cv::Mat &fginput, std::vector< cv::Mat > &masks, std::vector< cv::Rect > &boundingBoxes)
getConnectedComponents Gets all the connected components in the binary input mask (I'll trust it's a ...
Definition: codebookmodel.cpp:318
void resetCBModel()
CodebookModel::resetCBModel Resets the codebook model.
Definition: codebookmodel.cpp:201
The CommonImage class This is a class made to solve the headache you'll probably get when working bot...
Definition: commonimage.h:21
double getFGPercentage() const
CodebookModel::getFGPercentage Retrieves the percentage of the frame that is considered Foreground...
Definition: codebookmodel.cpp:168
void setRelativeStaleThreshold(double rel)
CodebookModel::setRelativeStaleThreshold Sets what portion of the retrieved codebooks are considered ...
Definition: codebookmodel.cpp:220
void setCBParameters(std::vector< uchar > params)
CodebookModel::setCBParameters Sets the bounds for Codebook Parameters for each channel. The passing vector element must have at least 9 elements: triads for each YUV channel: minimum bound, maximum bound and cbBounds. Default value is 3,10 and 10 respectively for each triad.
Definition: codebookmodel.cpp:54
The CodebookModel class This is a class made to interface (some way or another) the way OpenCV handle...
Definition: codebookmodel.h:15
void allocateCBData()
CodebookModel::allocateCBData Allocates any private data needed.
Definition: codebookmodel.cpp:290
bool learnFrame()
CodebookModel::learnFrame Makes this codebook model learn the current frame in the associated image...
Definition: codebookmodel.cpp:82
static double getFGPercentageExtern(const cv::Mat mask)
CodebookModel::getFGPercentageExtern Same function as getFGPercentage, but for external Mats...
Definition: codebookmodel.cpp:180