SlideShare ist ein Scribd-Unternehmen logo
1 von 22
Chess Segmentation

by Statis Grigoropoulos
© 2012
Chess Segmentation
• The Problem
• Ways of Approach
• Implementation
• Results
• Suggestions for Improvement
• Conclusion

Page 2

Chess Segmentation

4/13/2012
The Problem
• Detect chessboard segmentation in an

image
• classify the chess pieces found in the
segmented chessboard.
• provide a correct FEN notation for the
detected chessboard(s)

Page 3

Chess Segmentation

© 2012
The Algorithm
• Step 1: Find internal borders of the

chessboard(s)( i.e detect chessboard)
• Step 2: Spit the squares for each
chessboard
• Step 3: Detect the piece inside the
square
• Step 4: Produce FEN notation
Page 4

Chess Segmentation

© 2012
Step 1: Find the Borders
•

Ways of Approach:
-Hough Transform
-Norm. Cross Correlation


Page 5

Template :

Chess Segmentation

© 2012
Step 1: Find the Borders
• Hough Transform :MATLAB(single

case)

Page 6

Chess Segmentation

© 2012
Step 1: Find the Borders
• Hough Transform :MATLAB(real case)

Page 7

Chess Segmentation

© 2012
Step 1: Find the Borders
• Norm. Cross Correlation :MATLAB

Page 8

Chess Segmentation

© 2012
Step 2: Splitting the Squares
• Step 1: Compute the histogram of the
•
•
•
•

chessboard
Step 2: Detect the dominant values of the
histogram
Step 3: Classify the dominant values with
a confidence interval as the white and
black square background
Step 4: Iterate on the x and y axis and
catch the interchange of the values

Page 9

Chess Segmentation

© 2012
Step 2: Splitting the Squares

Confidence interval = 10%= 25

Page 10

Chess Segmentation

© 2012
Step 3: Classify Square
Empty Squares
-Standard Deviation
•

A way to measure the distance of values
from the mean
Expected low value of standard deviation
in empty squares : s.d. < 25(10%)??
-Histogram bins
Page 11

Chess Segmentation

© 2012
Step 3: Classify Square
s.d. =~ 20

s.d. =~ 11

s.d. =~ 30(!)
Page 12

Chess Segmentation

© 2012
Step 3: Classify Square
•

Square containing a Piece
- Rich Feature Space
- Simple Mean Classifier
 The Method:



Page 13

Shrink-to-fit
Compute Characteristics

Chess Segmentation

© 2012
Step 3: Classify Square
Square Containing a Piece
-The Features:
1. Normalized Histogram (dropped)
2. Compute the ratio of dark pixels in
square(1)
3. Spit the Square in a 3x3 grid
4. Compute the relative ratio of dark pixels
in each region(9)
•

Page 14

Chess Segmentation

© 2012
Step 3: Classify Square
Square Containing a Piece
-The Features(cont.):
5. Spit the square in a 5x5 grid
6. Compute the Relative Position of the
border of the shape (chess piece) along
the lines of the grid, in each direction(20)
7. Compute the relative ratio of dark pixels
along each line of the grid(10)
Result : 40-dimensional feature space
•

Page 15

Chess Segmentation

© 2012
Step 3: Classify Square
•

Square Containing a Piece

Shape Context
Page 16

Chess Segmentation

© 2012
Some Results
Accuracy = 100%

Accuracy 55%

Accuracy 80%

Page 17

Chess Segmentation

© 2012
Towards a complete Program
•
•
•
•
•
•
•

Minimize assumptions
Implement Step 1
Refine Spitting Squares Method
Extend Feature Space( go Log Polar?)
Add more training sets
Optimize Code and Algorithms
Test, Test, Test…

Page 18

Chess Segmentation

© 2012
Conclusion
• Chess Detection and Segmentation a

very hard problem in a general case
• We managed to solve a small part of it
• Each Step poses challenges

Page 19

Chess Segmentation

4/13/2012
Thank you!

Page 20

Chess Segmentation

© 2012
Questions?

Page 21

Chess Segmentation

© 2012
Classify that! :p

Page 22

Chess Segmentation

© 2012

Weitere ähnliche Inhalte

Andere mochten auch

Powerpoint for Adult Living Solutions
Powerpoint for Adult Living Solutions Powerpoint for Adult Living Solutions
Powerpoint for Adult Living Solutions
Adult Living Solutions
 
