E27 SPRING 2013 ZUCKER PROJECT 2 PROJECT 2 AUGMENTED REALITY GAMING SYSTEM



Similar documents
Augmented Reality Tic-Tac-Toe

T O B C A T C A S E G E O V I S A T DETECTIE E N B L U R R I N G V A N P E R S O N E N IN P A N O R A MISCHE BEELDEN

ECE 533 Project Report Ashish Dhawan Aditi R. Ganesan

Visual Storytelling, Shot Styles and Composition

MAKING MATH MORE FUN BRINGS YOU FUN MATH GAME PRINTABLES FOR HOME OR SCHOOL

Tracking of Small Unmanned Aerial Vehicles

First Grade Exploring Two-Digit Numbers

Third Grade Math Games

Object-Oriented Design. CSE 5236: Mobile Application Development Course Coordinator: Dr. Rajiv Ramnath Instructor: Adam C.

SMART Board Tips & Tricks (version 9.0) Getting Started. SMART Tools vs. SMART Notebook software

Graphic Design. Background: The part of an artwork that appears to be farthest from the viewer, or in the distance of the scene.

Colour Image Segmentation Technique for Screen Printing

Lesson 8: Simon - Arrays

Computer Vision. License Plate Recognition Klaas Dijkstra - Jaap van de Loosdrecht

Introduction to Microsoft Publisher : Tools You May Need

GRC 119 Assignment 6 Create a Flash Animation Banner Ad

Tasks to Move Students On

CS231M Project Report - Automated Real-Time Face Tracking and Blending

How to Keep a Laboratory Notebook

VISUAL GUIDE to. RX Scripting. for Roulette Xtreme - System Designer 2.0

Vision based Vehicle Tracking using a high angle camera

Analecta Vol. 8, No. 2 ISSN

HANDS-FREE PC CONTROL CONTROLLING OF MOUSE CURSOR USING EYE MOVEMENT

Building an Advanced Invariant Real-Time Human Tracking System

Programming Exercise 3: Multi-class Classification and Neural Networks

Information Technology Services will be updating the mark sense test scoring hardware and software on Monday, May 18, We will continue to score

Tracking performance evaluation on PETS 2015 Challenge datasets

Indoor Surveillance System Using Android Platform

Template-based Eye and Mouth Detection for 3D Video Conferencing

Scanners and How to Use Them

ROBOTRACKER A SYSTEM FOR TRACKING MULTIPLE ROBOTS IN REAL TIME. by Alex Sirota, alex@elbrus.com

VEHICLE LOCALISATION AND CLASSIFICATION IN URBAN CCTV STREAMS

ESE498. Intruder Detection System

ART & BOOKS by Shannon Christensen TEACHING KINDERGARTEN

Speed Performance Improvement of Vehicle Blob Tracking System

Project 4: Camera as a Sensor, Life-Cycle Analysis, and Employee Training Program

Tutorial. Making Augmented Reality Accessible for Everyone. Copyright (c) 2010 Human Interface Technology Laboratory New Zealand

GRC 119 Assignment 7 Create a Flash Animation Banner Ad

SMART Board Interactive Whiteboard Setup with USB Cable

Galaxy Morphological Classification

PowerPoint 2007 Basics Website:

Stroke Drivers Screening Assessment Revised Manual 2012

Face detection is a process of localizing and extracting the face region from the

From the probabilities that the company uses to move drivers from state to state the next year, we get the following transition matrix:

Cloud tracking with optical flow for short-term solar forecasting

Passing the PRINCE2 Foundation exam

B.A IN GRAPHIC DESIGN

A series Metric (cm) Imperial (inch)

Sony Releases the Transparent Lens Eyewear SmartEyeglass Developer Edition

Detection and Restoration of Vertical Non-linear Scratches in Digitized Film Sequences

SMART Board Training Packet. Notebook Software 10.0

Computer Vision. Image math. Copyright by NHL Hogeschool and Van de Loosdrecht Machine Vision BV All rights reserved

Parts of a Computer. Preparation. Objectives. Standards. Materials Micron Technology Foundation, Inc. All Rights Reserved

3D Scanner using Line Laser. 1. Introduction. 2. Theory

Video Conferencing Display System Sizing and Location

DANCE VOCABULARY LEARNING GAMES

To determine vertical angular frequency, we need to express vertical viewing angle in terms of and. 2tan. (degree). (1 pt)

SMART Board 9 Software Tips and Tricks

Build Panoramas on Android Phones

Unit One Employability Skills

Excel Database Management

Expert Color Choices for Presenting Data

Recipes4Success. Animate a Rocket Ship. Frames 6 - Drawing Tools

Assessment. Presenter: Yupu Zhang, Guoliang Jin, Tuo Wang Computer Vision 2008 Fall

Conditionals: (Coding with Cards)

