1

I am creating a program which relies heavily on image recognition. I am doing this by taking a screenshot, and then determining whether a pre-determined image exists in the location of my screenshotting.

However, for my program, I also need to be able to take a screenshot of a location in which there will be text, specifically numbers. It will be regular, in the same font, but it will be different numbers every time.

How can I turn this kind of information from a bitmap into an integer I can use in my code?

Thanks.

JeffHeaton
  • 3,250
  • 1
  • 22
  • 33
Ethan Kershner
  • 121
  • 3
  • 13
  • http://stackoverflow.com/questions/1798077/good-opensource-ocr-in-c-sharp although it's a closed question, it might still be relevant to what you're looking for. – user2366842 May 29 '14 at 20:54
  • Don't do the character recognition yourself, it is a extremely complex task to start from scratch. As other users pointed out, look for OCR libraries instead. – Broken_Window May 29 '14 at 21:04

2 Answers2

1

This is not an easy task, it is essentially optical character recognition (OCR). There is a very similar conversation here.

OCR with the Tesseract interface

You might also want to look at this:

http://www.leadtools.com/sdk/ocr/default.htm?SrcOrigin=Google-CPC-OCR%20API&MatchType=e&AdPos=1t2&gclid=CLjXx4Gx6K8CFdA2pAodAXth1Q

Even beyond the OCR, you will need to scan the image and find the actual text, and this might be tricky as well. If the text is not always in the same location you will quickly find yourself in the "computer vision" space.

Community
  • 1
  • 1
JeffHeaton
  • 3,250
  • 1
  • 22
  • 33
0

You're going to need to look for OCR, or Optical Character Recognition, in order to pull data from images into a string. This is an entire field in and of itself, so sadly there's no simple answer, but there may be a C# library out there for you to use, or C++ if you're comfortable with wrapping.

David
  • 10,458
  • 1
  • 28
  • 40