View Full Version : Capturing of Chess Pieces Image

November 17, 2003, 07:03:22
I'm having a problem capturing images of the chess pieces on a chess board and using C++ to spot the differences between 2 moves. Anybody have a suggestion?

Stefan Geissler
November 17, 2003, 09:20:51

A very simple idea could be, to save all occupied chess field before the move has been done. Also it should be saved, whether there are black or white pieces on the occupied fields. When a move has been done, the start position is a field, that was occupied and is now cleared. The end position of the move is a field, that was free and is now occupied or that was occupied by a white piece and now occupied by a black piece (or vice versa).
If you control the whole game, it would be a good idea to check what kind of piece was moved, so your application can calculate in which direction the piece could have been moved.

The players should click a button, when they ended their move like a chess clock, so your program can snap an image and check the move.