Otsu thresholding is an effective thresholding method for images with low signal-to-noise ratios and low contrast. It assumes a bimodal histogram with two peaks, foreground and background, and finds a threshold that minimizes intra-class variance. 2D Otsu thresholding uses a joint 2D histogram of pixel values and local neighborhood averages to find an optimal threshold vector, improving segmentation especially for noisy images. The algorithm calculates the 2D histogram, finds probabilities and mean values, and selects the threshold pair that maximizes between-class variance. On a noisy test image, 2D Otsu thresholding produces a clean binary segmentation with the threshold pair (171, 171).