Top Banner
21

Laser Shot - Massachusetts Institute of Technologyweb.mit.edu/.../chent_Project_Design_Presentation.pdf · 2006. 11. 19. · Duck Hunt System - Duck Modules to & from video controller

Aug 24, 2020

Download

Documents

dariahiddleston
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: Laser Shot - Massachusetts Institute of Technologyweb.mit.edu/.../chent_Project_Design_Presentation.pdf · 2006. 11. 19. · Duck Hunt System - Duck Modules to & from video controller
Page 2: Laser Shot - Massachusetts Institute of Technologyweb.mit.edu/.../chent_Project_Design_Presentation.pdf · 2006. 11. 19. · Duck Hunt System - Duck Modules to & from video controller

Laser Shot

A Video-based Alternativeto Arcade Light Guns

By Tiffany Chen, Spencer Sugimoto, and Paul Yang

Page 3: Laser Shot - Massachusetts Institute of Technologyweb.mit.edu/.../chent_Project_Design_Presentation.pdf · 2006. 11. 19. · Duck Hunt System - Duck Modules to & from video controller

Introduction

Dot FinderDuck Hunt SystemPotential IssuesMaterials Needed

Page 4: Laser Shot - Massachusetts Institute of Technologyweb.mit.edu/.../chent_Project_Design_Presentation.pdf · 2006. 11. 19. · Duck Hunt System - Duck Modules to & from video controller

Block Diagram

display

gameover3

score_rgb

life

tv_in_ycrcb

threshold

set

corner_select

vcount

hcountDot Finder

xy

pixel

Duck

cloud_speed

Cloud

Video ControllerScore

Keeper

3

duck_rgb

duck_enablecloud_rgb

3

score_enable

Bushbush_select

bush_rgb3

triggerAudio handler

Speaker

Page 5: Laser Shot - Massachusetts Institute of Technologyweb.mit.edu/.../chent_Project_Design_Presentation.pdf · 2006. 11. 19. · Duck Hunt System - Duck Modules to & from video controller

Dot Finder

Goal: Given an camera view of the screen with the laser dot, find the coordinates of the dot on the screen.

What the Camera SeesScreen Location of Dot

Page 6: Laser Shot - Massachusetts Institute of Technologyweb.mit.edu/.../chent_Project_Design_Presentation.pdf · 2006. 11. 19. · Duck Hunt System - Duck Modules to & from video controller

Dot Finder Algorithm

Remove blue, green

Apply a threshold

Page 7: Laser Shot - Massachusetts Institute of Technologyweb.mit.edu/.../chent_Project_Design_Presentation.pdf · 2006. 11. 19. · Duck Hunt System - Duck Modules to & from video controller

Dot Finder Algorithm

Find the center of mass of resulting dotApply a perspective transformation of the form

(x,y) – coordinates of dot in camera image(X,Y) – coordinates of the dot on the screena,b,c,d,e,f,g,h – calibration coefficients

1

1 Perspective Transform Estimation - <http://alumni.media.mit.edu/~cwren/interpolator/>

Page 8: Laser Shot - Massachusetts Institute of Technologyweb.mit.edu/.../chent_Project_Design_Presentation.pdf · 2006. 11. 19. · Duck Hunt System - Duck Modules to & from video controller

Dot Finder Block Diagram

tv_in_ycrcb x XCenter of Mass

Coordinate Transformerthreshold y Y

Calibration Screen

Generator

setCalibration Coefficients

a,b,c,d,e,f,g

corner_select

pixelvcount

hcount

Page 9: Laser Shot - Massachusetts Institute of Technologyweb.mit.edu/.../chent_Project_Design_Presentation.pdf · 2006. 11. 19. · Duck Hunt System - Duck Modules to & from video controller

Dot Finder – Center of Mass

NTSC Decoder

tv_in_ycrcbf

v

h

y rycrcbcr g

Pixel x,y

Counter

YCrCb2

RGB

RedFilter

cb b

x x

y y

x

y

red

xxPoint

Averagethreshold yThreshold y

v

Page 10: Laser Shot - Massachusetts Institute of Technologyweb.mit.edu/.../chent_Project_Design_Presentation.pdf · 2006. 11. 19. · Duck Hunt System - Duck Modules to & from video controller

Duck Hunt System

800 x 600, 60 Hz displayShoot ducks before time runs outFeatures

Animated ducks and bushesSound effectsScore keeping & timing

Page 11: Laser Shot - Massachusetts Institute of Technologyweb.mit.edu/.../chent_Project_Design_Presentation.pdf · 2006. 11. 19. · Duck Hunt System - Duck Modules to & from video controller

Duck Hunt System - Cloud Generator

Clouds move at constant speed across the sky

cloud_controllercloud_speed

cloud_

image

cloud_rgbto & from video

controller

cloud_ROM

15 KB

cloud_

addr

3

Page 12: Laser Shot - Massachusetts Institute of Technologyweb.mit.edu/.../chent_Project_Design_Presentation.pdf · 2006. 11. 19. · Duck Hunt System - Duck Modules to & from video controller

