New project at OneTwo: 12Scan


At OneTwo, I’m working at a new program with the work title 12Scan. It is a tool written in RealBasic to scan a page and analyze its contents.

It needs to be able to ‘read’ a page where people color in preprinted empty circles and return a txt file with a grid that represents the users selections. The picture can be taken with any device like flat scanners, webcams or mobile phone cameras.

Here is an example of such an empty page that could be used to check the attendance in a school:

It turns out it was not that easy to build as it looks. Especially the light and the environment were quite a challenge. With the knowledge I learned by building the augmented reality library for android, I could use some of the same techniques in this program.

A couple of things needed to be done. I wanted to avoid any rotation or deformation of the picture to keep the maximum quality of the picture. That meant manipulating the picture in other ways to find the hand colored points.

After some grey scaling, smoothing, blurring, sharpening and the other usual picture manipulations I’ve got a workable picture. The next function searched the blobs. I’ve used some functions I made in the augmented reality lib and that seems to work very well. Next was finding the square shape of the found blobs so I could create the matrix for all hand colored blobs. This looks very simple for a human, but for a computer it is quite a challenge.

This could be solved using a technique called PointsCloud. It searched for the corners within a ‘cloud of points’. The last part was aligning the hand colored points into the found matrix.

We are very satisfied with our preliminary results. It works very well with different light intensities and even on wrinkled or with coffee smothered pages. Here is a little video that shows our results:

This is done by dirty experimental code so my next task is rewriting it in a nice framework and optimizing the code for speed.

Visit us at http://www.one-two.com to see more of our innovating projects.

Until next time!

Advertisements

About Alwaysbusy

My name is Alain Bailleul and I'm the Senior Software Architect/Engineer at One-Two. I like to experiment with new technologies, Computer Vision and A.I. My projects are programmed in B4X , Xojo, C#, java, HTML, CSS and JavaScript. View all posts by Alwaysbusy

2 responses to “New project at OneTwo: 12Scan

  • Jordan

    Love to know more about the PointsCloud technique, and the way you align the blob so you can scan the points. Excellent blog… You can email me directly.

    • Alwaysbusy

      @Jordan: It is nice to hear you enjoy the blog 🙂
      I may do an article on the PointsCloud technique later. The code for 12Scan is proprietary to OneTwo so i can’t share this right now. For the moment, I suggest you look into the source code of AForge.NET . They have some excellent techniques that inspired my to make this in RealBasic. I’m even thinking of porting the complete AForge.NET library to Realbasic and post it on the blog.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: