Top Banner
1 Playing Chess: Playing Chess: Recognition and Simulation Recognition and Simulation COMP 290-075 COMP 290-075 Computer Vision Computer Vision B. Danette Allen B. Danette Allen Paul J. McLaurin Paul J. McLaurin May 03, 2000 May 03, 2000
11

1 Playing Chess: Recognition and Simulation COMP 290-075 Computer Vision B. Danette Allen Paul J. McLaurin May 03, 2000.

Dec 16, 2015

Download

Documents

Ginger Osborne
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 1 Playing Chess: Recognition and Simulation COMP 290-075 Computer Vision B. Danette Allen Paul J. McLaurin May 03, 2000.

1

Playing Chess: Playing Chess: Recognition and SimulationRecognition and Simulation

COMP 290-075COMP 290-075Computer VisionComputer Vision

B. Danette AllenB. Danette Allen

Paul J. McLaurinPaul J. McLaurin

May 03, 2000May 03, 2000

Page 2: 1 Playing Chess: Recognition and Simulation COMP 290-075 Computer Vision B. Danette Allen Paul J. McLaurin May 03, 2000.

2

ObjectivesObjectives

• Track individual chess piecesTrack individual chess pieces

• Maintain state of boardMaintain state of board

• Graphically represent state changes and Graphically represent state changes and statestate

Page 3: 1 Playing Chess: Recognition and Simulation COMP 290-075 Computer Vision B. Danette Allen Paul J. McLaurin May 03, 2000.

3

Lab Set-upLab Set-up

• 1 to 3 cameras1 to 3 cameras

– Panasonic Panasonic GP-LM7TAGP-LM7TA

– 1 overhead (min)1 overhead (min)

– 2 side view2 side view

• PCPC

• Matrox imaging board and Matrox imaging board and librarieslibraries

• C++, OpenGL, GLVUC++, OpenGL, GLVU

• Chessboard and piecesChessboard and pieces

Page 4: 1 Playing Chess: Recognition and Simulation COMP 290-075 Computer Vision B. Danette Allen Paul J. McLaurin May 03, 2000.

4

System ConstraintsSystem Constraints

• Single move per imageSingle move per image

–move, capture, en passant, castlemove, capture, en passant, castle

• Shadow minimizationShadow minimization

–currently using halogen lamp currently using halogen lamp (no overhead)(no overhead)

• Not constrained to legal chess movesNot constrained to legal chess moves

• Must start game from beginningMust start game from beginning

Page 5: 1 Playing Chess: Recognition and Simulation COMP 290-075 Computer Vision B. Danette Allen Paul J. McLaurin May 03, 2000.

5

Calibration of chess boardCalibration of chess board

Page 6: 1 Playing Chess: Recognition and Simulation COMP 290-075 Computer Vision B. Danette Allen Paul J. McLaurin May 03, 2000.

6

• A A blobblob is a set of connected pixels that have the is a set of connected pixels that have the same intensity valuesame intensity value

• There are five steps in this process: There are five steps in this process: 1. Acquire an image1. Acquire an image

2. Analyze foreground and background pixels to determine optimum 2. Analyze foreground and background pixels to determine optimum threshold required to segment objects from their backgroundthreshold required to segment objects from their background

3. Apply a threshold to create a binary image with objects shown in 3. Apply a threshold to create a binary image with objects shown in white and background shown in blackwhite and background shown in black

4. Analyze areas of connected white pixels and assign a label or number 4. Analyze areas of connected white pixels and assign a label or number to each discrete group of connected pixels to each discrete group of connected pixels

5. Extract physical measurements from objects. 5. Extract physical measurements from objects.

Blob AnalysisBlob Analysis

Page 7: 1 Playing Chess: Recognition and Simulation COMP 290-075 Computer Vision B. Danette Allen Paul J. McLaurin May 03, 2000.

7

Grayscale and Binarized ImagesGrayscale and Binarized Images

Page 8: 1 Playing Chess: Recognition and Simulation COMP 290-075 Computer Vision B. Danette Allen Paul J. McLaurin May 03, 2000.

8

Rendered chessboard and Rendered chessboard and piecespieces

Page 9: 1 Playing Chess: Recognition and Simulation COMP 290-075 Computer Vision B. Danette Allen Paul J. McLaurin May 03, 2000.

9

Problems EncounteredProblems Encountered

• Black on black not detectableBlack on black not detectable

–white ring around base of black pieceswhite ring around base of black pieces

–black ring around bases of white piecesblack ring around bases of white pieces

• Multiple responsesMultiple responses

–Added code to filter out redundant responsesAdded code to filter out redundant responses

• Noisy difference imagesNoisy difference images

–Gaussian filterGaussian filter

Page 10: 1 Playing Chess: Recognition and Simulation COMP 290-075 Computer Vision B. Danette Allen Paul J. McLaurin May 03, 2000.

10

Future EnhancementsFuture Enhancements

• Multiple/Side camerasMultiple/Side cameras

• Tracking of individual piecesTracking of individual pieces

–““discrete” tracking of posediscrete” tracking of pose

–““continuous” tracking (6 DOF)continuous” tracking (6 DOF)

• Handle shadowsHandle shadows

• Increase code robustnessIncrease code robustness

–Verify legal moves in all cases Verify legal moves in all cases

» Handle “nudged” pieces automaticallyHandle “nudged” pieces automatically

Page 11: 1 Playing Chess: Recognition and Simulation COMP 290-075 Computer Vision B. Danette Allen Paul J. McLaurin May 03, 2000.

11

DemonstrationsDemonstrations

• Video of chess game in labVideo of chess game in lab

• Simulated chess gameSimulated chess game