oa::image::bf_match
Brute-force Hamming descriptor matching: for each row of query, scan every row of train and record the two smallest XOR popcount distances. Both inputs are U8 [N, D] matrices sharing D. Returns an F32 [N_query, 4] matrix whose rows are (best_index, best_distance, second_index, second_distance), mirroring BFMatcher.knnMatch(k=2) on NORM_HAMMING. Rows with fewer than two candidates fill unused columns with -1. Errors Returns an error unless both inputs are nonempty U8 matrices with identical trailing descriptor width and at least one row each.
Function Documentation
Brute-force Hamming descriptor matching: for each row of query, scan every row of train and record the two smallest XOR popcount distances. Both inputs are U8 [N, D] matrices sharing D. Returns an F32 [N_query, 4] matrix whose rows are (best_index, best_distance, second_index, second_distance), mirroring BFMatcher.knnMatch(k=2) on NORM_HAMMING. Rows with fewer than two candidates fill unused columns with -1. Errors Returns an error unless both inputs are nonempty U8 matrices with identical trailing descriptor width and at least one row each.