Shaping the role_of_hr_546
Shaping the role_of_hr_546Shaping the role_of_hr_546
Shaping the role_of_hr_546
Naresh Trainer
 
Mother teresa of calcutta copia
Mother   teresa   of   calcutta   copiaMother   teresa   of   calcutta   copia
Mother teresa of calcutta copia
lupatric8
 
Thesimplelife(1)
Thesimplelife(1)Thesimplelife(1)
Thesimplelife(1)
007rikki
 
Mindfulness en psychotherapie
Mindfulness en psychotherapieMindfulness en psychotherapie
Mindfulness en psychotherapie
MindConsult
 

Andere mochten auch (16)

Mi cumple 24 !!
Mi cumple 24 !!Mi cumple 24 !!
Mi cumple 24 !!
 
Powerpoint for Adult Living Solutions
Powerpoint for Adult Living Solutions Powerpoint for Adult Living Solutions
Powerpoint for Adult Living Solutions
 
Shaping the role_of_hr_546
Shaping the role_of_hr_546Shaping the role_of_hr_546
Shaping the role_of_hr_546
 
Launch X431 digimaster 3 - Digimasteriii upgrade-notice
Launch X431 digimaster 3 - Digimasteriii upgrade-noticeLaunch X431 digimaster 3 - Digimasteriii upgrade-notice
Launch X431 digimaster 3 - Digimasteriii upgrade-notice
 
Communication Policy: Broadcasting and Politics in the Flemish Community
Communication Policy: Broadcasting and Politics in the Flemish CommunityCommunication Policy: Broadcasting and Politics in the Flemish Community
Communication Policy: Broadcasting and Politics in the Flemish Community
 
Mother teresa of calcutta copia
Mother   teresa   of   calcutta   copiaMother   teresa   of   calcutta   copia
Mother teresa of calcutta copia
 
Creative Sector Discovery Session 7th June
Creative Sector Discovery Session 7th JuneCreative Sector Discovery Session 7th June
Creative Sector Discovery Session 7th June
 
Thesimplelife(1)
Thesimplelife(1)Thesimplelife(1)
Thesimplelife(1)
 
Mindfulness en psychotherapie
Mindfulness en psychotherapieMindfulness en psychotherapie
Mindfulness en psychotherapie
 
Hrm10ech01
Hrm10ech01Hrm10ech01
Hrm10ech01
 
THE LAST 15 YEARS ON WALL STREET PART I
THE LAST 15 YEARS ON WALL STREET PART ITHE LAST 15 YEARS ON WALL STREET PART I
THE LAST 15 YEARS ON WALL STREET PART I
 
Past continuous
Past continuousPast continuous
Past continuous
 
How To Use AD 90 Car Diagnostic Tool | VtoolShop
How To Use AD 90 Car Diagnostic Tool | VtoolShopHow To Use AD 90 Car Diagnostic Tool | VtoolShop
How To Use AD 90 Car Diagnostic Tool | VtoolShop
 
07 21-13 brian freedom economics 05
07 21-13 brian freedom economics 0507 21-13 brian freedom economics 05
07 21-13 brian freedom economics 05
 
3 sun powered
3 sun powered3 sun powered
3 sun powered
 
Big ideas pecha kucha
Big ideas pecha kuchaBig ideas pecha kucha
Big ideas pecha kucha
 

Ähnlich wie Chess Segmentation (8)

Math review for 4th period exam
Math review for 4th period examMath review for 4th period exam
Math review for 4th period exam
 
Math review for 4th period exam
Math review for 4th period examMath review for 4th period exam
Math review for 4th period exam
 
Geometry Friends Game AI Competition
Geometry Friends Game AI CompetitionGeometry Friends Game AI Competition
Geometry Friends Game AI Competition
 
Solid modelling cg
Solid modelling cgSolid modelling cg
Solid modelling cg
 
Dream3D and its Extension to Abaqus Input Files
Dream3D and its Extension to Abaqus Input FilesDream3D and its Extension to Abaqus Input Files
Dream3D and its Extension to Abaqus Input Files
 
Vector Tile for Sea Wind
Vector Tile for Sea WindVector Tile for Sea Wind
Vector Tile for Sea Wind
 
Precocity - A Workshop on Culmination of Blocks.pptx
Precocity - A Workshop on Culmination of Blocks.pptxPrecocity - A Workshop on Culmination of Blocks.pptx
Precocity - A Workshop on Culmination of Blocks.pptx
 
