【发布时间】:2012-05-10 19:47:14
【问题描述】:
我想问另一个与How to remove convexity defects in a Sudoku square?相关的问题
我在 OpenCV-Python 中实现了一个数独求解器,它工作得很好。但是此时,我做了一个假设,这将简化我的问题。
假设是: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.
例如,拿这个image。 (我不想在这里上传原图,太大了,我也想上传结果)
我尝试了以下几种方法来找到这张图片中的数独方块:
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?
更新:在阅读了一些答案和 cmets 之后,我想我应该更新一下。看下图:
这张图片有一个问题数独和以前的数独答案。两者都是一样的。我认为搜索子块或 OCR 测试在这里不起作用。
【问题讨论】:
-
一种完全不同且可能无用的方法,但您不能将其推入 OCR 系统,然后寻找文本提示首先查看的位置,然后从那里开始吗?
-
我不这么认为。检查问题中的更新。
-
好吧,我确实把它作为评论,因为我不确定:) .. 不过,我认为你需要使用多种方法。一种可能是通过 OCR 找到数独的大致区域(所以你不会得到卡通),然后找到最大的斑点/正方形?类似的东西。只是大声思考;)
-
更新:从技术上讲,两者都是数独,第二个已经解决。所以没有空块。我想你可以像这样检测它。
标签: matlab image-processing opencv computer-vision