private boolean checkLargeMotion ( int width , int height ) { if ( first ) { getImageCorners ( width , height , corners ) ; previousArea = computeArea ( corners ) ; first = false ; } else { getImageCorners ( width , height , corners ) ; double area = computeArea ( corners ) ; double change = Math . max ( area / previousArea , previousArea / area ) - 1 ; if ( change > maxJumpFraction ) { return true ; } previousArea = area ; } return false ; }
Looks for sudden large changes in corner location to detect motion estimation faults .