Results 1 to 10 of 10

Thread: Original Character Recognition (OCR)

  1. #1

    Thread Starter
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Original Character Recognition (OCR)

    Need some help here guys.

    For work I need to write an app that extracts data from engineering drawings. Not the actual diagram part (phew!) but the blocks of text at the side of the drawing, things like "Drawing Title", "Drawing Number", "Drawn By (Initials)" and so on.

    The large drawings (A0 paper size) are scanned into .tif files. The normal OCR software we use (Abbyy FineReader) is great, but only for A3 paper sizes or smaller. It just can't handle big stuff.

    So I need a FREEWARE OCR component (a SDK or set of API functions) that I can build into a custom app. Problem is, I can't find a good one. Has anyone got a link to a good freeware OCR component?
    I don't live here any more.

  2. #2
    Fanatic Member TheVader's Avatar
    Join Date
    Oct 2002
    Location
    Rotterdam, the Netherlands
    Posts
    871
    That's a coincidence... I started writing one this week. In just a few days I've made a fairly usable component. It wasn't as hard as I thought it would be.

    I'll attach the source code I have so far, along with the examples I used. Try it out and let me know if this thing has a future.

    Open OpticalCharacterRecognition.vbp and run the form. Press 'Recognize' to OCR the string. Don't press Analyze because it will wrongly overwrite the resource file. You can load any of the bmp's in the picOCR box on frmOCR in design time.

    Attached Files Attached Files
    Author for Visual Basic Web Magazine

    My articles on the Web Browser Control:
    Using the Web Browser Control & Using the DHTML Document Object Model

    The examples referenced in the articles can be found here:

  3. #3

    Thread Starter
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682
    Interesting. Would be useful for capturing text from screengrabs and images with low noise factors and where you know what font the original text was written in. Would need a complete rewrite and probably worth porting to .NET to get a more robust system. But as you say you have only just started it, early days yet

    At work I've got Abbyy FineReader 7.0 which is amazing for normal kinds of documents. For clean hard-copies I can get close to 100% recognition accuracy, it occasionally stumbles over some obscure technical jargon but it learns pretty fast. They do an SDK for developers, but we are expecting it to be big $$$ so we are looking for an alternative before we shell out loads of cheddar. Hopefully will be able to harness it to a custom neural net I'm designing (its very amateurish at the moment but it should improve later).

    Our drawings are far from clean though, often they have been photocopied 3 or 4 times from a creased and/or inverted blueprint, so the results are sometimes unreadable by eyes let alone OCR! Signal:Noise is very poor.
    I don't live here any more.

  4. #4
    Fanatic Member TheVader's Avatar
    Join Date
    Oct 2002
    Location
    Rotterdam, the Netherlands
    Posts
    871
    Yikes, copies of copies of copies are hard documents to read. I don't think my code is gonna be able to handle that. But I really doubt if you're gonna find a free OCX control... I've searched around a bit and most of them are $3000 or more.
    Author for Visual Basic Web Magazine

    My articles on the Web Browser Control:
    Using the Web Browser Control & Using the DHTML Document Object Model

    The examples referenced in the articles can be found here:

  5. #5

    Thread Starter
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682
    I'm not restricting myself to just OCX's, classes, API's, DLL's, anything that does the job.

    Preferably not an activex control in fact, I find them heavy, slow and unnecessary, and are often not optimised.

    Thinking about writing my oen open source engine. THAT will be hard work!
    I don't live here any more.

  6. #6
    Fanatic Member TheVader's Avatar
    Join Date
    Oct 2002
    Location
    Rotterdam, the Netherlands
    Posts
    871
    Originally posted by wossname
    I'm not restricting myself to just OCX's, classes, API's, DLL's, anything that does the job.

    Preferably not an activex control in fact, I find them heavy, slow and unnecessary, and are often not optimised.

    Thinking about writing my oen open source engine. THAT will be hard work!
    Quite so. Well, if you fancy writing an engine you're welcome to help me improve my code.
    Author for Visual Basic Web Magazine

    My articles on the Web Browser Control:
    Using the Web Browser Control & Using the DHTML Document Object Model

    The examples referenced in the articles can be found here:

  7. #7
    Fanatic Member JPicasso's Avatar
    Join Date
    Aug 2001
    Location
    Kalamazoo, MI
    Posts
    843
    Couldn't you just write code to slice up a big drawing into smaller bits and run them separatly?

    since is sounds like you are only doing the bottom square, just make
    sure it fits into an A-whatever sized drawing.
    Merry Christmas

  8. #8

    Thread Starter
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682
    Because all the drawings are different sizes (some non standard or imperial), have the title area in different places, different orientations and may even contain images of other drawings

    I'll build the AI that's going to identify where the title bar is and then use that to extract a fragment of bitmap data which will then be sent to the OCR engine component for examination.

    All this should happen within 5 seconds per drawing (including loading / saving!!!)
    I don't live here any more.

  9. #9
    Fanatic Member JPicasso's Avatar
    Join Date
    Aug 2001
    Location
    Kalamazoo, MI
    Posts
    843
    Well, if your AI can successfully determine where the title is,
    have it cut out an A whatever sized chuck of that and pass it to
    your 100% reader!
    Don't mess with what works.
    Merry Christmas

  10. #10

    Thread Starter
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682
    Basically that's what we are doing now except the AI is my eyes and brain and none of it is automated.

    Our proper OCR app doesn't support external automation. It therefore requires me to be present for the entire process.

    At the moment I could write the blockfinder AI and just eave it at that, let it dump a load of titleblocks to a new folder somewhere and run them as a batch through the OCR app but that too is slow and requires much user interference.

    I'll have to look out my book on gaussian distriutions and integration techniques

    I love integration, its just so sexy.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width