boolean fitEpipolar ( FastQueue < AssociatedIndex > matches , List < Point2D_F64 > pointsA , List < Point2D_F64 > pointsB , ModelMatcher < ? , AssociatedPair > ransac , PairwiseImageGraph . Motion edge ) { pairs . resize ( matches . size ) ; for ( int i = 0 ; i < matches . size ; i ++ ) { AssociatedIndex a = matches . get ( i ) ; pairs . get ( i ) . p1 . set ( pointsA . get ( a . src ) ) ; pairs . get ( i ) . p2 . set ( pointsB . get ( a . dst ) ) ; } if ( ! ransac . process ( pairs . toList ( ) ) ) return false ; int N = ransac . getMatchSet ( ) . size ( ) ; for ( int i = 0 ; i < N ; i ++ ) { AssociatedIndex a = matches . get ( ransac . getInputIndex ( i ) ) ; edge . associated . add ( a . copy ( ) ) ; } return true ; }
Uses ransac to fit an epipolar model to the associated features . Adds list of matched features to the edge .