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