Improved match_binary_descriptors function