Chess Scanner (iOS & Android)

Sort:
Chess_Scanner

Hi

I'm working on a chess scanner app for iOS & Android and would like to get some feedback. The goal is to scan images from books and online so you don't have to set up the position manually. Here a quick preview:

What is included right now:

  • Take a photo (camera or gallery) and get the position of the image on the board (requires internet connection)
  • Edit position / setup position
  • Last move / next move
  • Reload position (to the last position set in edit mode)
  • List of previous scans so you can load them again

What is not included right now but planned:

  • Showing best moves (Stockfish)
  • Play against computer
  • Different colors and pieces

The app itself will be free, the scanning happens on a web service that's why I'd like to charge 5$/year for unlimited scans, the first 10 scans are free. 

What do you think? Any feedback is welcome. Please let me know what you think is missing for a first beta version you could use.

cyboo
Wow, great idea! How about being able to share the positions?
Chess_Scanner

I'm looking into exporting the position to different chess apps and from there you should be able to share them. Have you any other ideas to share them?

NGOSACHOMBA

if u can't share the pgn games or even analyze it then. I dont know why i would personally want the app

anagdev

Quite possibly CheSScan could also be of use to you.

 

Disclaimer: I am the developer of it. For now it scans tournament scoresheets, but soon (hopefully within a month) I will be adding capability to scan chess positions.

illini80

The Chessify app does this, and it works extremely well.  It also has a variety of options on what to do with the scanned image.

mgx9600


Actually Ive been thinking about adding something similar to my chess analysis app; where you'd take a picture of a position in a book and it recognizes the pieces and give you an FEN (minus castling, EP, etc.).  It doesn't look too hard to do even on a phone.

 

Let me take a look and write one : )

 

MatthewFreitag

Chessify is awesome. Works amazing.

goodbye27

thing is you will have to code a small AI to recognize different chess pieces. you have any experience on ai programming?

mgx9600
gdzen wrote:

thing is you will have to code a small AI to recognize different chess pieces. you have any experience on ai programming?

 

No you don't. You can just match patterns if you get the scale and rotation right. There are also scale/rotation independent feature matchers.  No AI needed. Pretty easy actually.

 

goodbye27

hmm if you say so, but i saw character recognition softwares before, nowadays they usually use neural networks and some study to recognize almost all handwritings. since you will use it to scan images from random sources, i still think you will need it.

mgx9600
gdzen wrote:

hmm if you say so, but i saw character recognition softwares before, nowadays they usually use neural networks and some study to recognize almost all handwritings. since you will use it to scan images from random sources, i still think you will need it.

 

You probably don't know much about programming, so you think in too-complicated methods.  It doesn't have to be that complicated; the best software is the ones that use the simplest, cleanness way to solve a problem.  I've actually already described the method in my previous post on exactly how to solve the problem.  Even the free OpenCV has pretty much everything to implement my suggested method.

Anyway, I don't think it is too hard to do.  I'll give it a spin later tonight.

TeacherOfPain

Nice, keep at what you are doing. It always help's for someone to make it helpful for a group of people that are on chess.com, depsite it being profitable or unprofitable. 

Don't mind the cost if I wanted to use it, I am just glad it is made, for the sake of those who find it interesting and to give it a shot. 

goodbye27

So you said best software uses the simplest technique, what about this one; sort pieces from shortest to tallest, so they will be sorted as pawn -> king grin.png simple eheh

mgx9600
gdzen wrote:

So you said best software uses the simplest technique, what about this one; sort pieces from shortest to tallest, so they will be sorted as pawn -> king  simple eheh

 

I said "the simplest and cleanest way", there's no mention of the "simplest technique"; frankly, "simplest technique" doesn't even make any sense.

 

In your example of sorting, the simplest and cleanest way would be to use an appropriate sorting routine from a library. For such few pieces a simple bubble-sort type n^2 comparison is appropriate. Small foot print in memory, storage, and processing.

Anyway, I did do an experiment and it is very doable.  I was able to recognize chessboard pieces from pictures (have to be somewhat in-focus, I can also deal with more out-of-focus if I had wanted to, it isn't hard). Accuracy was 100% on my test book.

 

Here're my steps:

Read color image ->

convert to gray scale ->

uniform the intensity ->

convert to binary (I used Otsu automatic thresholding) -> 

correct rotational error (I detect chessboard corners and perform perspective transform; without this step, my accuracy was about 95%) ->

match chessmen patterns (the pattern match uses a mask that covers the chessmen shape)

 

Using OpenCV, the entire code was about 200 lines.

I can easily add additional chessmen patterns from other books.  Even without other book patterns, the program is able to recognize with about 80% accuracy with only this single book's pattern.

 

NOTE: The above won't work without 2 additional steps for computer screen images due to aliasing between the screen pixels and camera sensor pixels.  There probably need to have some low pass filtering and image enhancement.  Which isn't all that difficult  either.

The above took about 4 hours of programming fun. Most of it was learning OpenCV.  I might just add this chess photo -to-FEN feature to my app.  It does seem useful.

 

goodbye27

so "simplest way" and "simplest technique" mean different? whatever.

mgx9600
gdzen wrote:

so "simplest way" and "simplest technique" mean different? whatever.

 

To those ignorant of computer programming <-- definitely seems so based on you.

 

goodbye27

no

mgx9600

The point is, the whole chess piece recognition is not hard to do. Definitely don't need AI overkill. Even if I were to program a general purpose chess piece classifier, it isn't hard at all. I can train it with lots of chess pieces and then it'll be static; no AI, no learning needed.

mgx9600

@gdzen You have no idea of computer programming and AI.

 

A lot of folks toss around AI because it is the hip term right now, so non-technical, non-computer people also use it. Go back 15 or 20 year, nobody dares say AI because it is just unhip; of course, that also prevents non-techies from saying this-and-that needs AI.