One embodiment of the present invention provides a system that removes
noise from an image. During operation, the system first identifies blobs
in the image, wherein a blob is a set of contiguous pixels which possibly
represents a character or a portion of a character in the image. Next,
the system analyzes the blobs to dynamically determine a "noise
threshold" for the blobs. The system then removes blobs from the image
which are below the noise threshold.