Optical Character Recognition in Ubuntu

Today, I was trying to capture some logs from QEMU. But unfortunately, i couldnt start logging qemu easily.
So Thought to capture the image and take up OCR to get text. Ubuntu has gocr, which i could use.

Installing gocr:

sudo apt-get install gocr

Using GOCR :

gocr -h for list of usage

Simply to extract text from a screenshot, i followed this.

raj@14:19:31:$ gocr -i ~/Pictures/Screenshot\ from\ 2012-11-25\ 14\:18\:40.png -o out.txt

Output is pretty acceptable, even though its not accurate.