Classroom Activities. These educational materials were developed by the Carnegie Science Center <

MATHEMATICS Y6 Geometry 6750 Use co-ordinates and extend to 4 quadrants Equipment MathSphere

Very Low Frame-Rate Video Streaming For Face-to-Face Teleconference

TaleBlazer Documentation

Rapid Android Development

Volume of Right Prisms Objective To provide experiences with using a formula for the volume of right prisms.

VECTORAL IMAGING THE NEW DIRECTION IN AUTOMATED OPTICAL INSPECTION

Visual Structure Analysis of Flow Charts in Patent Images

Trigger-to-Image Reliability (T2IR)

Real Time Target Tracking with Pan Tilt Zoom Camera

EFFICIENT VEHICLE TRACKING AND CLASSIFICATION FOR AN AUTOMATED TRAFFIC SURVEILLANCE SYSTEM

EFX Keying/Alpha plugins for After Effects

HUNT LIBRARY VIDEO WALL GUIDE

MEMORY WORK - MATH FACTS 1

Poker Vision: Playing Cards and Chips Identification based on Image Processing

False alarm in outdoor environments

Colour by Numbers Image Representation

521466S Machine Vision Assignment #7 Hough transform

CS1112 Spring 2014 Project 4. Objectives. 3 Pixelation for Identity Protection. due Thursday, 3/27, at 11pm

Traffic Monitoring Systems. Technology and sensors

Locating and Decoding EAN-13 Barcodes from Images Captured by Digital Cameras

Three daily lessons. Year 5

How To Improve Efficiency In Ray Tracing

Unit 19: Probability Models

Choosing Colors for Data Visualization Maureen Stone January 17, 2006

Automated Monitoring System for Fall Detection in the Elderly

SMART NOTEBOOK 10. Instructional Technology Enhancing ACHievement

NDSU Technology Learning & Media Center

Acing Math (One Deck At A Time!): A Collection of Math Games. Table of Contents

Transcription:

PROJECT 2 AUGMENTED REALITY GAMING SYSTEM OVERVIEW For this project, you will implement the augmented reality gaming system that you began to design during Exam 1. The system consists of a computer, projector, camera, and whiteboard or chalkboard. A human player can compete against the computer in traditional pencil and paper games like Tic-Tac-Toe by drawing on the board, while the computer projects images: Figure 1: Overview of system components The project consists of four main tasks: establishing a homography between the projected image and the camera image, rectifying the camera image, determining whether the board is obstructed, and classifying the marks made by the human player. TASKS 1. Establishing a homography. Before you can implement interesting games, you must first establish a homography between the camera image and the projected image, as shown in Figure 2. Your system must establish the homography automatically, with no input required from the user. There are many ways to accomplish this, but here is the strategy I would recommend: 1

Figure 2: Projected and camera images Start by projecting a blank image onto the board. After 10 or so frames have been captured by the camera, pick the last one and designate it the reference image. 1 Then, project a sequence of circular dots (one at a time) onto the board, laid out in a regular grid, where the game play will occur. For each dot image, take the difference (cv2.absdiff) of the current dot image and the reference image. Threshold each difference image to get a binary image, and use the blob-finding code from previous assignments to find the centroid of the dominant blob in the frame. The homography H is the mapping that maps the blob centroids to the original, projected coordinates. Tip: To eliminate oddities from auto-exposure, people in front of the camera, etc., you may want to make sure that the dominant blob position is stable (i.e. does not change much over 3 or 4 frames) before moving onto the next position. 2. Rectifying images. Once you have the homography, you can use it to map the camera image to a rectified image of the game board. Again, you will want to wait several frames after projecting the game board before setting the reference rectified image, to allow auto-exposure to adjust. My rectified image in Figure 3 is black, because I used a chalkboard. Note that both the dark areas and the light areas in the image have varying brightness. Neither one of these issues is a problem, because in general we will be operating on relative (i.e. differenced) intensity values, not absolute ones. 1 Why capture 10 frames? You want to wait until the auto-exposure and other settings of the camera adjust before grabbing a reference image. 2

Figure 3: Rectified reference image 3. Determining board obstruction. Your system should not only be able to classify a mark on the board as to its shape and position (e.g. X s and O s for Tic-Tac-Toe), but it should also be able to determine whether there is an object (i.e. a hand) obstructing the board from view. Figure 4: Left to right: rectified image after X has been drawn, difference with rectified reference image (Figure 3), thresholded, eroded by a small structuring element. Figure 5: Left to right: rectified image with hand obstructing board, difference with rectified reference image (Figure 3), thresholded, eroded by a small structuring element. As shown in Figure 4 and Figure 5, there is a substantial difference between marks on the board, and objects obstructing the board. Since the human player is drawing fine lines on the board, eroding the thresholded difference image by a small structuring element should completely remove anything that is a valid mark; any image that has many foreground pixels remaining after thresholding and erosion is likely to be an obstruction. 3

