Object matching in two-dimensional images has been an important topic in computer vision, object recognition, and image analysis. The Hausdorff distance plays an important role in image matching. In order to deal with image matching problems in random noisy situations, a new Hausdorff distance is proposed in this paper. Unlike the other methods that match two binary images, the proposed method can match the gray images that have a few of pixel values. An example of object recognition is used to demonstrate the efficiency of the proposed method. The results show that, compared with MHD, the new Hausdorff distance can dispose of the noisy image matching in a more desirable manner, due to the fact that the comprehensive reflection of the gray information of neighbor pixels in the determination of the Hausdorff distance is taken into account. In addition, the proposed method can be implemented in an easy way.