omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    SnapSudoku

    Pythonista
    sudoku opencv ocr
    8
    15
    13138
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ihf
      ihf last edited by

      I presume you know that Google Goggles does this now. Of course having it in Pythonista running locally would be very nice.

      1 Reply Last reply Reply Quote 0
      • ccc
        ccc last edited by ccc

        I loved Peter Norvig's section on Why?... especially the quote that Sudoku is "a denial of service attack on human intellect"!!

        @Webmaster4o Yes. Section 8.4 Optical Character Recognition starting on pg. 228 of the book you mention above seems to be very applicable but as you say, it requires SciPy which Pythonista does not currently support. Would there be a way to OCR a Sudoku puzzle on the current Pythonista i.e. without OpenCV and SciPy.

        @wradcliffe I am not an expert on this but I do not believe that Apple will allow Pythonista to access a third party shared library. I would love to be proven wrong but I believe the shared library would need to be signed with the same digital signature as Pythonista.

        @ihf I did not know that Google Goggles did this. It is still a cool challenge.

        1 Reply Last reply Reply Quote 0
        • wradcliffe
          wradcliffe last edited by

          @ccc - you may be right but at least we can agree that this is just a decision that Apple can make now as part of the deployment process through the App store. By opening up the discussion again - I was hoping that @omz could share what he has learned recently that may change the picture. I think that @omz has formally sanctioned using PythonistaKit framework outside of the template indicates he is thinking of providing it as its own 3rd party shared library at some point. Maybe soon!

          1 Reply Last reply Reply Quote 0
          • chibill
            chibill last edited by

            You could use PIL and a Nueral Network to read the sudoku ad solve it. The problem would be making a nureal network with out using a libaray that uses c code. And also then there is the actual solving.

            1 Reply Last reply Reply Quote 0
            • Phuket2
              Phuket2 last edited by

              From what I have read the solving is the easy part.,a lot of Python code out there for this. Seems the problematic thing is converting a pic/photo into a sudoku puzzle grid with the entries. That's the challenge

              1 Reply Last reply Reply Quote 0
              • Cethric
                Cethric last edited by

                Could this library potentially help?
                I know it is in ObjC however converting it to Python doesn't look to difficult.
                It would only provide the points, however writing an algorithm to determine where those points are and what they represent shouldn't be too difficult.

                1 Reply Last reply Reply Quote 0
                • Webmaster4o
                  Webmaster4o last edited by

                  Note that I've written maze-cv, an app that scans and solves mazes.

                  The code for recognizing box-shaped objects is probably applicable to the soduku application (though maze-cv requires big red markers on the corners)

                  maze-cv includes code for perspective transformations using PIL and numpy that works in Pyyhonista. It also has code for thresholding and segmenting the resulting image. So it really implements everything besides the OCR on individual characters, which I think there are objective c libraries for rendering.

                  Anyway, that's probably useful code, especially since it was all written for Pythonista.

                  1 Reply Last reply Reply Quote 2
                  • ccc
                    ccc last edited by ccc

                    SnapSudoku now uses the Norvig code to solve the Sudoku puzzle. Now we need a version that works on Pythonista. @Webmaster4o can you work your magic like you did with maze-cv or @omz can we get OpenCV or SciPy in Pythonista?

                    1 Reply Last reply Reply Quote 1
                    • chibill
                      chibill last edited by

                      I am working on a simple Nuertal Network for reading numbers to help with this project. If you can break the image into the boxes I can read the number in each one.

                      1 Reply Last reply Reply Quote 1
                      • JonB
                        JonB last edited by

                        http://sudokugrab.blogspot.com/2009/07/how-does-it-all-work.html
                        has a good summary of puzzle detection algorothms, and some refernces on number recognition.

                        1 Reply Last reply Reply Quote 2
                        • Webmaster4o
                          Webmaster4o last edited by

                          Looks like some of the stuff in PCV will run with just matplotlib and numpy, not sure how much though.

                          1 Reply Last reply Reply Quote 1
                          • First post
                            Last post
                          Powered by NodeBB Forums | Contributors