[Image-SIG] Filtering out all but black pixels for OCR

Mike Meisner mikem at blazenetme.net
Sun Jun 29 20:51:13 CEST 2008

I'd like to use PIL to prep an image file to improve OCR quality.

Specifically, I need to filter out all but black pixels from the image (i.e., convert all non-black pixels to white while retaining the black pixels).

Can someone please direct me to the appropriate PIL function/method to accomplish this along with a brief description of the correct arguments to use?

Thanks for your help.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/image-sig/attachments/20080629/f0a68808/attachment.htm>

More information about the Image-SIG mailing list