Geometry Friends Game AI Competition - 2013 Results
Geometry Friends Game AI Competition - 2013 ResultsGeometry Friends Game AI Competition - 2013 Results
Geometry Friends Game AI Competition - 2013 Results
 

Mehr von Stathis Grigoropoulos (7)

Agent Based Modeling and Simulation - Overview and Tools
Agent Based Modeling and Simulation - Overview and ToolsAgent Based Modeling and Simulation - Overview and Tools
Agent Based Modeling and Simulation - Overview and Tools
 
The Minority Game: Individual and Social Learning
The Minority Game: Individual and Social LearningThe Minority Game: Individual and Social Learning
The Minority Game: Individual and Social Learning
 
Social cognitive factors of unfair ratings in reputation
Social cognitive factors of unfair ratings in reputationSocial cognitive factors of unfair ratings in reputation
Social cognitive factors of unfair ratings in reputation
 
Mechanism design theory examples and complexity
Mechanism design theory examples and complexityMechanism design theory examples and complexity
Mechanism design theory examples and complexity
 
Scheduling
SchedulingScheduling
Scheduling
 
Hydrate me
Hydrate meHydrate me
Hydrate me
 
Stress2
Stress2Stress2
Stress2
 

Kürzlich hochgeladen

Russian Escorts Agency In Goa 💚 9316020077 💚 Russian Call Girl Goa
Russian Escorts Agency In Goa  💚 9316020077 💚 Russian Call Girl GoaRussian Escorts Agency In Goa  💚 9316020077 💚 Russian Call Girl Goa
Russian Escorts Agency In Goa 💚 9316020077 💚 Russian Call Girl Goa
sexy call girls service in goa
 
Karnal Call Girls 8860008073 Dyal Singh Colony Call Girls Service in Karnal E...
Karnal Call Girls 8860008073 Dyal Singh Colony Call Girls Service in Karnal E...Karnal Call Girls 8860008073 Dyal Singh Colony Call Girls Service in Karnal E...
Karnal Call Girls 8860008073 Dyal Singh Colony Call Girls Service in Karnal E...
Apsara Of India
 
Goa Call "Girls Service 9316020077 Call "Girls in Goa
Goa Call "Girls  Service   9316020077 Call "Girls in GoaGoa Call "Girls  Service   9316020077 Call "Girls in Goa
Goa Call "Girls Service 9316020077 Call "Girls in Goa
sexy call girls service in goa
 
Nayabad Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Sex At ...
Nayabad Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Sex At ...Nayabad Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Sex At ...
Nayabad Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Sex At ...
aamir
 

Kürzlich hochgeladen (20)

Call Girls Manjri Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Manjri Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Manjri Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Manjri Call Me 7737669865 Budget Friendly No Advance Booking
 
Russian Escorts Agency In Goa 💚 9316020077 💚 Russian Call Girl Goa
Russian Escorts Agency In Goa  💚 9316020077 💚 Russian Call Girl GoaRussian Escorts Agency In Goa  💚 9316020077 💚 Russian Call Girl Goa
Russian Escorts Agency In Goa 💚 9316020077 💚 Russian Call Girl Goa
 
Top Rated Kolkata Call Girls Khardah ⟟ 6297143586 ⟟ Call Me For Genuine Sex S...
Top Rated Kolkata Call Girls Khardah ⟟ 6297143586 ⟟ Call Me For Genuine Sex S...Top Rated Kolkata Call Girls Khardah ⟟ 6297143586 ⟟ Call Me For Genuine Sex S...
Top Rated Kolkata Call Girls Khardah ⟟ 6297143586 ⟟ Call Me For Genuine Sex S...
 
College Call Girls New Alipore - For 7001035870 Cheap & Best with original Ph...
College Call Girls New Alipore - For 7001035870 Cheap & Best with original Ph...College Call Girls New Alipore - For 7001035870 Cheap & Best with original Ph...
College Call Girls New Alipore - For 7001035870 Cheap & Best with original Ph...
 
↑Top Model (Kolkata) Call Girls Rajpur ⟟ 8250192130 ⟟ High Class Call Girl In...
↑Top Model (Kolkata) Call Girls Rajpur ⟟ 8250192130 ⟟ High Class Call Girl In...↑Top Model (Kolkata) Call Girls Rajpur ⟟ 8250192130 ⟟ High Class Call Girl In...
↑Top Model (Kolkata) Call Girls Rajpur ⟟ 8250192130 ⟟ High Class Call Girl In...
 
