Chess Vision
Chess Vision
8
9
10
•
•
•
•
11
12
13
14
15
16
17
18
19
20
21
22
23
24
detectChessBoard -
detectCheckerboardPoints
GetOnlyBoard tform =
fitgeotrans(movingPoints,fixedPoints, projective)
25
img2meansquares
26
GetNextFrame2
GetOnlyBoard .
27
GetNextFrame2
GetNewPositions2
28
GetNewPositions2
GetNextFrame2.
29
Keeping Keeping 60% Empty square Max diff that is
Squares from max diff classifiction an empty
contain current value square
player pieces
30
31
Ignoring Keeping 60% Empty square Choosing the
Squares from max diff classifiction highest
contain prev value predction score
player pieces
32
33
34
35
36
37
38
39
40
41
{'b','bb','nn','n','p','pp','q','ee','e','qq','r','r
r','k','kk'}.
42
trainImageCategoryClassifier
43
44
45
46
47
48
49
50
51
52
53
54
55
56
def king_squaree_ifcheck(self):
# Custom function - if the current side is in
check return the king square
check = self.king(self.turn) if self.is_check()
else None
return check
•
57
def writeMove():
"""Write the current engine suggestion to the
EngineMoves txt file"""
global currentBestMove
m = open(file_to_write, 'a')
m.write(currentBestMove + '\n')
m.close()
•
58
59
60
61
1. Cheryl Danner & Mai Kafafy. Visual Chess Recognition. Stanford University
5. Python-chess library.
https://python-chess.readthedocs.io/en/latest/index.html
12. Geiger, A., F. Moosmann, O. Car, and B. Schuster. "Automatic Camera and
Range Sensor Calibration using a Single Shot," International Conference on
Robotics and Automation (ICRA), St. Paul, USA, 2012.
62
13. Speeded up robust features. Wikipedia
https://en.wikipedia.org/wiki/Speeded_up_robust_features
63