This study focuses on creating a crater-matching algorithm to improve the matching rate and address the phenomenon of insufficient feature extraction and mismatching of irregular celestial objects and crater edge information on the dim surface of celestial bodies images. These images were captured by the detector’s navigation camera. In order to improve the brightness and clarity of the images, the target images were filtered, denoised, and image-enhanced using the bilateral filtering method and improved histogram equalization algorithm, successively. Then, the enhanced image was extracted and matched using the ORB feature point detection algorithm based on scale invariance, and the feature point mismatch was processed by the Hamming distance screening method. The simulation results revealed that the optimization algorithm effectively improved the imaging quality of the target image in dark and weak light environments, increased the number of feature points extracted, reduced the mismatch of effective feature point pairs, and improved the matching rate.