Agricola Board Game Assist program Derek Lang EGGN512 Final Project Spring 2012 Outline ‣ What is Agricola? ‣ Main tasks – Creating test images – Detecting the board – Detecting tiles – Detecting player pieces – Detecting livestock pieces ‣ Issues (so far) ‣ Todo list What is Agricola? ‣ ‘German-Style’ board game ‣ 12th cent. Farm management ‣ Complicated scoring – Based on: ‧ ‧ ‧ ‧ ‧ ‧ ‧ Persons Livestock Fields Pastures House material Crops Other ‣ But we can use these rules to simplify our algorithms (Somewhat) typical endgame scenario Outline ‣ What is Agricola? ‣ Main tasks – Creating test images – Detecting the board – Detecting tiles – Detecting player pieces – Detecting livestock pieces ‣ Issues ‣ Todo list Creating Test Images ‣ 16 JPEG test images taken with DSLR camera ‣ Rectified with image post-processing software ‣ Images taken under similar lighting conditions Detecting the Board ‣ Markers placed on corners ‣ Detection using narrow-band color threshold – Similar to detecting CCC markers ‣ Creates correspondence, used to create orthoimage (using matlab’s cp2tform) Detecting Tiles - 1 ‣ First, the board is broken up into 54 regions ‣ This will make subsequent analysis simpler Detecting Tiles - 2 ‣ 4 types of tiles ‣ SIFT algorithm used with a course Hough space ‣ Simplifications: – Only check ‘squares’ – Only 1 type of house tile – Angle of transform close to α*90° – No ‘full’ transform needed Detecting Player pieces ‣ Three types – person, stable, fence ‣ Simplified to one color ‣ Narrow-band color threshold on regions of interest ‣ Used labeled region properties to determine incidence for person & stable – Centroid, Area ‣ % of total region for fences ‣ Can reduce number of checks using tile results Detecting livestock pieces ‣ Three types/colors ‣ Threshold based on HSV values (similar to before) ‣ Labeled region area used to determine amount of pieces detected ‣ Account for pieces touching ‣ Can reduce checks using tile results Outline ‣ What is Agricola? ‣ Main tasks – Creating test images – Detecting the board – Detecting tiles – Detecting player pieces – Detecting livestock pieces ‣ Issues ‣ Todo list Issues - 1 ‣ Glare on detecting board markers – Ensure even lighting ‣ Problem on SIFT correspondence – Modify the template images Issues - 2 ‣ Livestock – Area of a ‘blob’ varies with angle of original picture ‣ Try to mitigate by making a total average within a square ‣ Still an issue – will try with average over all squares next Outline ‣ What is Agricola? ‣ Main tasks – Creating test images – Detecting the board – Detecting tiles – Detecting player pieces – Detecting livestock pieces ‣ Issues ‣ Todo list Todo List - 1 1. Vegetable detection 1. Similar to player piece/marker detection 2. Pasture detection Todo list - 2 3. Put everything together – create performance metric 4. (Optional) Convert to standalone program Questions?