Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

void Impala::Core::Tracking::TrackerGeneralised::Clip ( Position pos  )  [inline, protected]

Actually we shouldn't clip at all, rather we should handle the situation that the object is (partially) outside the scene, when updating the object and when searching.

..

Todo:
take rotation and scale into consideration.

Definition at line 143 of file TrackerGeneralised.h.

References mHeight, mWidth, Impala::Core::Tracking::Position::size, Impala::Core::Tracking::Position::translation, Impala::Core::Tracking::Point::x, and Impala::Core::Tracking::Point::y.

Referenced by Process().

00144     {
00145         if(pos.translation.x < 0)
00146             pos.translation.x = 0;
00147         if(pos.translation.y < 0)
00148             pos.translation.y = 0;
00149         if(pos.translation.x >= mWidth-pos.size.x)
00150             pos.translation.x = mWidth-pos.size.x-1;
00151         if(pos.translation.y >= mHeight-pos.size.y)
00152             pos.translation.y = mHeight-pos.size.y-1;
00153 
00154     }


Generated on Fri Mar 19 11:22:55 2010 for ImpalaSrc by  doxygen 1.5.1