forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Reading text from a bmp file

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General
View previous topic :: View next topic  
Author Message
christyleomin



Joined: 08 Apr 2011
Posts: 155

PostPosted: Mon Jul 06, 2015 8:45 pm    Post subject: Reading text from a bmp file Reply with quote

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]
Back to top
View user's profile Send private message
christyleomin



Joined: 08 Apr 2011
Posts: 155

PostPosted: Mon Jul 06, 2015 11:06 pm    Post subject: Reply with quote

Eagerly looking forward for some help, Sirs Smile
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 885

PostPosted: Tue Jul 07, 2015 4:44 am    Post subject: Reply with quote

I guess the short answer is 'no'.
OCR (which is what you are asking for) is a pretty specilised/hit-n-miss affair at the best of times and you want to OCR an engineering drawing !!!
A quick google of 'ocr of an engineering drawing' should clarify that.

OCR programs alone are very complex and hit n miss for even just a simple tesxt document without any complications.

However, Assuming you had a separate software which did exactly what you are looking for with the image recognition, you could in theory run that from within a fortran program but, assuming you could get at the extracted text data files, you'd always have the unknown of what data extracted corresponded to what !

I assume this is not just a single image you're looking to scan but several hundred? thousand ? Every image will have textual data all over it in 'random' locations with no way of knowing what is where for example.

Maybe if you described exactly what you are trying to identify off the drawing(s) it would help ?
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 1824
Location: Yateley, Hants, UK

PostPosted: Tue Jul 07, 2015 9:55 am    Post subject: Reply with quote

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 ...
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 885

PostPosted: Wed Jul 08, 2015 8:41 am    Post subject: Reply with quote

I came across this paper which examines the idiot-syncricies :O) and complexities of processing the data from the scan of an engineering drawing.

https://isda.ncsa.illinois.edu/peter/publications/techreports/2009/NCSA-ISDA-2009-001.pdf

I imagine that for christyleomin its an exercise of cataloguing maybe a set of ancient drawings which is the aim of the exercise (it seems to be a tortured subject of many posts ont' net).

As you say Eddie should be a piece of cake for Paul&Co, although a GET_TEXT_FROM_IMAGE_GUESSWHEREITSFROM ANDWHEREITSHOULDGO_ANDPUTITTHERE@ ... would be more complete Smile

.. and another scanning complication that came into my head - if drawings are old they probably use a lot of strange oddfonts like those long-lost-now-found Hershey ones in SimplePlot Wink (Dan keep quiet Wink !)

There's a lot to be said for the 'using the old beady's' and typing into a file method too :O) using the still to be out-performed (for some tasks) i-human device Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group