Automatic thresholding of the gray-level values of an image is very useful in automated analysis of morphological images, and it represents the first step in many applications in image understanding. Recently it was shown that by choosing the threshold as the value that maximizes the entropy of the 1-dimensional histogram of an image, one might be able to separate, effectively, the desired objects from the background. This approach, however, does not take into consideration the spatial correlation between the pixels in an image. Thus, the performance might degrade rapidly as the spatial interaction between pixels becomes more dominant than the gray-level values. In this case, it becomes difficult to isolate the object from the background and human interference might be required. This was observed during studies that involved images of the stomach. The objective of this report is to extend the entropy-based thresholding algorithm to the 2-dimensional histogram. In this approach, the gray-level value of each pixel as well as the average value of its immediate neighborhood is studied. Thus, the threshold is a vector and has two entries: the gray level of the pixel and the average gray level of its neighborhood. The vector that maximizes the 2-dimensional entropy is used as the 2-dimensional threshold. This method was then compared to the conventional 1-dimensional entropy-based method. Several images were synthesized and others were obtained from the hospital files that represent images of the stomach of patients. It was found that the proposed approach performs better specially when the signal to noise ratio (SNR) is decreased. Both, as expected, yielded good results when the SNR was high (more than 12 dB).