4. Classifying marks. Once you have determined there is a mark on the board, the system should classify its position and type as required by the game. For games like Tic-Tac-Toe, you may find it useful to use the cv2.matchtemplate function to perform normalized correlation of a template at all possible locations within an image. It returns the correlation of each result (i.e. a score from -1 to 1, for each location). Figure 6: Image against which templates will be matched. This image was obtained by dilating the thresholded image from Figure 4 with a small structuring element. Possible templates to match X s and O s are shown in Figure 7. They were created using OpenCV cv2.line and cv2.circle functions, followed by a cv2.gaussianblur operation. 2 Matching with multiple line strengths and template scales should help cope with the fact that different players will mark at slightly different locations, sizes, and line widths. Figure 7: Templates for matching X and O shapes. Note variation in both size and line width. In the case of Tic-Tac-Toe, you may wish to constrain your template matching to a particular subregion of the rectified image (i.e. the 1/9 th of the difference image which has the maximum number of thresholded pixels). The class of the mark can be determined by hysteresis thresholding: let X max denote the maximum normalized correlation for all X templates, at all locations within the image, and O max the corresponding maximum for all O templates. 3 Pick two thresholds τ 1 ą τ 0. If X max ą τ 1 and τ 0 ą O max, then the mark is determined to be an X; if O max ą τ 1 and τ 0 ą X max, then the mark is an O; otherwise, the mark is not classified as either one. On the other hand, if you are playing the classic dots and boxes game, you need to use the 2 In my experiments, the blur seemed to help slightly, but is not strictly necessary. 3 Note that in Python, the max of two scalars is simply max(s1, s2), and the maximum element of an array is numpy.max(a). 4

difference image to classify horizontal vs vertical lines instead, which might benefit from its own specialized move detection approach, such as searching each horizontal and vertical edge for the brightest area in the difference image. Once a move is detected and classified, the rectified reference image can be updated to continue play. Again, you may want to wait for auto-exposure to adjust before continuing (i.e., enforce a delay of a small number of frames after recognizing a move). GAME PLAY This lab handout so far has only consisted of a technical description of the capabilities required for your project. Your job is to combine these capabilities into a fully functional game program. Your program may allow the computer to play against a human, or serve as a referee between two human players. In either case, your program should be robust enough to detect invalid or unrecognized moves, and recover accordingly. It should also be able to succesfully recognize whatever criteria end the game (e.g. in Tic-Tac-Toe, a full board or three in a row), and declare a winner. If you program a computer player, I will not be grading you based upon its skill this is a computer vision course, not an AI course! All I ask is that the computer makes legitimate (if not particularly smart) moves. There are several things you can do to add extra cool factor to your project. Examples include visual effects like highlighting the player s marks, At minimum, you should provide the human with some visual feedback through the projector indicating what the computer is doing as either referee or player. In the end, you don t need to play Tic-Tac-Toe I m open to other games, as long as they involve the four tasks outlined above. It would be a bad idea to try to recognize too many types of marks, however. While discriminating between X s and O s is relatively easy, recognizing all possible handwritten letters is much more difficult. If you re interested, you can find a compilation of pencil-and-paper games here: http://www.papg.com/. My suggestions from that site are: Sim, Obstruction, Go-Moku, 3D Noughts and Crosses, Dots and Boxes, and Cram/Domineering. EVALUATION CRITERIA Your project will be evaluated by the following criteria (percentages are approximate): a. source code and video (10%) - Turn in the full source code for your project, including any additional files needed to compile and run it. I expect your code to be neatly indented and reasonably commented. You should also submit video of your system running (note you can just dump the camera stream to a file, or record video with a separate camera/cellphone). b. homography (15%) - Automatically calculate a homography with no human intervention. 5

If human intervention is needed, you will lose points here. c. rectification (15%) - Display the rectified camera image once the homography has been applied. This can be on a segment of the board not used for gameplay, or on another screen. d. determining obstruction (15%) - Determine whether its view of the board is obstructed, and indicate to the user if so (i.e., by projecting a message outside of the board area). e. mark classification (15%) - Discriminate between two types of marks using normalized correlation, with reasonable accuracy. It s generally better to have false negatives than false positives (i.e., failing to recognize an X as such is better than mis-labeling it an O). f. cool factor (15%) - Provide some visual feedback to the human user, and be interactive somehow. Be creative! g. demo (15%) - We will schedule demonstrations to be held outside of class after spring break. During the demo, your group will be assessed on the criteria above. You should be prepared to address the criteria listed above, and answer questions about your group s approach. Instructions for submitting your code and video online will be provided. Since you are demonstrating your code live, no written report is needed. 6