While answering this question, I tried TextRecognize to read single digits. But it doesn't recognize a single digit, even though the digits are clearly readable.

For example, this is not recognized.

This is my code:

digits = ImagePartition[Import["http://i.stack.imgur.com/cLncR.png"], 50];
Map[TextRecognize, digits, {2}]

• If we could do this: Map[TextRecognize[#,Range[0,9]]&, digits, {2}] it would be more likely to work. But we can't. I have asked Wolfram developers for this, maybe you should too. – Gustavo Delfino Apr 19 '12 at 11:50

(* Get your image *)
digits = ImagePartition[Import["http://i.stack.imgur.com/cLncR.png"], 50];

(* Remove Borders and Binarize *)
d1 = Binarize[ImageCrop[#, 37], .5] & /@ Flatten@digits;

(* Keep only images with content (blanks affect the OCR) *)
d2 = Select[d1, Min@ImageData@# == 0 &];

(* Assemble as a line and "read" *)
TextRecognize@ImageAssemble@d2
(*
-> "64776958729385431752328231"
*)


Edit

The following will reassemble your original image (but cleaner)

tr    = TextRecognize@ImageAssemble@d2;
posd2 = Flatten@Position[d1, x_ /; Min@ImageData@x == 0, {1}];

• If I try TextRecognize@d2[[1]], it doesn't work. Neither works for me TextRecognize@ImageAssemble[d2[[1 ;; 2]]], but TextRecognize@ImageAssemble[d2[[1 ;; 3]]] does. Do you know any minimun requirements for TextRecognize? – FJRA Apr 19 '12 at 14:02
• Yes, doing some test, I would have expected something like this to work: TextRecognize[Rasterize[5]]. And it seems that image size matters a lot: TextRecognize[Rasterize[50868, ImageSize -> 300]] vs TextRecognize[Rasterize[50868]]. Something else to take care when using TextRecognize. – FJRA Apr 19 '12 at 14:15