Call Girl Nagpur Roshni Call 7001035870 Meet With Nagpur Escorts
Call Girl Nagpur Roshni Call 7001035870 Meet With Nagpur EscortsCall Girl Nagpur Roshni Call 7001035870 Meet With Nagpur Escorts
Call Girl Nagpur Roshni Call 7001035870 Meet With Nagpur Escorts
 
👙 Kolkata Call Girls Park Circus 💫💫7001035870 Model escorts Service
👙  Kolkata Call Girls Park Circus 💫💫7001035870 Model escorts Service👙  Kolkata Call Girls Park Circus 💫💫7001035870 Model escorts Service
👙 Kolkata Call Girls Park Circus 💫💫7001035870 Model escorts Service
 
👙 Kolkata Call Girls Shyam Bazar 💫💫7001035870 Model escorts Service
👙  Kolkata Call Girls Shyam Bazar 💫💫7001035870 Model escorts Service👙  Kolkata Call Girls Shyam Bazar 💫💫7001035870 Model escorts Service
👙 Kolkata Call Girls Shyam Bazar 💫💫7001035870 Model escorts Service
 
↑Top Model (Kolkata) Call Girls Behala ⟟ 8250192130 ⟟ High Class Call Girl In...
↑Top Model (Kolkata) Call Girls Behala ⟟ 8250192130 ⟟ High Class Call Girl In...↑Top Model (Kolkata) Call Girls Behala ⟟ 8250192130 ⟟ High Class Call Girl In...
↑Top Model (Kolkata) Call Girls Behala ⟟ 8250192130 ⟟ High Class Call Girl In...
 
Independent Hatiara Escorts ✔ 9332606886✔ Full Night With Room Online Booking...
Independent Hatiara Escorts ✔ 9332606886✔ Full Night With Room Online Booking...Independent Hatiara Escorts ✔ 9332606886✔ Full Night With Room Online Booking...
Independent Hatiara Escorts ✔ 9332606886✔ Full Night With Room Online Booking...
 
↑Top Model (Kolkata) Call Girls Howrah ⟟ 8250192130 ⟟ High Class Call Girl In...
↑Top Model (Kolkata) Call Girls Howrah ⟟ 8250192130 ⟟ High Class Call Girl In...↑Top Model (Kolkata) Call Girls Howrah ⟟ 8250192130 ⟟ High Class Call Girl In...
↑Top Model (Kolkata) Call Girls Howrah ⟟ 8250192130 ⟟ High Class Call Girl In...
 
Karnal Call Girls 8860008073 Dyal Singh Colony Call Girls Service in Karnal E...
Karnal Call Girls 8860008073 Dyal Singh Colony Call Girls Service in Karnal E...Karnal Call Girls 8860008073 Dyal Singh Colony Call Girls Service in Karnal E...
Karnal Call Girls 8860008073 Dyal Singh Colony Call Girls Service in Karnal E...
 
Science City Kolkata ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sex...
Science City Kolkata ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sex...Science City Kolkata ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sex...
Science City Kolkata ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sex...
 
Goa Call "Girls Service 9316020077 Call "Girls in Goa
Goa Call "Girls  Service   9316020077 Call "Girls in GoaGoa Call "Girls  Service   9316020077 Call "Girls in Goa
Goa Call "Girls Service 9316020077 Call "Girls in Goa
 
Book Sex Workers Available Kolkata Call Girls Service Airport Kolkata ✔ 62971...
Book Sex Workers Available Kolkata Call Girls Service Airport Kolkata ✔ 62971...Book Sex Workers Available Kolkata Call Girls Service Airport Kolkata ✔ 62971...
Book Sex Workers Available Kolkata Call Girls Service Airport Kolkata ✔ 62971...
 
↑Top Model (Kolkata) Call Girls Sonagachi ⟟ 8250192130 ⟟ High Class Call Girl...
↑Top Model (Kolkata) Call Girls Sonagachi ⟟ 8250192130 ⟟ High Class Call Girl...↑Top Model (Kolkata) Call Girls Sonagachi ⟟ 8250192130 ⟟ High Class Call Girl...
↑Top Model (Kolkata) Call Girls Sonagachi ⟟ 8250192130 ⟟ High Class Call Girl...
 
VIP Call Girls Nagpur Megha Call 7001035870 Meet With Nagpur Escorts
VIP Call Girls Nagpur Megha Call 7001035870 Meet With Nagpur EscortsVIP Call Girls Nagpur Megha Call 7001035870 Meet With Nagpur Escorts
VIP Call Girls Nagpur Megha Call 7001035870 Meet With Nagpur Escorts
 
Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...
Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...
Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...
 
