我想問一下有關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
你可以看到很多考生都在那裏,特別是這是所有方式類似於數獨。 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?
UPDATE:讀一些答案和評論後,我想我應該給的更新。看看下面的圖片:
此圖片有問題,數獨和以前的數獨遊戲的答案。兩者都是一樣的。我認爲尋找子塊或OCR測試不會在這裏工作。
一個完全不同也許沒用的方法,但是你不能通過一個OCR系統來推送它,並尋找一個文本提示先看哪裏,然後從那裏去? – Nanne
我不這麼認爲。檢查問題中的更新。 –
嗯,我確實把它作爲評論,因爲我不確定:)但是,我認爲你需要使用多種方法。人們可以通過OCR找到數獨的一般區域(所以你沒有得到漫畫),然後找到最大的blob/square?類似的東西。大聲想想;) – Nanne