Silverfrost Forums

Welcome to our forums

Reading text from a bmp file

6 Jul 2015 7:45 #16555

I'm trying to automate something.

As a first step, I have a bitmap file - like the one in the link below

https://files.staehleprecision.com/Heidenhain/LS703704replacement/Scale%20Drawings/

I want my fortran code to read some text in this bmp file.

Is it possible?[/url]

6 Jul 2015 10:06 #16556

Eagerly looking forward for some help, Sirs 😃

7 Jul 2015 8:55 #16557

Oh Drat, there I was thinking that Paul would come up with an undocumented function GET_TEXT_FROM_IMAGE@ and the job would be done! (Just joking ...)

I agree with John that it is a really difficult task. OCR is hard enough, although the technology exists and it might work well enough on large clearly defined character strings in your image, because engineering drawings usually use 'stick' fonts in a limited range of sizes. However, as engineering drawings are rarely done on paper sizes as small as A3 (quite often on A1 or A0) then a BMP is likely to be low resolution or with too few pixels to get a good recognition of the characters.

Anyway, once you have the text, what are you going to do with it without the drawing it relates to? Translate them to Sanskrit and rewrite them on the image?

Perhaps, if the drawings were done originally in software such as AutoCAD, you would be better off just reading the data file for that and sifting out the text strings. Many versions of AutoCAD save files in plain text ...

Please login to reply.