The tesseract algorithm is available on Google Code, and is one of the best open source OCR out there.