VideoSudokuSolver
所属分类:其他
开发工具:matlab
文件大小:166KB
下载次数:2
上传日期:2017-12-26 13:13:44
上 传 者:
ax123
说明: 可识别,计算并给出数独结果,Matlab编程
(Can be identified, calculated and given the Sudoku results, Matlab programming)
文件列表:
VideoSudokuSolver\drawgraph.m (721, 2016-09-01)
VideoSudokuSolver\identifynumbers_fun.m (2010, 2016-09-01)
VideoSudokuSolver\mysudokusolver.m (743, 2016-09-01)
VideoSudokuSolver\sample.bmp (308278, 2016-09-01)
VideoSudokuSolver\sampleprocess.m (4032, 2017-05-31)
VideoSudokuSolver\solution2image.m (748, 2016-09-01)
VideoSudokuSolver\sudokuvideo_fn.m (7721, 2016-09-01)
VideoSudokuSolver\sudokuvideo_fn_trace.m (534, 2016-09-01)
VideoSudokuSolver\SUDOKU_PUZZLE1.txt (169, 2016-09-01)
VideoSudokuSolver\SUDOKU_PUZZLE2.txt (169, 2016-09-01)
VideoSudokuSolver\SUDOKU_PUZZLE3.txt (169, 2016-09-01)
VideoSudokuSolver\sudoku_solver.m (1246, 2016-09-01)
VideoSudokuSolver\TEMPLATEDATA.mat (3779, 2016-09-01)
VideoSudokuSolver (0, 2017-05-31)
Note: "SUDOKU" is a registered trademark of NIKOLI Co., Ltd. (Japan)
%%%%% SHORT EXPLANATION %%%%%
Connect a web camera, confirm settings in sudokuvideo_fn.m, then run
>> sudokuvideo_fn.m
and point the camera at a sudoku puzzle.
Run sampleprocess.m in cell mode to see the algorithm.
%%%%% LONG EXPLANATION %%%%%
What this demo does:
1. This attempts to identify the numbers in a sudoku puzzle using video
input, and then solves the solution.
2. Optionally, the solution may be overlayed on the original video.
What you will need:
1. A plain web camera that does not have a lot of noise.
2. A well focused image.
3. Decent lighting, with no large shadows on the image.
What you need to do:
First confim that you can solve puzzles:
>> edit SUDOKU_PUZZLE1.txt
>> mysudokusolver SUDOKU_PUZZLE1.txt
Then do it using video:
There are some parameters that need to be tuned in sudokuvideo_fn.m
(see lines 3-18)
Then run
>>sudokuvideo_fn.m
Stop it using control-c, or close the figure.
If you get an out of memory error, run imaqreset.
Notes:
This will not work with every puzzle out there. It relies on the external
box being very distinct, and the numbers having a particular type of font.
You may need to do some experimenting to find one that works well.
The MathWorks News&Notes from Nov 2009 with Cleve's Corner: MATLAB and Sudoku
seems to work ok.
File list:
1. sudokuvideo_fn.m: The main file which reads and preprocesses the video input.
2. identifynumbers_fun.m: The file which tries to find the location and value of numbers in the puzzle, by comparing to template data.
2. drawgraph.m: This receives a matrix M, calls sudoku_solver, and displays the solution in a table.
4. sudoku_solver.m: This recieves a matrix M, and calculates the Sudoku solution.
5. solution2image.m: This makes the overlay image of from the solution
6. sudoku_fn_trace.m: This takes the image from solution2image, and overlays it on the original video
7. TEMPLATEDATA.mat: This is a file that has sample numbers
近期下载者:
相关文件:
收藏者: