Closed Joe-CB closed 2 months ago
matches
is an Nx2-dimensional array. Swapping the images requires swapping the last dimension. scores
is an N-dimensional array and doesn't need any swapping. We are swapping the order of the images, not of the points.
Fix score reversal issue when matches are reversed
Issue
In the original implementation, when the matches are reversed (
reverse=True
), thematches
array is flipped, but the correspondingscores
array is not. This can cause the scores to mismatch with the reversed matches.Solution
The proposed change adds a line to flip the
scores
array in the same way thematches
array is flipped whenreverse=True
.Code Change