public boolean process ( FastQueue < AssociatedPair > pairs , Rectangle2D_F64 targetRectangle ) { // estimate how the rectangle has changed and update it if ( ! estimateMotion . process ( pairs . toList ( ) ) ) return false ; ScaleTranslate2D motion = estimateMotion . getModelParameters ( ) ; adjustRectangle ( targetRectangle , motion ) ; if ( targetRectangle . p0 . x < 0 || targetRectangle . p0 . y < 0 ) return false ; if ( targetRectangle . p1 . x >= imageWidth || targetRectangle . p1 . y >= imageHeight ) return false ; return true ; }
Adjusts target rectangle using track information