private boolean backwardsValidation ( int indexSrc , int bestIndex ) { double bestScoreV = maxError ; int bestIndexV = - 1 ; D d_forward = descDst . get ( bestIndex ) ; setActiveSource ( locationDst . get ( bestIndex ) ) ; for ( int j = 0 ; j < locationSrc . size ( ) ; j ++ ) { // compute distance between the two features double distance = computeDistanceToSource ( locationSrc . get ( j ) ) ; if ( distance > maxDistance ) continue ; D d_v = descSrc . get ( j ) ; double score = scoreAssociation . score ( d_forward , d_v ) ; if ( score < bestScoreV ) { bestScoreV = score ; bestIndexV = j ; } } return bestIndexV == indexSrc ; }
Finds the best match for an index in destination and sees if it matches the source index