Duck Hunt System - Bush Generator

Bushes are hard coded onto the screenBushes sway left and right each secondIf a bush is selected, bush shudders

from random number generator

bush_select

bush_controllerbush_rgbto video

controller 3

bush_image

addr

bush_rom

Page 13: Laser Shot - Massachusetts Institute of Technologyweb.mit.edu/.../chent_Project_Design_Presentation.pdf · 2006. 11. 19. · Duck Hunt System - Duck Modules to & from video controller

Duck Hunt System - Bush FSMexpire

State 00:Bush Right

State 01:Bush Left

State 11:Up Left

expirebush_select

FSM Component

State 10:Up Right

Default progression-bushes sway left and rightIf bush_select ever goes high, bush shudders

bush_selectexpire

expire

Page 14: Laser Shot - Massachusetts Institute of Technologyweb.mit.edu/.../chent_Project_Design_Presentation.pdf · 2006. 11. 19. · Duck Hunt System - Duck Modules to & from video controller

Duck Hunt System – Score Keeper

Increments score whenever a duck is shotDisplays current scoreCounts down timeIndicates a game over

lifefrom duck_controller

one_hz_enable score_rgbfrom second_timer score_keeper to video_controller

score_enable gameoverfrom video_controller to video_controller

to audio_controller

Page 15: Laser Shot - Massachusetts Institute of Technologyweb.mit.edu/.../chent_Project_Design_Presentation.pdf · 2006. 11. 19. · Duck Hunt System - Duck Modules to & from video controller

Duck Hunt System - Duck Modulesto & from video controller

second_timer

duck_enable

duck_rgb

one_hz_enable

3

expire

duck_addr

duck_image

timerappear_enable

duck_ROM

45 KBappear_counterappear

duck_controller r_interval_

enable

r_interval

xyfrom dot

finder r_bush_enabletrigger random_number_generatorbush_selectto score keeper,

audio handlerlife

speed enable

duck

speed

to bush generatorspeed_determination

Page 16: Laser Shot - Massachusetts Institute of Technologyweb.mit.edu/.../chent_Project_Design_Presentation.pdf · 2006. 11. 19. · Duck Hunt System - Duck Modules to & from video controller

Duck Hunt System - Duck Controller

State 00:Wings Up

State 01:Wings Down

State 10:Die

expire

expire

~life~life

appear Compares x & y coordinates of laser dot to duck coordinatesTakes 3 shots to kill duckFSM Component

Page 17: Laser Shot - Massachusetts Institute of Technologyweb.mit.edu/.../chent_Project_Design_Presentation.pdf · 2006. 11. 19. · Duck Hunt System - Duck Modules to & from video controller

Duck Hunt System - Video Controller

Priority encoderEnsures ducks hide behind bushes & cloudsOutputs pixel RGBs Controls image transparency

displaypixel3bush_rgb

cloud_rgb cloud_speed

video

controller

score_rgb score_enablegameover duck_enableduck_rgb

Page 18: Laser Shot - Massachusetts Institute of Technologyweb.mit.edu/.../chent_Project_Design_Presentation.pdf · 2006. 11. 19. · Duck Hunt System - Duck Modules to & from video controller

Duck Hunt System - Audio Controller

Sound SelectorChooses sound to output to speaker

Duck death, Laser shot, Bush rustle, Gameover, Duck Flapping

gameoveraudio_handleraddr = (x || y) ? shot :

life ? shudder :

death;

(from Scorekeeper)trigger sound

(from Dot Finder)Speaker

4life

(from Duck Handler)

sound_dataaddr

audio_rom

144 KB

Page 19: Laser Shot - Massachusetts Institute of Technologyweb.mit.edu/.../chent_Project_Design_Presentation.pdf · 2006. 11. 19. · Duck Hunt System - Duck Modules to & from video controller

Timeline

11/22 Center of Mass Module fully functional, Duck module basic functionality11/29 Dot Finder fully functional; Duck and Video Controller fully functional; Bush module, scorekeeping, and Audio fully functional12/4 Initial integration of dot finder & duck hunt system12/11 finish debugging & final checkoff

Page 20: Laser Shot - Massachusetts Institute of Technologyweb.mit.edu/.../chent_Project_Design_Presentation.pdf · 2006. 11. 19. · Duck Hunt System - Duck Modules to & from video controller

Materials Needed

NES Light “Zapper” Gun5mW Red Laser Pointer10mW Green Laser PointerPlastic SheetFine-Grit Sandpaper

Page 21: Laser Shot - Massachusetts Institute of Technologyweb.mit.edu/.../chent_Project_Design_Presentation.pdf · 2006. 11. 19. · Duck Hunt System - Duck Modules to & from video controller

Dot Finder – Potential Issues

Reflectivity - Dot must be brightest object on screenLCD reflectivity may not reflect laser strongly enoughUse a diffusive reflector overlay or brighter laser

Noise - Assumed noise was low enough such that the threshold filter would be sufficient

If not, and mean or median filter will be necessary

OtherOver saturation of imageDifficult perspective transformAccuracyBlurring of dot due to exposure times