OpenCV Sudoku Solver and OCR - PyImageSearch

OpenCV Sudoku Solver and OCR - PyImageSearch

In this tutorial, you will create an automatic sudoku puzzle solver using OpenCV, Deep Learning, and Optical Character Recognition (OCR).

In this tutorial, you will create an automatic Sudoku puzzle solver using OpenCV, Deep Learning, and Optical Character Recognition (OCR).

My wife is a huge Sudoku nerd. Every time we travel, whether it be a 45-minute flight from Philadelphia to Albany or a 6-hour transcontinental flight to California, she always has a Sudoku puzzle with her.

The funny thing is, she prefers the printed Sudoku puzzle books. She hates the digital/smartphone app versions and refuses to play them.

I’m not a big puzzle person myself, but one time, we were sitting on a flight, and I asked:

How do you know if you solved the puzzle correctly? Is there a solution sheet in the back of the book? Or do you just do it and hope it’s correct?

Apparently, that was a stupid question to ask, for two reasons:

  1. Yes, there is a solution key in the back. All you need to do is flip to the back of the book, locate the puzzle number, and see the solution.
  2. And most importantly, she doesn’t solve a puzzle incorrectly. My wife doesn’t get mad easily, but let me tell you, I touched a nerve when I innocently and unknowingly insulted her Sudoku puzzle solving skills.

She then lectured me for 20 minutes on how she only solves “level 4 and 5 puzzles,” followed by a lesson on the “X-wing” and “Y-wing” techniques to Sudoku puzzle solving. I have a Ph.D in computer science, but all of that went over my head.

But for those of you who aren’t married to a Sudoku grand master like I am, it does raise the question:

Can OpenCV and OCR be used to solve and check Sudoku puzzles?

If the Sudoku puzzle manufacturers didn’t have to print the answer key in the back of the book and instead provided an app for users to check their puzzles, the printers could either pocket the savings or print additional puzzles at no cost.

The Sudoku puzzle company makes more money, and the end users are happy. Seems like a win/win.

And from my perspective, perhaps if I publish a tutorial on Sudoku, maybe I can get back in my wife’s good graces.

opencv

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Create a Virtual Pen and Eraser with Python OpenCV - Genial Code

Learn Free how to create a virtual pen and eraser with python and OpenCV with source code and complete guide. This entire application is built fundamentally on contour detection. It can be thought of as something like closed color curves on compromises that have the same color or intensity, it's like a blob. In this project we use color masking to get the binary mask of our target color pen, then we use the counter detection to find the location of this pen and the contour to find it.

Keras vs. OpenCV - Differences Between Keras and OpenCV

Learn what is Keras and OpenCV with their applications. See Keras vs OpenCv to understand differences between OpenCv and keras for proper understanding.

OpenCV + CUDA + AWS EC2 + (No More Tears)

Step by step instructions to bind OpenCV libraries with CUDA drivers to enable GPU processing on OpenCV codes. I am renting an EC2 instance with a p3.8xlarge instance in the AWS, which has 4 Nvidia GPUs.

Face Detection in OpenCV

Example of Face Detection using OpenCV in Python. We will discuss how we can apply Face Detection using OpenCV. We go straightforward with a practical reproducible example. The logic it the following: We get the image from the URL (or from the hard disk). We convert it to an numpy array and then to a grayscale.

OpenCV Python Tutorial: A Guide to Learn OpenCV

Getting started with OpenCV Python and learn OpenCV basics step by step. We will work through how we can use the OpenCV module in python and learn some crazy stuff that OpenCV can do. Computer vision is the interdisciplinary field that deals with gaining high-level understanding from images and video.