48 m_BoundingRectangleAngle = 0.0;
51 m_AbsoluteSpeedAverage = 0;
52 m_AbsoluteAccelerationAverage = 0;
53 m_AbsoluteTorqueAverage = 0;
67 m_DeltaValidFeatures = 0;
160 if ( p_Tick>=0 && p_InstanceRecord.
m_Tick<0) p_InstanceRecord.
m_Tick = p_Tick;
161 else if ( p_Tick == -1 ) {
176 m_History.Set( rec_posl, p_InstanceRecord );
213 MODebug2->
Message(
"moTrackerSystemHistory::SaveToFile > not implemented! argument: " + filename);
219 MODebug2->
Message(
"moTrackerSystemHistory::SaveToXML > not implemented! argument: " + filename);
230 moTUIOSystemData::moTUIOSystemData() {
232 currentFrameTime = TuioTime::getSessionTime().getSeconds();
233 currentFrame = sessionID = maxCursorID = -1;
234 verbose = updateObject = updateCursor =
false;
235 lastObjectUpdate = lastCursorUpdate = currentFrameTime.getSeconds();
237 periodic_update =
false;
241 moTUIOSystemData::~moTUIOSystemData() {
246 TuioObject* moTUIOSystemData::addTuioObject(
int f_id,
float x,
float y,
float a) {
248 TuioObject *tobj =
new TuioObject(currentFrameTime, sessionID, f_id, x, y, a);
249 objectList.push_back(tobj);
253 std::cout <<
"add obj " << tobj->getSymbolID() <<
" (" << tobj->getSessionID() <<
") "<< tobj->getX() <<
" " << tobj->getY() <<
" " << tobj->getAngle() << std::endl;
258 void moTUIOSystemData::addExternalTuioObject(TuioObject *tobj) {
259 if (tobj==NULL)
return;
260 objectList.push_back(tobj);
264 std::cout <<
"add obj " << tobj->getSymbolID() <<
" (" << tobj->getSessionID() <<
") "<< tobj->getX() <<
" " << tobj->getY() <<
" " << tobj->getAngle() << std::endl;
267 void moTUIOSystemData::updateTuioObject(TuioObject *tobj,
float x,
float y,
float a) {
268 if (tobj==NULL)
return;
269 if (tobj->getTuioTime()==currentFrameTime)
return;
270 tobj->update(currentFrameTime,x,y,a);
273 if (verbose && tobj->isMoving())
274 std::cout <<
"set obj " << tobj->getSymbolID() <<
" (" << tobj->getSessionID() <<
") "<< tobj->getX() <<
" " << tobj->getY() <<
" " << tobj->getAngle()
275 <<
" " << tobj->getXSpeed() <<
" " << tobj->getYSpeed() <<
" " << tobj->getRotationSpeed() <<
" " << tobj->getMotionAccel() <<
" " << tobj->getRotationAccel() << std::endl;
278 void moTUIOSystemData::updateExternalTuioObject(TuioObject *tobj) {
279 if (tobj==NULL)
return;
281 if (verbose && tobj->isMoving())
282 std::cout <<
"set obj " << tobj->getSymbolID() <<
" (" << tobj->getSessionID() <<
") "<< tobj->getX() <<
" " << tobj->getY() <<
" " << tobj->getAngle()
283 <<
" " << tobj->getXSpeed() <<
" " << tobj->getYSpeed() <<
" " << tobj->getRotationSpeed() <<
" " << tobj->getMotionAccel() <<
" " << tobj->getRotationAccel() << std::endl;
286 void moTUIOSystemData::removeTuioObject(TuioObject *tobj) {
287 if (tobj==NULL)
return;
288 objectList.remove(tobj);
293 std::cout <<
"del obj " << tobj->getSymbolID() <<
" (" << tobj->getSessionID() <<
")" << std::endl;
296 void moTUIOSystemData::removeExternalTuioObject(TuioObject *tobj) {
297 if (tobj==NULL)
return;
298 objectList.remove(tobj);
302 std::cout <<
"del obj " << tobj->getSymbolID() <<
" (" << tobj->getSessionID() <<
")" << std::endl;
305 TuioCursor* moTUIOSystemData::addTuioCursor(
float x,
float y) {
308 int cursorID = (int)cursorList.size();
309 if (((
int)(cursorList.size())<=maxCursorID) && ((int)(freeCursorList.size())>0)) {
310 std::list<TuioCursor*>::iterator closestCursor = freeCursorList.begin();
312 for(std::list<TuioCursor*>::iterator iter = freeCursorList.begin();iter!= freeCursorList.end(); iter++) {
313 if((*iter)->getDistance(x,y)<(*closestCursor)->getDistance(x,y)) closestCursor = iter;
316 TuioCursor *freeCursor = (*closestCursor);
317 cursorID = (*closestCursor)->getCursorID();
318 freeCursorList.erase(closestCursor);
320 }
else maxCursorID = cursorID;
322 TuioCursor *tcur =
new TuioCursor(currentFrameTime, sessionID, cursorID, x, y);
323 cursorList.push_back(tcur);
327 std::cout <<
"add cur " << tcur->getCursorID() <<
" (" << tcur->getSessionID() <<
") " << tcur->getX() <<
" " << tcur->getY() << std::endl;
332 void moTUIOSystemData::addExternalTuioCursor(TuioCursor *tcur) {
333 if (tcur==NULL)
return;
334 cursorList.push_back(tcur);
338 std::cout <<
"add cur " << tcur->getCursorID() <<
" (" << tcur->getSessionID() <<
") " << tcur->getX() <<
" " << tcur->getY() << std::endl;
341 void moTUIOSystemData::updateTuioCursor(TuioCursor *tcur,
float x,
float y) {
342 if (tcur==NULL)
return;
343 if (tcur->getTuioTime()==currentFrameTime)
return;
344 tcur->update(currentFrameTime,x,y);
347 if (verbose && tcur->isMoving())
348 std::cout <<
"set cur " << tcur->getCursorID() <<
" (" << tcur->getSessionID() <<
") " << tcur->getX() <<
" " << tcur->getY()
349 <<
" " << tcur->getXSpeed() <<
" " << tcur->getYSpeed() <<
" " << tcur->getMotionAccel() <<
" " << std::endl;
352 void moTUIOSystemData::updateExternalTuioCursor(TuioCursor *tcur) {
353 if (tcur==NULL)
return;
355 if (verbose && tcur->isMoving())
356 std::cout <<
"set cur " << tcur->getCursorID() <<
" (" << tcur->getSessionID() <<
") " << tcur->getX() <<
" " << tcur->getY()
357 <<
" " << tcur->getXSpeed() <<
" " << tcur->getYSpeed() <<
" " << tcur->getMotionAccel() <<
" " << std::endl;
360 void moTUIOSystemData::removeTuioCursor(TuioCursor *tcur) {
361 if (tcur==NULL)
return;
362 cursorList.remove(tcur);
363 tcur->remove(currentFrameTime);
367 std::cout <<
"del cur " << tcur->getCursorID() <<
" (" << tcur->getSessionID() <<
")" << std::endl;
369 if (tcur->getCursorID()==maxCursorID) {
373 if (cursorList.size()>0) {
374 std::list<TuioCursor*>::iterator clist;
375 for (clist=cursorList.begin(); clist != cursorList.end(); clist++) {
376 int cursorID = (*clist)->getCursorID();
377 if (cursorID>maxCursorID) maxCursorID=cursorID;
380 freeCursorBuffer.clear();
381 for (std::list<TuioCursor*>::iterator flist=freeCursorList.begin(); flist != freeCursorList.end(); flist++) {
382 TuioCursor *freeCursor = (*flist);
383 if (freeCursor->getCursorID()>maxCursorID)
delete freeCursor;
384 else freeCursorBuffer.push_back(freeCursor);
386 freeCursorList = freeCursorBuffer;
389 for (std::list<TuioCursor*>::iterator flist=freeCursorList.begin(); flist != freeCursorList.end(); flist++) {
390 TuioCursor *freeCursor = (*flist);
393 freeCursorList.clear();
395 }
else if (tcur->getCursorID()<maxCursorID) {
396 freeCursorList.push_back(tcur);
400 void moTUIOSystemData::removeExternalTuioCursor(TuioCursor *tcur) {
401 if (tcur==NULL)
return;
402 cursorList.remove(tcur);
406 std::cout <<
"del cur " << tcur->getCursorID() <<
" (" << tcur->getSessionID() <<
")" << std::endl;
409 long moTUIOSystemData::getSessionID() {
414 long moTUIOSystemData::getFrameID() {
418 TuioTime moTUIOSystemData::getFrameTime() {
419 return currentFrameTime;
422 void moTUIOSystemData::initFrame(TuioTime ttime) {
423 currentFrameTime = ttime;
427 void moTUIOSystemData::commitFrame() {
472 updateCursor =
false;
473 updateObject =
false;
477 TuioObject* moTUIOSystemData::getTuioObject(
long s_id) {
478 for (std::list<TuioObject*>::iterator iter=objectList.begin(); iter != objectList.end(); iter++)
479 if((*iter)->getSessionID()==s_id)
return (*iter);
484 TuioCursor* moTUIOSystemData::getTuioCursor(
long s_id) {
485 for (std::list<TuioCursor*>::iterator iter=cursorList.begin(); iter != cursorList.end(); iter++)
486 if((*iter)->getSessionID()==s_id)
return (*iter);
491 TuioObject* moTUIOSystemData::getClosestTuioObject(
float xp,
float yp) {
493 TuioObject *closestObject = NULL;
494 float closestDistance = 1.0f;
496 for (std::list<TuioObject*>::iterator iter=objectList.begin(); iter != objectList.end(); iter++) {
497 float distance = (*iter)->getDistance(xp,yp);
498 if(distance<closestDistance) {
499 closestObject = (*iter);
500 closestDistance = distance;
504 return closestObject;
507 TuioCursor* moTUIOSystemData::getClosestTuioCursor(
float xp,
float yp) {
509 TuioCursor *closestCursor = NULL;
510 float closestDistance = 1.0f;
512 for (std::list<TuioCursor*>::iterator iter=cursorList.begin(); iter != cursorList.end(); iter++) {
513 float distance = (*iter)->getDistance(xp,yp);
514 if(distance<closestDistance) {
515 closestCursor = (*iter);
516 closestDistance = distance;
520 return closestCursor;
523 std::list<TuioObject*> moTUIOSystemData::getTuioObjects() {
527 std::list<TuioCursor*> moTUIOSystemData::getTuioCursors() {
531 std::list<TuioObject*> moTUIOSystemData::getUntouchedObjects() {
533 std::list<TuioObject*> untouched;
534 for (std::list<TuioObject*>::iterator tuioObject = objectList.begin(); tuioObject!=objectList.end(); tuioObject++) {
535 TuioObject *tobj = (*tuioObject);
536 if (tobj->getTuioTime()!=currentFrameTime) untouched.push_back(tobj);
541 void moTUIOSystemData::stopUntouchedMovingObjects() {
543 std::list<TuioObject*> untouched;
544 for (std::list<TuioObject*>::iterator tuioObject = objectList.begin(); tuioObject!=objectList.end(); tuioObject++) {
546 TuioObject *tobj = (*tuioObject);
547 if ((tobj->getTuioTime()!=currentFrameTime) && (tobj->isMoving())) {
548 tobj->stop(currentFrameTime);
558 void moTUIOSystemData::removeUntouchedStoppedObjects() {
560 std::list<TuioObject*>::iterator tuioObject = objectList.begin();
561 while (tuioObject!=objectList.end()) {
562 TuioObject *tobj = (*tuioObject);
563 if ((tobj->getTuioTime()!=currentFrameTime) && (!tobj->isMoving())) {
564 removeTuioObject(tobj);
565 tuioObject = objectList.begin();
571 std::list<TuioCursor*> moTUIOSystemData::getUntouchedCursors() {
573 std::list<TuioCursor*> untouched;
574 for (std::list<TuioCursor*>::iterator tuioCursor = cursorList.begin(); tuioCursor!=cursorList.end(); tuioCursor++) {
575 TuioCursor *tcur = (*tuioCursor);
576 if (tcur->getTuioTime()!=currentFrameTime) untouched.push_back(tcur);
581 void moTUIOSystemData::stopUntouchedMovingCursors() {
583 std::list<TuioCursor*> untouched;
584 for (std::list<TuioCursor*>::iterator tuioCursor = cursorList.begin(); tuioCursor!=cursorList.end(); tuioCursor++) {
585 TuioCursor *tcur = (*tuioCursor);
586 if ((tcur->getTuioTime()!=currentFrameTime) && (tcur->isMoving())) {
587 tcur->stop(currentFrameTime);
598 void moTUIOSystemData::removeUntouchedStoppedCursors() {
600 if (cursorList.size()==0)
return;
601 std::list<TuioCursor*>::iterator tuioCursor = cursorList.begin();
602 while (tuioCursor!=cursorList.end()) {
603 TuioCursor *tcur = (*tuioCursor);
604 if ((tcur->getTuioTime()!=currentFrameTime) && (!tcur->isMoving())) {
605 removeTuioCursor(tcur);
606 tuioCursor = cursorList.begin();
804 float i = floor( x * (
float)
_zonewf );
805 float j = floor( y * (
float)
_zonehf );
807 int pos = (int)i + ((
int)j)*
m_ZoneW ;
817 return moVector2f( (1.0/ (2.0*
float(m_ZoneW))) + (
float)i / (
float) m_ZoneW, (1.0/(2.0*
float(
m_ZoneH))) + (
float)j / (
float)
m_ZoneH);
831 if ( PosRePos.
X() > 0 && PosRePos.
Y() >= 0 ) {
832 Teta = atan( PosRePos.
Y() / PosRePos.
X() );
833 }
else if ( PosRePos.
X() > 0 && PosRePos.
Y() < 0 ) {
835 }
else if( PosRePos.
X() < 0 ) {
837 }
else if (PosRePos.
X() == 0 && PosRePos.
Y() > 0) {
839 }
else if (PosRePos.
X() == 0 && PosRePos.
Y() < 0) {
843 Radius = PosRePos.
Length();
846 MaxRadius = fabs( MaxCuad.
Length() / 2.0);
847 ( MaxRadius > 0 ) ? MaxRadius = MaxRadius : MaxRadius = 1.5;
850 float j = floor( ( Radius / MaxRadius ) * (
float)
_zonechf );
852 return ( (
int)i + ((
int)j)*
m_ZoneCW );
870 MaxRadius = fabs( MaxCuad.
Length() / 2.0 );
871 ( MaxRadius > 0 ) ? MaxRadius = MaxRadius : MaxRadius = 1.5;
874 Radius = ( MaxRadius * (j+1) ) /
_zonechf;
878 x = Radius * cos ( Teta ) + PosRePos.
X();
879 y = Radius * sin ( Teta ) + PosRePos.
Y();
895 if ( pos >=0 && pos <
m_Zones ) {
902 if ( posi >=0 && posi <
m_Zones ) {
1048 glColor4f( 1.0, 0.0, 0.0, 1.0 );
1051 glDisable( GL_TEXTURE_2D );
1052 glPolygonMode( GL_FRONT_AND_BACK, GL_LINE );
1055 glLineWidth((GLfloat)2.0);
1057 glVertex2f((x - 0.5*d)*w, (y - 0.5*d)*h);
1058 glVertex2f((x - 0.5*d)*w, (y + 0.5*d)*h);
1059 glVertex2f((x + 0.5*d)*w, (y + 0.5*d)*h);
1060 glVertex2f((x + 0.5*d)*w, (y - 0.5*d)*h);
1063 glLineWidth((GLfloat)1.0);
1066 glVertex2f( x*w, (y - 0.1*d)*h);
1067 glVertex2f( x*w, (y + 0.1*d)*h);
1070 glVertex2f( x*w, (y + 0.1*d)*h);
1071 glVertex2f( (x-0.0008*d)*w, (y + 0.1*d - 0.0008*d)*h);
1073 glVertex2f((x - 0.1*d)*w, y*d*h);
1074 glVertex2f((x + 0.1*d)*w, y*d*h);
1077 glVertex2f((x + 0.1*d)*w, y*d*h);
1078 glVertex2f((x + 0.1*d - 0.0008*d)*w, (y+0.0008)*h);
1083 #endif // OPENGLESV2
1096 x = (pF->
x) - offsetx;
1097 y = (pF->
y) - offsety;
1098 float tr_x = (pF->
tr_x) - offsetx;
1099 float tr_y = (pF->
tr_y) - offsety;
1108 glBindTexture(GL_TEXTURE_2D,0);
1109 glColor4f(1.0, 0.0, 0.0, 0.15);
1122 glColor4f(1.0, 0.0, 0.0, 1.0);
1126 glVertex2f((x - 0.008*d)*w, (y - 0.008*d)*h);
1127 glVertex2f((x - 0.008*d)*w, (y + 0.008*d)*h);
1128 glVertex2f((x + 0.008*d)*w, (y + 0.008*d)*h);
1129 glVertex2f((x + 0.008*d)*w, (y - 0.008*d)*h);
1134 glColor4f(1.0, 1.0, 1.0, 1.0);
1136 glColor4f(1.0, 0.0, 0.0, 1.0);
1138 glBindTexture(GL_TEXTURE_2D,0);
1139 glDisable(GL_TEXTURE_2D);
1140 glLineWidth((GLfloat)1.2);
1144 glVertex2f( x*w, y*h);
1145 glVertex2f( tr_x*w, tr_y*h);
1246 glPolygonMode( GL_FRONT_AND_BACK, GL_LINE );
1256 glBindTexture(GL_TEXTURE_2D,0);
1257 glDisable(GL_TEXTURE_2D);
1258 glColor4f(1.0, 1.0, 0.0, 1.0);
1265 glVertex2f((m_TrackerBarycenter.
X() - 0.02)*w, (m_TrackerBarycenter.
Y() - 0.02)*h);
1267 glVertex2f((m_TrackerBarycenter.
X() - 0.02)*w, (m_TrackerBarycenter.
Y() + 0.02)*h);
1269 glVertex2f((m_TrackerBarycenter.
X() + 0.02)*w, (m_TrackerBarycenter.
Y() + 0.02)*h);
1271 glVertex2f((m_TrackerBarycenter.
X() + 0.02)*w, (m_TrackerBarycenter.
Y() - 0.02)*h);
1278 glColor4f(0.0, 1.0, 0.0, 1.0);
1279 glLineWidth((GLfloat)1.0);
1283 glVertex2f( m_TrackerMin.
X()*w, m_TrackerMax.
Y()*h);
1284 glVertex2f( m_TrackerMax.
X()*w, m_TrackerMax.
Y()*h);
1285 glVertex2f( m_TrackerMax.
X()*w, m_TrackerMin.
Y()*h);
1286 glVertex2f( m_TrackerMin.
X()*w, m_TrackerMin.
Y()*h);
1291 glColor4f(0.0, 1.0, 1.0, 1.0);
1292 glLineWidth((GLfloat)1.5);
1295 glVertex2f( m_TrackerBarycenter.
X()*w - m_TrackerVariance.
X()*w*5, m_TrackerBarycenter.
Y()*h-m_TrackerVariance.
Y()*h*5);
1296 glVertex2f( m_TrackerBarycenter.
X()*w + m_TrackerVariance.
X()*w*5, m_TrackerBarycenter.
Y()*h-m_TrackerVariance.
Y()*h*5);
1297 glVertex2f( m_TrackerBarycenter.
X()*w + m_TrackerVariance.
X()*w*5, m_TrackerBarycenter.
Y()*h+m_TrackerVariance.
Y()*h*5);
1298 glVertex2f( m_TrackerBarycenter.
X()*w - m_TrackerVariance.
X()*w*5, m_TrackerBarycenter.
Y()*h+m_TrackerVariance.
Y()*h*5);
1310 glEnable( GL_BLEND );
1311 glDisable(GL_TEXTURE_2D);
1312 glBlendFunc (GL_SRC_ALPHA, GL_ONE);
1319 float off_w, off_h, off_w_m, off_h_m;
1320 off_w = off_h = 1.0 / 8.0;
1323 off_w = 1.0 / ( (float)(
m_ZoneW)*2.0 );
1326 off_h = 1.0 / ( float(
m_ZoneH)*2.0 );
1328 off_w_m = off_w - off_w/8.0;
1329 off_h_m = off_h - off_h/8.0;
1341 poscuad =
moVector2f( poscuad.
X()-offsetx, poscuad.
Y()-offsety);
1344 glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
1347 glColor4f(0.5, 0.5, 0.0, 0.002);
1350 glVertex2f((poscuad.
X() - off_w)*w, (poscuad.
Y() - off_h)*h);
1351 glVertex2f((poscuad.
X() - off_w)*w, (poscuad.
Y() + off_h)*h);
1352 glVertex2f((poscuad.
X() + off_w)*w, (poscuad.
Y() + off_h)*h);
1353 glVertex2f((poscuad.
X() + off_w)*w, (poscuad.
Y() - off_h)*h);
1361 glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
1364 glColor4f(0.0, 0.0, 0.5, 0.02);
1367 glVertex2f((poscuad.
X() - off_w_m)*w, (poscuad.
Y() - off_h_m)*h);
1368 glVertex2f((poscuad.
X() - off_w_m)*w, (poscuad.
Y() + off_h_m)*h);
1369 glVertex2f((poscuad.
X() + off_w_m)*w, (poscuad.
Y() + off_h_m)*h);
1370 glVertex2f((poscuad.
X() + off_w_m)*w, (poscuad.
Y() - off_h_m)*h);
1379 glPolygonMode( GL_FRONT_AND_BACK, GL_LINE );
1382 for(
int cc=0; cc <
m_ZonesC; cc++) {
1404 poscuadC =
moVector2f( poscuadC.
X()-offsetx, poscuadC.
Y()-offsety);
1409 glColor4f( 0.3+0.2*(
float)cc/(m_ZonesC-1), 0.3+0.2*(
float)cc/(m_ZonesC-1), 0.2, 0.0015);
1411 glPolygonMode( GL_FRONT_AND_BACK, GL_LINE );
1414 glColor4f( 0.7+0.3*(
float)cc/(m_ZonesC-1), 0.0, 0.0, 0.0025);
1416 glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
1425 glVertex2f( poscuadC.
X()*w, poscuadC.
Y()*h);
1426 glVertex2f( p2.
X()*w, p2.
Y()*h);
1427 glVertex2f( p3.
X()*w, p3.
Y()*h);
1428 glVertex2f( p4.
X()*w, p4.
Y()*h);
1436 glColor4f( 0.0, 0.0, 0.5+0.5*(
float)cc/(m_ZonesC-1), 0.0025);
1448 glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
1459 x = -1; y = -1;
valid =
false;
1523 printf(
"Pos:\t%10.5f,%10.5f\t(%7.2f,%7.2f)\n",
normx,
normy,x,y);
1535 printf(
"(%7.2f,%7.2f)\n", x, y);
1537 printf(
"(%7.2f,%7.2f) -> (%7.2f,%7.2f)\n",
track[n-1]->
X(),
track[n-1]->
Y(), x, y);
1546 int moTrackerFeature::updatePos(
float kltConvergeThreshold,
float kltSSDthresh,
int kltborder,
float delta,
float res,
float d1,
float d2,
float w,
float h)
1549 kltConvergeThreshold = 0.0;
1555 if (res > kltSSDthresh)
1557 else if (d1 < 0.0 && d2 < 0.0)
1571 if ( (x < kltborder) || (x > (w - kltborder)) || (y < kltborder) || (y > (h - kltborder)) )
1574 discardFlag =
false;
moVector2f m_BarycenterMotion
void StartRecording(long maxtime=60000, long granularity=30)
Empieza a grabar.
moDefineDynamicArray(moTrackerFeatureArray) moDefineDynamicArray(moTrackerInstanceRecords)
virtual void DrawFeatures(float w, float h, float offsetx, float offsety)
virtual MOboolean Finish()
long m_Tick
operador de copia, y seteo de timers
void printTracks()
Imprime el valor de los valores trazados por este punto.
moVector2fpArray track
list of feature positions in the past frames. Forms the feature tracks in video.
void SetName(const moText &p_name)
virtual void SetPositionMatrixC(float x, float y, int nfeatures)
POSITION CIRCULAR.
double m_AbsoluteAccelerationAverage
cantidad de movimiento
moVector4< MOfloat > moVector4f
virtual moVector2f GetMin()
virtual void Start()
Inicia el temporizador.
virtual long Duration()
Devuelve el valor del reloj del temporizador.
#define MO_TRACKER_LARGE_RESIDUE
int val
Other states for valid feature point.
moTrackerInstanceRecord & operator=(const moTrackerInstanceRecord &src)
float v_y
Speed in the actual frame.
virtual int GetMotionMatrixC(float x, float y)
virtual moVector2f GetSpeedVariance()
virtual int GetValidFeatures()
long uframe
once recognized
moVector4f m_BoundingRectangle
virtual moTrackerFeature * GetFeature(int i)
virtual moVector2f GetBarycenter()
virtual void SetPositionMatrix(float x, float y, int nfeatures)
POSITION.
int m_ValidFeatures
0 nada, 1 todo...
float ap_y
Acceleration in the previous frame.
virtual moVector2f GetBarycenterAcceleration()
void SetResourceType(moResourceType p_restype)
virtual void SetAccelerationMatrix(float x, float y, int nfeatures)
ACCELERATION.
virtual int GetMotionMatrix(float x, float y)
#define MO_TRACKER_SMALL_DET
float vp_y
Speed in the previous frame.
virtual ~moFilterManager()
virtual int GetFeaturesCount()
virtual ~moTrackerFeature()
Destructor.
moVector2< MOfloat > moVector2f
bool is_object
once recognized
float tr_y
Feature position in the previous frame.
bool SaveToXML(moText filename)
moTrackerInstanceRecord m_ActualRecord
clase de para manejar textos
moTrackerFeature()
Constructor.
void Stop()
Detiene el temporizador.
Dispositivo de entrada/salida, típicamente, interfaces humanas de IO y datos ( teclado, mouse, tableta, tcp, udp, serial )
bool is_cursor
once recognized
virtual moVector2f ZoneToPosition(int zone)
Transforma el indice de zona al vector posicion.
long utime
once recognized
virtual void SetMax(float x, float y)
#define MO_TRACKER_NOT_FOUND
#define MO_TRACKER_TRACKED
int * m_MotionMatrix
4 x 4 zones
long sframe
once recognized
long stime
once recognized
virtual ~moTrackerSystemData()
int * m_CircularMotionMatrix
12 semitones, 3 levels
virtual void ResetMatrix()
virtual ~moTrackerSystemHistory()
void Pause()
Congela o pausa el temporizador.
moTrackerFeature & operator=(const moTrackerFeature &src)
virtual void SetMotionMatrix(float x, float y, int nfeatures)
MOTION.
moTrackerInstanceRecords m_History
virtual int PositionToZoneC(float x, float y)
Transforma el vector de posicion (0..1) a coordenadas polares luego al indice de zona de la matriz...
#define MO_TRACKER_MAX_ITERATIONS
void print()
Imprime los detalles de este punto.
virtual moVector2f GetAccelerationVariance()
void SetLabelName(const moText &p_labelname)
void Continue()
Prosigue el temporizador.
bool is_parent
once recognized
bool valid
True for a valid feature point.
moTrackerFeatureArray FeaturesCaptured
virtual int GetDeltaValidFeatures()
The Y component of space.
static moDebug * MODebug2
Clase de impresión de errores para depuración
moTrackerFeature * Parent
bool SaveToFile(moText filename)
void Record(moTrackerInstanceRecord &p_InstanceRecord, long p_Tick=-1)
virtual void SetMin(float x, float y)
double m_SurfaceCovered
separa formas de fondo
The X component of space.
virtual moVector2f GetBarycenterMotion()
virtual int GetAccelerationMatrix(float x, float y)
float t_y
Torque in the actual frame.
moTrackerSystemHistory m_History
moTrackerInstanceRecord & Get(int index)
moVector2f m_SpeedVariance
int * m_AccelerationMatrix
4 x 4 zones
double m_BoundingRectangleAngle
cantidad de fuerzas
void PauseRecording()
Util cuando no hay señales interesantes...
virtual moVector2f GetVariance()
virtual int GetPositionMatrix(float x, float y)
moVector2f m_AccelerationVariance
LIBMOLDEO_API moText0 IntToStr(int a)
bool Started() const
Devuelve el estado del temporizador.
virtual moTrackerFeatureArray & GetFeatures()
double m_AbsoluteTorqueAverage
cantidad de cambios de velocidad
virtual void SetMotionMatrixC(float x, float y, int nfeatures)
float normy
Normalized Feature Coordinates [ 0 - 1 ].
Característica de seguimiento ( sensado )
void Message(moText p_text)
Anuncia un mensaje al usuario además de guardarlo en el log de texto.
virtual int GetPositionMatrixC(float x, float y)
virtual moVector2f GetMax()
moTrackerFeatureArray m_Features
void SetType(moMoldeoObjectType p_type)
virtual moVector4f GetBoundingRectangle()
int updatePos(float kltConvergeThreshold, float kltSSDthresh, int kltborder, float delta, float res, float d1, float d2, float w, float h)
Update Feature Positions.
double m_AbsoluteSpeedAverage
Matrix de características.
moVector2f m_BarycenterAcceleration
virtual int PositionToZone(float x, float y)
Transforma el vector de posicion (0..1) al indice de zona de la matriz cuadrada.
int * m_CircularPositionMatrix
4 x 4 zones
virtual moVector2f ZoneToPositionC(int zone)
Transforma el indice de zona al vector posicion circular!
float a_y
Acceleration in the actual frame.