Image matching is one of the hot issues in recent years. Image matching determines the effect of image mosaic to a large extent. Therefore, a stable, accurate, and fast image matching algorithm is very important for the subsequent processing of image information. Most of the traditional image matching methods have the problems of high-error matching rate and difficulty in to eliminating false matching. To resolve the shortcomings listed here, an improved algorithm was proposed in which a combined measure of Hamming distance. Similarity measurement with Tanimoto similarity measurement was adopted to dispose binary feature vectors. In addition, as an important step in the process of image mosaics, the calculation of the best mosaics can eliminate the ghosting and ghosting that may appear in the mosaics. However, the traditional dynamic planning method is easy to pass through the obstacles and form obvious stitching traces when searching for stitching lines in images with large obstacles. In view of the aforementioned content, we propose a fast and robust method to search the image difference matrix and structure difference matrix of the overlapping area of the input image according to the search strategy to determine the pixel coordinates of the splicing line. Finally, from an optimal splicing line, the experimental results show that our algorithm performs well for eliminating error matching points. Compared with traditional algorithms, matching accuracy is improved by 25%. In terms of calculating the optimal splicing line, the method proposed is faster than the traditional method and has good robustness.