Azzera filtri
Azzera filtri

Hi, I want to do a little project that works like “Video Sudoku Solver”

1 visualizzazione (ultimi 30 giorni)
Hi, I want to do a little project that works like “Video Sudoku Solver”. I plan to use a webcam to watch a Chinese chess( similar to international chess) or chess , Chinese chessman is round with a different Chinese charater on center. (The international chess pieces is different 3 demention object.)
Then record every steps of the whole game. What I plan to do is: at the begin of a game, every chess pieces is in its initial position, so it is easy to detect chess board, and the original chess piece at expected position . After the game begin, I need to find when a plays hand move chess pieces, and follow its move detect the new positon. I guess rocord Chinese chess is simpler than international chess. I hope if after detect the circle, then every chess can be find, then the quesetion is to detect every chinese character in the circle. Because at the beginning, we would find the orignial picture of each pieces, so it seems not hard to find each pieces. Now the question is how to detect plays hand move in and move out? another question is the rotation of chess pieces.Because player usually put each pieces with a little rotation, so how to detect it? It seems hard to record international chess(to detect in 3 demention) If you have any ideas, please not hesitate to tell me! Thank u. This can be expand to a Apple App, or some other little applition in your mobile phone.if some good Artificial Intelligence(not as good as deep blue, but over average standand ) added to give a best advice for each move.

Risposta accettata

Image Analyst
Image Analyst il 28 Nov 2012
I don't know what these pieces look like but I imagine many of them look identical. So to detect which piece moved you're going to have to take snapshots in between every move and then compare the latest snapshot against the prior one to determine which piece moved. You can probably just subtract the two images and then threshold and use bwareaopen to get rid of small noise patches and keep just the largest difference. If you know what pieces were located where at the start then you don't need to figure out what all the pieces are in each image because only one piece can move at a turn. I don't see any need to find every piece in every image, handle piece rotations, read Chinese characters, or use artificial intelligence - you only need to know initial positions and which piece moved from one turn to the next, which is easily determined.
  4 Commenti
john
john il 28 Nov 2012
This is not a good idea. I think simple rocord solution is: when the hand is move in, then difference of the picture with the last one is over some threshold , when the hand move out if the threshold is under the threshold but over another small threshold, the move is detected. If the difference is also under the threshold, the player just keeping think and does not move this time. The webcam should be fixed. Do you think this can work?
john
john il 28 Nov 2012
Modificato: john il 28 Nov 2012
I have a initial solve for this project.
First we can judge if the video is stable. When a hand is moving, the video is unstable.
this can be done by |Frame(n+1)-Frame(n)|+|Frame(n)-Frame(n-1)|>threshold. (C1)
if 3 sucessive
video has little difference, this means the video is stable.
Then the whole alrorithms can be:
(1)
initiale
state=stable
input video, store it
(2)
detect if the video is stable according C1.
If the video state is change from stable to unstable then again back to stable
then maybe a move exists.
(3)detect if a move exists, record the stable video.From two successional stable video (or snapshot) to detect if a move exists.
I am not good at stateflow, does anyone give me some advice to achieve above algorithms using stateflow ,simulink,d image processing and image acquireing toolbox without write any code?

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Sudoku in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by