Improved automatic processing of grayscale documents
