Sudoku recognition - possible ideas to borrow?

23 views
Skip to first unread message

Christian Brunschen

unread,
Aug 13, 2009, 7:50:30 AM8/13/09
to zx...@googlegroups.com

Mark Jeronimus

unread,
Aug 13, 2009, 9:44:50 AM8/13/09
to zx...@googlegroups.com
For those who don't want to take the time to read this long blog post, this is a collection of discussed techniques:

Techniques used to convert an angled photo of a sudoku into a computer representation of a sudoku (ie 9x9 array of digits)
- grayscale the image
- threshold (bad)
- adaptive threshold
-* blob extraction algorithm to find the sudoku outline by flood fill (assumes it is not disconnected!)
-* Hough transform to find straight lines
-* map back the found lines and find four intersection points
- perspective transform to transform picture back to a square
-* manually-trained neural network as OCR for the numerals

The points marked with * are not interesting for bar code reading because they either do not apply, or because they are very computationally expensive.
Interesting though, the remaining points are already implemented for some time now.

No need to visit the link unless you are a curious computer scientist.

Regards,
Mark Jeronimus

On Thu, Aug 13, 2009 at 1:50 PM, Christian Brunschen <christian...@gmail.com> wrote:


http://sudokugrab.blogspot.com/2009/07/how-does-it-all-work.html

// Christian


Christian Brunschen

unread,
Aug 13, 2009, 9:49:08 AM8/13/09
to zx...@googlegroups.com
On 13 Aug 2009, at 14:44, Mark Jeronimus wrote:

For those who don't want to take the time to read this long blog post, this is a collection of discussed techniques:

... some of which are similar or related to what ZXing does.

Techniques used to convert an angled photo of a sudoku into a computer representation of a sudoku (ie 9x9 array of digits)
- grayscale the image
- threshold (bad)
- adaptive threshold
-* blob extraction algorithm to find the sudoku outline by flood fill (assumes it is not disconnected!)
-* Hough transform to find straight lines
-* map back the found lines and find four intersection points
- perspective transform to transform picture back to a square
-* manually-trained neural network as OCR for the numerals

The points marked with * are not interesting for bar code reading because they either do not apply, or because they are very computationally expensive.
Interesting though, the remaining points are already implemented for some time now.

No need to visit the link unless you are a curious computer scientist.

... or generally interested.

The Hough transform might be useful for trying to detect a DataMatrix barcode, which is delimited on two sides by straight lines that should also be connected to each other at one corner, and together would give three of the four corners of the area containing the DataMatrix code.

// Christian Brunschen
Reply all
Reply to author
Forward
0 new messages