Optimal detection of the feature matching map in presence of noise and outliers