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. ..
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 }
|