The Hausdorff distance is commonly used as a similarity measure between two-dimensional binary images. Since the document images may be contaminated by a variety of noise sources during transmission, scanning or conversion to digital form, the measure should be robust to the noise. Original Hausdorff distance has been known to be sensitive to outliers. Transforming the given image to grayscale image is one of methods to deal with the noises. In this paper, we propose a Hausdorff distance applied to grayscale images. The proposed method is tested with synthetic images with various levels of noises and compared with other methods to show its robustness.