I need an OCR algorithm

lozina

Lifer
Sep 10, 2001
11,711
8
81
I am currently searching for an algorithm to scan pixels from an image and read actual characters from it.

I am finding a ton of them on the web but just about all of them I am reading about deal with either reading someone's handwriting or some photograph. I however need something much simpler than that, it would read computer generated text from actual screen shots. No worry about degredation of photographs, no worry about rotation/skewing/noise pixels... it should be pretty basic.

HAve u run across anything that would do this and can point me in the right direction?

thanks
 

Thyme

Platinum Member
Nov 30, 2000
2,330
0
0
What are the other requirements? Do you have a position on the screen where everything is going to be relative to? Is it always the same font? Always the same line height? If so, you can have a pixel map and just make a reference then look them up in the map. That's the basic way. I'm sure you could make adjustments if your requirements were slightly different, but it's a pretty simple scenario.
 

Noobsa44

Member
Jun 7, 2005
65
0
0
You may look at Microsoft Office's OCR capabilities, which I believe do support OCR. While I have never used it myself, I've been told that this is a good way of scanning for text in a screenshot. Here is some example vb script code I borrowed from another site:

set miDoc=CreateObject("MODI.Document")
' Load an existing TIFF file.
miDoc.Create ("C:\pathname.tif")
' Perform OCR.
'You can change the mousepointer here to an hourglass or something.
miDoc.Images(0).OCR
'Change the mouse back to normal default.
set miLayout = miDoc.Images(0).Layout
stringOut=miLayout.Text
MsgBox(stringOut)
Set miLayout = Nothing
Set miDoc = Nothing