简体   繁体   中英

What's the easiest solution to get digitalized representation of the text on an image?

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?

你应该看看OCR -软件。

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

替代文字

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM