TSPS
1.3.2
TSPS is a cross-platform Toolkit for Sensing People in Spaces
|
#include <PeopleTracker.h>
Public Member Functions | |
PeopleTracker () | |
~PeopleTracker () | |
void | setup (int w=0, int h=0, string settings="", int deviceId=-1) |
void | update () |
void | update (ofBaseImage &image) |
void | resize (int w, int h) |
void | mousePressed (ofMouseEventArgs &e) |
void | setSource (Source &newSource) |
bool | setupSource (SourceType type, int which=-1) |
bool | useKinect () |
void | setUseKinect (bool bUseKinect=true) |
bool | useVideoFile () |
void | setUseVideoFile (bool bUseVideoFile=true) |
bool | useVideoGrabber () |
void | setUseVideoGrabber (bool bUseVideoGrabber=true) |
bool | useCustomSource () |
void | setUseCustomSource (bool bUseCustomSource=true) |
void | setProcessor (Processor *_processor) |
Processor * | getProcessor () |
void | setupTuio (string ip, int port) |
void | setupOsc (string ip, int port) |
void | setupTcp (int port) |
void | setupWebSocketServer (int port) |
void | setupWebSocketClient (string host, int port, bool bUseSSL=false, string channel="") |
void | enableHaarFeatures (bool doHaar) |
void | enableOpticalFlow (bool doOpticalFlow) |
void | relearnBackground () |
void | enableBackgroundRelearnSmart (bool doSmartLearn) |
void | enableBackgroundReleaernProgressive (bool doProgressive) |
void | setRelearnRate (float relearnRate) |
void | setThreshold (float thresholdAmount) |
void | setMinBlobSize (float minBlobSize) |
void | setMaxBlobSize (float maxBlobSize) |
void | enableSmooth (bool doSmooth) |
void | setSmoothAmount (int smoothAmount) |
void | enableHighpass (bool doHighpass) |
void | setHighpassBlurAmount (int highpassBlurAmount) |
void | setHighpassNoiseAmount (int highpassNoiseAmount) |
void | enableAmplify (bool doAmp) |
void | setAmplifyAmount (int amplifyAmount) |
void | setHaarXMLFile (string haarFile) |
void | setHaarExpandArea (float haarExpandAmount) |
void | useHaarAsCentroid (bool useHaarCenter) |
void | enableFindHoles (bool findHoles) |
void | trackDarkBlobs () |
void | trackLightBlobs () |
int | getDrawMode () |
void | enableGuiEvents () |
void | disableGuiEvents () |
void | addSlider (string name, int *value, int min, int max) |
void | addSlider (string name, float *value, float min, float max) |
void | addToggle (string name, bool *value) |
guiTypeButton * | addExternalButton (string name, ofRectangle dimensions) |
string | getVideoFile () |
void | setVideoFile (string file) |
void | setDrawMode (int mode) |
void | draw () |
void | draw (int x, int y) |
void | draw (int x, int y, int mode) |
Person * | personAtIndex (int i) |
int | totalPeople () |
void | setActiveView (int activeIndex) |
void | setActiveDimensions (int actWidth, int actHeight) |
bool | loadFont (string fontName, int fontSize) |
void | triggerCustomEvent (string eventName, string param) |
void | triggerCustomEvent (string eventName, vector< string >params) |
void | triggerCustomEvent (string eventName, map< string, string >params) |
OscSender * | getOSCsender () |
WebSocketSender * | getWebSocketServer () |
bool | inCameraView () |
bool | inAdjustedView () |
bool | inBackgroundView () |
bool | inDifferencingView () |
bool | inDataView () |
Protected Member Functions | |
void | personEntered (Person *p, Scene *s) |
void | personUpdated (Person *p, Scene *s) |
void | personWillLeave (Person *p, Scene *s) |
void | trackPeople () |
void | updateSettings () |
bool | isTrackingPerson (int pid) |
void | updateViewRectangles () |
void | drawBlobs (float width, float height) |
bool | isInsideRect (float x, float y, ofRectangle rect) |
Protected Attributes | |
ofxXmlSettings | defaults |
bool | bSourceSetup |
Source * | currentSource |
Processor * | tspsProcessor |
vector< Person * > | trackedPeople |
Scene | scene |
ofImage | cameraImage |
ofImage | warpedImage |
ofImage | backgroundImage |
ofImage | differencedImage |
ofPixels | blackPixels |
CPUImageFilter | grayDiff |
int | drawMode |
float | width |
float | height |
string | lastHaarFile |
Settings * | p_Settings |
bool | doRelearnBackground |
TUIOSender | tuioClient |
bool | bTuioEnabled |
OscSender | oscClient |
bool | bOscEnabled |
TCPSender | tcpClient |
bool | bTcpEnabled |
WebSocketSender | webSocketServer |
bool | bWebSocketServerEnabled |
bool | bWebSocketClientEnabled |
GuiManager | gui |
bool | guiLoaded |
float | activeHeight |
float | activeWidth |
ofTrueTypeFont | font |
bool | bFontLoaded |
int | activeViewIndex |
ofRectangle | activeView |
ofxTSPS::View | cameraView |
ofxTSPS::View | adjustedView |
ofxTSPS::View | bgView |
ofxTSPS::View | processedView |
ofxTSPS::View | dataView |
Friends | |
class | Processor |
Definition at line 76 of file PeopleTracker.h.
Definition at line 21 of file PeopleTracker.cpp.
Definition at line 30 of file PeopleTracker.cpp.
guiTypeButton * ofxTSPS::PeopleTracker::addExternalButton | ( | string | name, |
ofRectangle | dimensions | ||
) |
Definition at line 1006 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::addSlider | ( | string | name, |
int * | value, | ||
int | min, | ||
int | max | ||
) |
Definition at line 990 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::addSlider | ( | string | name, |
float * | value, | ||
float | min, | ||
float | max | ||
) |
Definition at line 996 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::addToggle | ( | string | name, |
bool * | value | ||
) |
Definition at line 1001 of file PeopleTracker.cpp.
Definition at line 985 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::draw | ( | ) |
Definition at line 818 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::draw | ( | int | x, |
int | y | ||
) |
Definition at line 824 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::draw | ( | int | x, |
int | y, | ||
int | mode | ||
) |
Definition at line 830 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::drawBlobs | ( | float | width, |
float | height | ||
) | [protected] |
Definition at line 895 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::enableAmplify | ( | bool | doAmp | ) |
Definition at line 1141 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::enableBackgroundReleaernProgressive | ( | bool | doProgressive | ) |
Definition at line 1067 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::enableBackgroundRelearnSmart | ( | bool | doSmartLearn | ) |
void ofxTSPS::PeopleTracker::enableFindHoles | ( | bool | findHoles | ) |
Definition at line 1166 of file PeopleTracker.cpp.
Definition at line 980 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::enableHaarFeatures | ( | bool | doHaar | ) |
Definition at line 1028 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::enableHighpass | ( | bool | doHighpass | ) |
Definition at line 1120 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::enableOpticalFlow | ( | bool | doOpticalFlow | ) |
Definition at line 1034 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::enableSmooth | ( | bool | doSmooth | ) |
Definition at line 1106 of file PeopleTracker.cpp.
Definition at line 1193 of file PeopleTracker.cpp.
Definition at line 1041 of file PeopleTracker.cpp.
Processor* ofxTSPS::PeopleTracker::getProcessor | ( | ) | [inline] |
Definition at line 109 of file PeopleTracker.h.
string ofxTSPS::PeopleTracker::getVideoFile | ( | ) |
Definition at line 1350 of file PeopleTracker.cpp.
Definition at line 1046 of file PeopleTracker.cpp.
Definition at line 1398 of file PeopleTracker.cpp.
Definition at line 1383 of file PeopleTracker.cpp.
bool ofxTSPS::PeopleTracker::inCameraView | ( | ) |
Definition at line 1378 of file PeopleTracker.cpp.
bool ofxTSPS::PeopleTracker::inDataView | ( | ) |
Definition at line 1393 of file PeopleTracker.cpp.
Definition at line 1388 of file PeopleTracker.cpp.
bool ofxTSPS::PeopleTracker::isInsideRect | ( | float | x, |
float | y, | ||
ofRectangle | rect | ||
) | [protected] |
Definition at line 970 of file PeopleTracker.cpp.
bool ofxTSPS::PeopleTracker::isTrackingPerson | ( | int | pid | ) | [protected] |
bool ofxTSPS::PeopleTracker::loadFont | ( | string | fontName, |
int | fontSize | ||
) |
Definition at line 1251 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::mousePressed | ( | ofMouseEventArgs & | e | ) |
Definition at line 929 of file PeopleTracker.cpp.
Person * ofxTSPS::PeopleTracker::personAtIndex | ( | int | i | ) |
simple public getter for external classes
Definition at line 1018 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::personEntered | ( | Person * | p, |
Scene * | s | ||
) | [protected] |
Definition at line 313 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::personUpdated | ( | Person * | p, |
Scene * | s | ||
) | [protected] |
Definition at line 338 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::personWillLeave | ( | Person * | p, |
Scene * | s | ||
) | [protected] |
Definition at line 366 of file PeopleTracker.cpp.
Definition at line 1054 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::resize | ( | int | w, |
int | h | ||
) |
Definition at line 476 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::setActiveDimensions | ( | int | actWidth, |
int | actHeight | ||
) |
Definition at line 1244 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::setActiveView | ( | int | activeIndex | ) |
Definition at line 1203 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::setAmplifyAmount | ( | int | amplifyAmount | ) |
Definition at line 1148 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::setDrawMode | ( | int | mode | ) |
Definition at line 1187 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::setHaarExpandArea | ( | float | haarExpandAmount | ) |
Definition at line 1159 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::setHaarXMLFile | ( | string | haarFile | ) |
Definition at line 500 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::setHighpassBlurAmount | ( | int | highpassBlurAmount | ) |
Definition at line 1127 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::setHighpassNoiseAmount | ( | int | highpassNoiseAmount | ) |
Definition at line 1134 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::setMaxBlobSize | ( | float | maxBlobSize | ) |
Definition at line 1099 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::setMinBlobSize | ( | float | minBlobSize | ) |
Definition at line 1092 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::setProcessor | ( | Processor * | _processor | ) |
Definition at line 260 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::setRelearnRate | ( | float | relearnRate | ) |
Definition at line 1074 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::setSmoothAmount | ( | int | smoothAmount | ) |
Definition at line 1113 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::setSource | ( | Source & | newSource | ) |
Definition at line 395 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::setThreshold | ( | float | thresholdAmount | ) |
Definition at line 1085 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::setup | ( | int | w = 0 , |
int | h = 0 , |
||
string | settings = "" , |
||
int | deviceId = -1 |
||
) |
Definition at line 44 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::setupOsc | ( | string | ip, |
int | port | ||
) |
Definition at line 526 of file PeopleTracker.cpp.
bool ofxTSPS::PeopleTracker::setupSource | ( | SourceType | type, |
int | which = -1 |
||
) |
Definition at line 422 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::setupTcp | ( | int | port | ) |
Definition at line 537 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::setupTuio | ( | string | ip, |
int | port | ||
) |
Definition at line 516 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::setupWebSocketClient | ( | string | host, |
int | port, | ||
bool | bUseSSL = false , |
||
string | channel = "" |
||
) |
Definition at line 560 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::setupWebSocketServer | ( | int | port | ) |
Definition at line 547 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::setUseCustomSource | ( | bool | bUseCustomSource = true | ) |
Definition at line 1367 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::setUseKinect | ( | bool | bUseKinect = true | ) |
Definition at line 1324 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::setUseVideoFile | ( | bool | bUseVideoFile = true | ) |
Definition at line 1340 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::setUseVideoGrabber | ( | bool | bUseVideoGrabber = true | ) |
Definition at line 1308 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::setVideoFile | ( | string | file | ) |
Definition at line 1355 of file PeopleTracker.cpp.
Definition at line 1023 of file PeopleTracker.cpp.
Definition at line 1173 of file PeopleTracker.cpp.
Definition at line 1180 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::trackPeople | ( | ) | [protected] |
Core Method Run every frame to update the system to the current location of people
Definition at line 709 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::triggerCustomEvent | ( | string | eventName, |
string | param | ||
) |
Definition at line 266 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::triggerCustomEvent | ( | string | eventName, |
vector< string > | params | ||
) |
Definition at line 281 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::triggerCustomEvent | ( | string | eventName, |
map< string, string > | params | ||
) |
Definition at line 296 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::update | ( | ) |
Definition at line 168 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::update | ( | ofBaseImage & | image | ) |
Definition at line 231 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::updateSettings | ( | ) | [protected] |
Definition at line 583 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::updateViewRectangles | ( | ) | [protected] |
Definition at line 1264 of file PeopleTracker.cpp.
Definition at line 1361 of file PeopleTracker.cpp.
void ofxTSPS::PeopleTracker::useHaarAsCentroid | ( | bool | useHaarCenter | ) |
bool ofxTSPS::PeopleTracker::useKinect | ( | ) |
Definition at line 1318 of file PeopleTracker.cpp.
bool ofxTSPS::PeopleTracker::useVideoFile | ( | ) |
Definition at line 1334 of file PeopleTracker.cpp.
Definition at line 1302 of file PeopleTracker.cpp.
friend class Processor [friend] |
Definition at line 77 of file PeopleTracker.h.
float ofxTSPS::PeopleTracker::activeHeight [protected] |
Definition at line 267 of file PeopleTracker.h.
ofRectangle ofxTSPS::PeopleTracker::activeView [protected] |
Definition at line 281 of file PeopleTracker.h.
int ofxTSPS::PeopleTracker::activeViewIndex [protected] |
Definition at line 279 of file PeopleTracker.h.
float ofxTSPS::PeopleTracker::activeWidth [protected] |
Definition at line 267 of file PeopleTracker.h.
ofxTSPS::View ofxTSPS::PeopleTracker::adjustedView [protected] |
Definition at line 283 of file PeopleTracker.h.
ofImage ofxTSPS::PeopleTracker::backgroundImage [protected] |
Definition at line 233 of file PeopleTracker.h.
bool ofxTSPS::PeopleTracker::bFontLoaded [protected] |
Definition at line 272 of file PeopleTracker.h.
ofxTSPS::View ofxTSPS::PeopleTracker::bgView [protected] |
Definition at line 284 of file PeopleTracker.h.
ofPixels ofxTSPS::PeopleTracker::blackPixels [protected] |
Definition at line 234 of file PeopleTracker.h.
bool ofxTSPS::PeopleTracker::bOscEnabled [protected] |
Definition at line 257 of file PeopleTracker.h.
bool ofxTSPS::PeopleTracker::bSourceSetup [protected] |
Definition at line 211 of file PeopleTracker.h.
bool ofxTSPS::PeopleTracker::bTcpEnabled [protected] |
Definition at line 259 of file PeopleTracker.h.
bool ofxTSPS::PeopleTracker::bTuioEnabled [protected] |
Definition at line 255 of file PeopleTracker.h.
bool ofxTSPS::PeopleTracker::bWebSocketClientEnabled [protected] |
Definition at line 261 of file PeopleTracker.h.
bool ofxTSPS::PeopleTracker::bWebSocketServerEnabled [protected] |
Definition at line 261 of file PeopleTracker.h.
ofImage ofxTSPS::PeopleTracker::cameraImage [protected] |
Definition at line 233 of file PeopleTracker.h.
ofxTSPS::View ofxTSPS::PeopleTracker::cameraView [protected] |
Definition at line 282 of file PeopleTracker.h.
Source* ofxTSPS::PeopleTracker::currentSource [protected] |
Definition at line 212 of file PeopleTracker.h.
ofxTSPS::View ofxTSPS::PeopleTracker::dataView [protected] |
Definition at line 286 of file PeopleTracker.h.
ofxXmlSettings ofxTSPS::PeopleTracker::defaults [protected] |
Definition at line 208 of file PeopleTracker.h.
ofImage ofxTSPS::PeopleTracker::differencedImage [protected] |
Definition at line 233 of file PeopleTracker.h.
bool ofxTSPS::PeopleTracker::doRelearnBackground [protected] |
Definition at line 250 of file PeopleTracker.h.
int ofxTSPS::PeopleTracker::drawMode [protected] |
Definition at line 240 of file PeopleTracker.h.
ofTrueTypeFont ofxTSPS::PeopleTracker::font [protected] |
Definition at line 271 of file PeopleTracker.h.
CPUImageFilter ofxTSPS::PeopleTracker::grayDiff [protected] |
Definition at line 237 of file PeopleTracker.h.
GuiManager ofxTSPS::PeopleTracker::gui [protected] |
Definition at line 265 of file PeopleTracker.h.
bool ofxTSPS::PeopleTracker::guiLoaded [protected] |
Definition at line 266 of file PeopleTracker.h.
float ofxTSPS::PeopleTracker::height [protected] |
Definition at line 241 of file PeopleTracker.h.
string ofxTSPS::PeopleTracker::lastHaarFile [protected] |
Definition at line 244 of file PeopleTracker.h.
OscSender ofxTSPS::PeopleTracker::oscClient [protected] |
Definition at line 256 of file PeopleTracker.h.
Settings* ofxTSPS::PeopleTracker::p_Settings [protected] |
Definition at line 247 of file PeopleTracker.h.
ofxTSPS::View ofxTSPS::PeopleTracker::processedView [protected] |
Definition at line 285 of file PeopleTracker.h.
Scene ofxTSPS::PeopleTracker::scene [protected] |
Definition at line 230 of file PeopleTracker.h.
TCPSender ofxTSPS::PeopleTracker::tcpClient [protected] |
Definition at line 258 of file PeopleTracker.h.
vector<Person*> ofxTSPS::PeopleTracker::trackedPeople [protected] |
Definition at line 229 of file PeopleTracker.h.
Processor* ofxTSPS::PeopleTracker::tspsProcessor [protected] |
Definition at line 215 of file PeopleTracker.h.
TUIOSender ofxTSPS::PeopleTracker::tuioClient [protected] |
Definition at line 254 of file PeopleTracker.h.
ofImage ofxTSPS::PeopleTracker::warpedImage [protected] |
Definition at line 233 of file PeopleTracker.h.
Definition at line 260 of file PeopleTracker.h.
float ofxTSPS::PeopleTracker::width [protected] |
Definition at line 241 of file PeopleTracker.h.