Abi*_*n K 6 matlab opencv image-processing computer-vision
我想问另一个与如何消除Sudoku广场中的凸性缺陷有关的问题?
我在OpenCV-Python中实现了一个Sudoku Solver,它运行得很好.但是在这个时候,我做了一个假设,这将简化我的问题.
假设是: Sudoku boundary(square) is the biggest blob in the input image
例如:
红色块是检测到的方块.您可以看到它涵盖了图像的主要部分.
问题:
问题只不过是假设. If sudoku square has another square around it, method fails. Or if the image has another bigger blob than the sudoku square, again method fails.
例如,拍摄此图像.(我不想在这里上传原始图片,它很大,我也想上传结果)
我尝试了以下几种方法来查找此图像中的数独方块:
1) Find the biggest blob
然后我得到了红色区域.Method Failed.

(图像从原始图像调整大小以减小尺寸)
2) Find only square regions
你可以看到很多候选人都在那里,特别是KING CROSSWORD那些与数独相似的人.Method again fails
In short, this image has everything, to fail me.
题:
How to detect a sudoku square in an image, especially in the test image i gave? Is there any better algorithm for this?
更新:阅读一些答案和评论后,我想我应该给出更新.请看下面的图片:

这个图像有一个数独的数独和以前数独的答案.两者都是一样的.我认为搜索子块或OCR测试在这里不起作用.
为什么不检查每个大方块/ blob?只有1)9X9子方格的2)一些子方格中的数字3)没有黑色的子方格是数独的.