tags:

views:

15

answers:

2

hello frnds. I am a little new developer in C#. I am facing a problem in developing some application.

I have to develope an "application" that opens a scanned document( of any application form or bank cheque) and save the required data of the document to the database for example... cheque number,account no in a scanned copy of cheque OR Student Name,Roll Number etc in application form of a school.

I got the ideas regarding working with pixels.

Please provide the solution regarding it.

I am using .Net Framework 3.5 with C# language

With Regards Varun Dutta

+1  A: 

You want to use OCR to retrieve the data from the pictures, there is a OCR component in Office that you might be able to use as seen in this article: Using The Office 2007 OCR Component in C#

Otherwise there is an existing question asking about libraries to do this: Any open source C# OCR library?

After you've retrieved the data it'll just be to insert it into the database using whichever classes fits your requirements (SqlConnection or similar).

ho1
thanks a lot . I'll look into this solution
Varun Dutt
+1  A: 

To save the document to the database, there are two schools of thought.

  1. Save the file as a blob in a field in a row
  2. Put the file on a server filesystem that clients can access, and put the filename in the database

I wrote a few blog entries that detail the pros and cons of each approach:

http://www.atalasoft.com/cs/blogs/loufranco/archive/2007/12/03/images-in-databases-part-i-what-to-store.aspx

http://www.atalasoft.com/cs/blogs/loufranco/archive/2007/12/04/images-in-databases-part-ii-web-images-are-random-access.aspx

http://www.atalasoft.com/cs/blogs/loufranco/archive/2009/04/28/document-storage-database-blobs-or-the-filesystem.aspx

What it comes down to is convenience (blobs) vs. performance (filesystem) -- the bigger the files, the more you would prefer using the filesystem. If you are using a current version of SQL Server, then there is a filesystem field type that you will give you the convenience as well -- so that is the best of both worlds, but isn't standard.

As for getting the information out of the images, you need OCR. The best open-source OCR is Tesseract from Google.

If you'd like to look at commercial options, my company, Atalasoft, sells OCR engines and we have a .NET wrapper of Tesseract.

Lou Franco