Home || Visual Search || Applications || Architecture || 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.
danger: - if the new rectangle lies outside the image, ObjectRepresentation::Reset and SearcherBase::Reset, might have problems

Definition at line 126 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().

00127     {
00128         if(pos.translation.x < 0)
00129             pos.translation.x = 0;
00130         if(pos.translation.y < 0)
00131             pos.translation.y = 0;
00132         if(pos.translation.x >= mWidth-pos.size.x)
00133             pos.translation.x = mWidth-pos.size.x-1;
00134         if(pos.translation.y >= mHeight-pos.size.y)
00135             pos.translation.y = mHeight-pos.size.y-1;
00136 
00137     }


Generated on Thu Jan 13 09:21:07 2011 for ImpalaSrc by  doxygen 1.5.1