cvBlob library for Android

I recently moved to Barcelona to start working in here. Although I’m not working in any computer-vision based project, I still keep a high interest in this field, trying to conduct as many personal projects as possible. My work team is highly motivated and full of professionals, and we all keep our personal projects besides our work.

Recently I met Fegabe in Barcelona, who’s a member of the GTUG Barcelona core team and an Android Developer. We decided to start together a Sudoku Solver for Android. Although there are already many of them published in the Market, we just wanted to do it for fun and to get a bit deeper into computer vision and pattern recognition. There is an OpenCV port for Android, but we decided to keep our implementation pure Java.

The following steps are applied in order to capture, detect and solve the Sudoku:

-The user must take a picture of the Sudoku using the camera of the device.

-After the picture is taken, a Threshold is applied to the image, so we can get a black and white version. Of course, there is some preprocessing involved. Things like smoothing out noise, some morphological operations, etc.

-When the picture has been taken, we apply a blob detection in order to detect the biggest segment of the image. We work under the assumption that this segment will be the outer line of the Sudoku table.

-Afterwards, we can use the Hough transform to get lines in the image. It returns lines in mathematical terms. So after this step, we’ll know exactly where a lines lies… and not just the pixels where it lies.

-When the lines has been detected, it will be easier to locate each individual cell. The number inside will be recognized using a neural network.

-The last step is the easiest: we just solve the sudoku by using any of all the known algorithms

The Sudoku Solver is still to be finished, but the cvBlob library is working fine, so I decided to publish it. The implementation is based on Dr. Andrew Greensted suggestion for Blob Detection.

I shared the project with a GPL license in Google Code. All the technical information can be found there, besides the source code and a binary file for Android. If you wanna try out, I would highly appreciate any feedback

 

blob detection

 

Bookmark the permalink.

2 Comments

  1. Dear Sir, I am a final year student in one of the universities in Sri Lanka. At the moment I am bit stuck with my android research project. I am trying to identify a rectangle (which is the largest) from an image (bitmap) like in here : http://stackoverflow.com/questions/16663504/extract-text-from-a-captured-image?noredirect=1#comment23973954_16663504. WIll it be possible to do this task using blob-detetction that you have introduced in cvblob-for-android?

    Thank you,

    Best regards,

    Thataka..

    • Hello Tharaka,

      The question you posted has been removed, so I can not access the original post. The cvBlob library works when there are pixels groups in an image. If you post the image for further information I can help you further.

      Cheers

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>