views:

32

answers:

2

Assume the image is only in black and white.

Is there a software that can generate a matrix representation for the text on the image?

+1  A: 

You should take a look at OCR-Software.

Ham
No,I just need the pixels
A: 

If you're referring to an image like the one below, then it's pretty straight forward.

alt text

You just do the following:

  • Read the image into a 2D byte array so you can access the pixels
  • Loop through the array and look for every black pixel (0)
  • Store these in a matrix however you need to

This assumes that lettering is pure black on white, you might have to allow values upto a certain value (5 or 10) if this isn't the case.

Matt Warren
It depends of what is needed, if each character is needed, then it is a little bit more complex than this approach.And text angle also is important
maximus