Re: [tesseract-ocr] Recognising numbers in sudoku

644 views
Skip to first unread message
Message has been deleted

Jean-Marc Spaggiari

unread,
Oct 30, 2020, 10:27:19 AM10/30/20
to tesser...@googlegroups.com
Hi,

Did you give it a try?

Try to have the numbers in white in black in a withe background. Are you able to get each cell separately?

JM

Le ven. 30 oct. 2020 à 10:22, agentbond009 <kshit...@gmail.com> a écrit :
hello. I am working on a project, i was wondering if tesseract is an OCR can it read the no.s from a sudoku.
thanks

--
You received this message because you are subscribed to the Google Groups "tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-oc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-ocr/4abe9a73-9543-4a5b-b29e-a917874378f8n%40googlegroups.com.
Message has been deleted

Jean-Marc Spaggiari

unread,
Nov 6, 2020, 10:26:25 AM11/6/20
to tesser...@googlegroups.com
Is the image always the same size? Can you cut the columns to remove them and keep just the numbers?

Le ven. 6 nov. 2020 à 10:21, agentbond009 <kshit...@gmail.com> a écrit :
sorry for the late reply
I have done the thresholding part by using opencv and converted the whole image to gray
and still stuck with recognising the digits. i was thinking to use clear_border from skimage.
Message has been deleted

Martin Läuter

unread,
Nov 15, 2020, 10:26:35 AM11/15/20
to tesseract-ocr
Hi,
  Someone did some (apparently) solid sudoku solving without tesseract, see https://blog.scottlogic.com/2020/01/03/webassembly-sudoku-solver.html. And the explanation is not bad either.
  Hope that helps,
Martin.
On Sunday, November 15, 2020 at 12:25:49 PM UTC+1 agentbond009 wrote:
sudoku_output.jpgyes  i think the image is always the same size but i am not able to cut out the columns(still figuring out ). Like the image below is the result after thresholding. The problem is to reduce the noise(all depends on quality) like for example if the pic is of bad quality like this one, then i think the ocr will mess it up.
there are two pics for comparision.
Message has been deleted

Jean-Marc Spaggiari

unread,
Nov 16, 2020, 8:37:15 AM11/16/20
to tesser...@googlegroups.com
If the pictures are all the same size, using ImageMagick you can most probably just cut each cell, pad it with black and send it back to tesseract. Just make sure to keep value only when there is a high confidence or enough "white" pixels?

Le lun. 16 nov. 2020 à 08:30, agentbond009 <kshit...@gmail.com> a écrit :
Thanks Martin Läuter  for the tutorial. But still i am gonna use tesseract for this bc i don't think my PC will handle tenserflow.

Lorenzo Bolzani

unread,
Nov 16, 2020, 9:21:53 AM11/16/20
to tesser...@googlegroups.com

Il giorno lun 16 nov 2020 alle ore 14:30 agentbond009 <kshit...@gmail.com> ha scritto:
Thanks Martin Läuter  for the tutorial. But still i am gonna use tesseract for this bc i don't think my PC will handle tenserflow.

On Sunday, 15 November 2020 at 20:56:35 UTC+5:30 Martin Läuter wrote:
Message has been deleted

Martin Läuter

unread,
Nov 16, 2020, 10:15:54 AM11/16/20
to tesseract-ocr
Remember, it's a website, that is live-solving the sudoku! Tensorflow.js is pretty lightweight, and you only need it to evaluate the number recognition model. You don't need to train the model (the trained weights are checked in the repository, AFAICT) nor install TensorFlow at all.
  I don't say you should absolutely use that webassembly project, but there is nothing to be afraid there, the author did a pretty good job of preparing and documenting everything.
  Greetings,
Martin.
Reply all
Reply to author
Forward
0 new messages