Almora call girls 📞 8617697112 At Low Cost Cash Payment Booking
Almora call girls 📞 8617697112 At Low Cost Cash Payment BookingAlmora call girls 📞 8617697112 At Low Cost Cash Payment Booking
Almora call girls 📞 8617697112 At Low Cost Cash Payment Booking
 
Nayabad Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Sex At ...
Nayabad Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Sex At ...Nayabad Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Sex At ...
Nayabad Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Sex At ...
 

Chess Segmentation

  • 1. Chess Segmentation by Statis Grigoropoulos © 2012
  • 2. Chess Segmentation • The Problem • Ways of Approach • Implementation • Results • Suggestions for Improvement • Conclusion Page 2 Chess Segmentation 4/13/2012
  • 3. The Problem • Detect chessboard segmentation in an image • classify the chess pieces found in the segmented chessboard. • provide a correct FEN notation for the detected chessboard(s) Page 3 Chess Segmentation © 2012
  • 4. The Algorithm • Step 1: Find internal borders of the chessboard(s)( i.e detect chessboard) • Step 2: Spit the squares for each chessboard • Step 3: Detect the piece inside the square • Step 4: Produce FEN notation Page 4 Chess Segmentation © 2012
  • 5. Step 1: Find the Borders • Ways of Approach: -Hough Transform -Norm. Cross Correlation  Page 5 Template : Chess Segmentation © 2012
  • 6. Step 1: Find the Borders • Hough Transform :MATLAB(single case) Page 6 Chess Segmentation © 2012
  • 7. Step 1: Find the Borders • Hough Transform :MATLAB(real case) Page 7 Chess Segmentation © 2012
  • 8. Step 1: Find the Borders • Norm. Cross Correlation :MATLAB Page 8 Chess Segmentation © 2012
  • 9. Step 2: Splitting the Squares • Step 1: Compute the histogram of the • • • • chessboard Step 2: Detect the dominant values of the histogram Step 3: Classify the dominant values with a confidence interval as the white and black square background Step 4: Iterate on the x and y axis and catch the interchange of the values Page 9 Chess Segmentation © 2012
  • 10. Step 2: Splitting the Squares Confidence interval = 10%= 25 Page 10 Chess Segmentation © 2012
  • 11. Step 3: Classify Square Empty Squares -Standard Deviation • A way to measure the distance of values from the mean Expected low value of standard deviation in empty squares : s.d. < 25(10%)?? -Histogram bins Page 11 Chess Segmentation © 2012
  • 12. Step 3: Classify Square s.d. =~ 20 s.d. =~ 11 s.d. =~ 30(!) Page 12 Chess Segmentation © 2012
  • 13. Step 3: Classify Square • Square containing a Piece - Rich Feature Space - Simple Mean Classifier  The Method:   Page 13 Shrink-to-fit Compute Characteristics Chess Segmentation © 2012
  • 14. Step 3: Classify Square Square Containing a Piece -The Features: 1. Normalized Histogram (dropped) 2. Compute the ratio of dark pixels in square(1) 3. Spit the Square in a 3x3 grid 4. Compute the relative ratio of dark pixels in each region(9) • Page 14 Chess Segmentation © 2012
  • 15. Step 3: Classify Square Square Containing a Piece -The Features(cont.): 5. Spit the square in a 5x5 grid 6. Compute the Relative Position of the border of the shape (chess piece) along the lines of the grid, in each direction(20) 7. Compute the relative ratio of dark pixels along each line of the grid(10) Result : 40-dimensional feature space • Page 15 Chess Segmentation © 2012
  • 16. Step 3: Classify Square • Square Containing a Piece Shape Context Page 16 Chess Segmentation © 2012
  • 17. Some Results Accuracy = 100% Accuracy 55% Accuracy 80% Page 17 Chess Segmentation © 2012
  • 18. Towards a complete Program • • • • • • • Minimize assumptions Implement Step 1 Refine Spitting Squares Method Extend Feature Space( go Log Polar?) Add more training sets Optimize Code and Algorithms Test, Test, Test… Page 18 Chess Segmentation © 2012
  • 19. Conclusion • Chess Detection and Segmentation a very hard problem in a general case • We managed to solve a small part of it • Each Step poses challenges Page 19 Chess Segmentation 4/13/2012
  • 20. Thank you! Page 20 Chess Segmentation © 2012
  • 22. Classify that! :p Page 22 Chess Segmentation © 2012