I am trying to use Hausdorff Distance to compare a pair of test images of equal dimensions. The images undergo some kind of threshold to obtain binary images. The Hausdorff Distance is calculated for the positions with non-zero pixels in those binary images. Here, I am using Taxi Cab distance instead of Euclidean distance. To provide a point of reference I want to calculate Hausdorff Distance for Control Images. What I mean by Control images is that the control images are binary, with same dimensions as that of the pair of test images, and the value of each pixel is 0 (a pure black image) or 255 (a pure white image).
Now, since I am calculating Hausdorff Distance using the positions of non-zero pixels, I have no problem in finding Hausdorff Distance between a pair of "pure white" images. But I am unable to resolve the situation when one of the images or both images in the pair are "pure black" images since, a search for positions with non-zero pixel value in a "pure black" image will return a NULL. How to resolve this situation? How to calculate Hausdorff Distance in the presence of a NULL set (I used NULL set for lack of better words)? Is there a work around that I can use here? Please help me.
I would like to apologize if any one thinks if this question doesn't belong here. I thought it is biased towards theory than implementation. If anyone thinks otherwise, please point me to a right forum.