1 / 21

Playing Card Recognizer

Playing Card Recognizer. ECE 4025 February 28, 2002 Group 5 Robert Barrett Jason Hodkin Chung Tse Mar Jay Silver David Winkler Yu Ming Wu. Motivation. Short-term: Demonstrate effectiveness and usefulness of character recognition. Long-term:

irene-wade
Download Presentation

Playing Card Recognizer

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Playing Card Recognizer ECE 4025 February 28, 2002 Group 5 Robert Barrett Jason Hodkin Chung Tse Mar Jay Silver David Winkler Yu Ming Wu

  2. Motivation • Short-term: • Demonstrate effectiveness and usefulness of character recognition • Long-term: • Design autonomous on-line card playing system

  3. Project Scope • Image Restrictions: • One card per image • No occlusion of card • High contrast solid background • Constant light source • Image Allowances: • Scaling • Rotation • Font style

  4. High Resolution Color Image Down Sample & Convert to Binary Label Connected Objects & Flood Fill Card Area Use Major Axis to Find Corners for Scaling and Rotation Cross-correlate with Templates Binary Image of Card Corner Extract Corner for Comparison Compute Scores and Compare Card Value and Suit How does it work? • System diagram

  5. YR YG YB [R G B] = intensity We are only interested in intensity (Y) [R G B] YR UR VR YG UG VG YB UB VB = Color to Gray Scale Conversion Y U V YR = 0.299 YG =0.587 YB =0.114

  6. If grayScaleValue > mean + 2*s, Pixel = 1; Else, Pixel = 0 Gray Scale to Binary Conversion 25 13 1 50 28 40 247 5 225 13 18 254 190 12 5 7 210 18 255 32 11 5 36 20 13 0 0 0 0 0 0 1 0 1 0 0 1 1 0 0 0 1 0 1 0 0 0 0 0 0

  7. Labeling Identify blobs Determine characteristics of blobs Area = 24 Area = 4 1 1 1 0 0 0 0 0 1 1 1 0 1 1 0 0 1 1 1 0 1 1 0 0 1 1 1 0 0 0 1 0 1 1 1 0 0 0 1 0 1 1 1 0 0 0 1 0 1 1 1 0 0 1 1 0 1 1 1 0 0 0 0 0 1 1 1 0 0 0 0 0 1 1 1 0 2 2 0 0 1 1 1 0 2 2 0 0 1 1 1 0 0 0 3 0 1 1 1 0 0 0 3 0 1 1 1 0 0 0 3 0 1 1 1 0 0 3 3 0 1 1 1 0 0 0 0 0 Area = 5

  8. FloodFill ( pixelToEliminate ) FloodFill ( allNeighboringPixels) Erase all neigboring pixels end Flood Fill

  9. Calculate Angle of Major Axis of Best Fit Ellipse (orientation)

  10. 25 13 1 50 28 40 247 5 225 13 18 254 190 12 5 7 210 18 255 32 11 5 36 20 13 25 13 1 50 28 40 247 5 225 13 18 254 190 12 5 7 210 18 255 32 11 5 36 20 13 Rotate

  11. Scan each row and column for a white pixel Isolate the Important Information Top of Card Right Side of Card Left Side of Card Bottom of Card

  12. Locate Identifiable Symbol and isolate it top right left bottom

  13. Template Choose an Appropriate Template and Scale to Match the Template Choose a font that should be consistent with most card fonts, but that is different from the data set. Freecell (A card game on most windows OS’s) Image

  14. SS[X(r+m,c+n)*H(r,c)] = Correlation(m,n) n m Take a Normalized Cross Correlation

  15. Take a Normalized Cross Correlation

  16. Max Corr is 0.5581 Highest “Score” is a Match Max Corr is 0.3016

  17. Camera HOST EVM Color to Binary Label Scaling Templates Corner Extraction Correlation Calculation Flood Fill Rotate RTDX Decision Model Final Result Implementation Overview

  18. ImageFile Templates Corner Extraction RTDX Correlation Calculation Scaling Decision Model EVM HOST Implementation Overview Final Result

  19. Realtime Constraint • Realtime constraint depends on the application • How fast the cards change • Bounded by camera frame rate • Set goal of 1 frame/second

  20. Computational Complexity • 1 frame/second • 64x64 = 4096 pixels/template • 100 cross-correlations/template • 13 templates for number, 4 templates for suite 100 * 4096 * 17 * 1 = 7 Million MACs/second

  21. Next Steps • Implementing processing on EVM • Cross-correlation • Implementing processing on host • Corner extraction • Scaling • Decision model and display • Synchronizing host with EVM using RTDX API

More Related