From ba994f4404b6eadcab4e0ead46ef4d3ffeceb024 Mon Sep 17 00:00:00 2001 From: Antoine Villeret Date: Thu, 10 Jul 2014 14:39:22 +0000 Subject: lots of changes ! 1. switch to a new build system based on automake (because we need to check for some lib on ./configure before make) 2. sort files in different directory 3. add some new features (some of them need OpenCV >= 2.4.5) svn path=/trunk/externals/pix_opencv/; revision=17324 --- src/Blob.hpp | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 src/Blob.hpp (limited to 'src/Blob.hpp') diff --git a/src/Blob.hpp b/src/Blob.hpp new file mode 100644 index 0000000..fe7f836 --- /dev/null +++ b/src/Blob.hpp @@ -0,0 +1,56 @@ +/* +* Blob.hpp +* +* +* A blob is a homogenous patch represented by a polygonal contour. +* Typically a blob tracker uses the contour to figure out the blob's +* persistence and "upgrades" it with ids and other temporal +* information. +* +*/ + +#ifndef BLOB_H +#define BLOB_H + +#include + +class Blob { + +public: + + std::vector pts; // the contour of the blob + int nPts; // number of pts; + int id; + float area; + float length; + float angle; + float maccel; //distance traveled since last frame + float age; //how long the blob has been at war + float sitting; //how long hes been sitting in the same place + float downTime; + float lastTimeTimeWasChecked; + cv::Rect boundingRect; + cv::RotatedRect angleBoundingRect; + cv::Point2f centroid, lastCentroid, D; + bool simulated; + bool hole; + cv::Scalar color; + + //---------------------------------------- + Blob() { + area = 0.0f; + length = 0.0f; + hole = false; + nPts = 0; + simulated = false; + age = 0.0f; + sitting = 0.0f; + color = 0xFFFFFF; + + //freakishly long variable name (ala Apple) + //~lastTimeTimeWasChecked = ofGetElapsedTimeMillis(); //get current time as of creation + } +}; +#endif + + -- cgit v1.2.1