views:

110

answers:

2

Hi all,

I want to create a mark sheet recognizer. Here is the description:

  1. My system uses black and white color scheme.
  2. The mark sheet paper has a small black rectangle on each corner and an additional small black rectangle, to determine orientation, near one of the previous rectangles.
  3. The paper is scanned to yield an image (in bmp format for example).

The first step is to locate these five references in image as eficient as possible.

My rough idea is to trace row by row and from left to right for each row. It sounds very slow I think.

Is there any better way to do that?

Thank you in advance.

regards,

Suugaku

+1  A: 

You can start by searching where you typically expect to find the reference images. You can do this by keeping statistics of where they were before. In particular if you have two frames taken one after the other, the chances are the reference points won't have moved very far.

Once you have found one or more of the reference points, the position of the others becomes heavily constrained so you can make a very good guess as to where the others must lie. Each time you find a new point it provides more hints as to where the remaining points can be.

So you can start by using a bit of guesswork to find the points quickly, and revert to a line-by-line scan if that fails.

Mark Byers
A: 

I once wrote a small OCR hack for a customer that accidently printed & mailed tons (litteraly) of invoices - and didn't keep track of what invoices they already mailed or not - fortunately all invoices was scanned and could be tracked via the OCR hack I wrote :). Enough bragging...

Speed is not an issue if you use the BitMap.LockBits() instance method (http://www.bobpowell.net/lockingbits.htm). Then, all you need is a couple of hours.

Fredrik Johansson