DOC PREVIEW
Columbia CSEE 4840 - Card Counting Project Design

This preview shows page 1-2 out of 5 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 5 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 5 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 5 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Card CountingProject DesignTeam MembersChristos Savvopoulos Hugh Gordon Nathan RoganCard CounterOverviewOur goal in this project is to take real-time data from cards and interpret that into a future probability of the cards to come. Using a camera as input to the system, the digital data retrieved will be allocated into registers based on color levels determining a unique identifying pattern for each card. This process will allow a characteristic mark for the cards and a basis on which to determine what a future card is classified as. After the system is loaded we will start a statistical summary of cards viewed and adjust the probabilities of future cards in real time. This section will be done in software.Block DiagramComponents Camera:input: x,y: integersoutput: r,g,b: 8bits eachon every clock tick (r,g,b) is the value of the color at position(x,y) on the camera.The range of x,y is implementation dependent.If the input is out of range r,g,b is undefined.Sync:output: reset(bit), x,y(integers)This module first sets reset=1. Then, on the next tick, it setsreset=0 and iterates x and y through their range. This is done byiterating first over y and then over x, e.g.:for (y=0; y<480; y++) for (x=0; x<640; x++)[Note: the code is only for illustration purposes, sync is a hardware module]When it has iterated over all values it starts over (reset=1 and so on).Conv:input: r,g,b: 8bits eachoutput: c: 2bits, representing either of red, black, white, greenconv converts the RGB value to a color that is one of the possiblecolors on a card. It does so by using thresholds.Decoder: standard 2-bit decodercounters: standard up counters with reset signalsThe counters count the number of pixels per color. In essence thehardware implementation produces a histogram of the visual input. Thedecoder is responsible for selecting a counter.Interface:input: four integersThe software will poll the hardware implementation from time to timeto ask for the values of the four counters. The interface isresponsible for storing the values of each counter right before areset signal is produced by the sync module. The interface alsoincludes the bus interface, responsible for communicating with thesoftware.Software:The software is open ended. Our plan is to make it so that it firstreads and "learns" the values of each of the cards' histograms so thatit can recognize them without assistance after the learning process.Pseudo C program to interface with hardware.//predefined constants #define NEW_CARD 10#define MATCH_CARD 01#define DO_NOTHING 00#define RESET 11//data typestruct _histogram{int red;int green;int blue;int black;int white;int yellow;} ;struct _card{_histogram hist;char* card; //string card nameint value; //unique id}card;//definitionsbool doMatch(_histogram c, _card cs[]); //match card c to deck csvoid saveCard(_histogram c, int value, card cards[]);//add card void doReset();//clear the datavoid calcStats();//future implementatoin of card statsvoid listener();//poll to catch and handle eventsvoid listener();//poll to catch and handle eventsbool equal(_histogram s,_histogram m);_histogram readRegStates();_card cards[64]; //hold new cardsbool event_raise; //hardware eventint event_cond; //hardware call int _tmain(int argc, _TCHAR* argv[]){listener();return 0;}bool equal(_histogram s, _histogram m){return (s.black==m.black && s.blue==m.blue && s.green==m.green && s.red==m.red && s.white==m.white && s.yellow==m.yellow);}void listener(){ bool eventSaveCard=false;//poll catch events for(;;) { if(event_raise)//event rise {//switch on hardware call switch(event_cond) { case NEW_CARD: eventSaveCard=true; break; case MATCH_CARD: if(eventSaveCard){ _histogram hs= readRegStates(); saveCard(hs); eventSaveCard=false; ` }else{ histogram hs=readRegStates(); doMatch(hs,cards[] cs); } break; case DO_NOTHING: break; case RESET: cards[]=null; break; } }


View Full Document

Columbia CSEE 4840 - Card Counting Project Design

Documents in this Course
SPYCAM

SPYCAM

91 pages

PAC-XON

PAC-XON

105 pages

lab 1

lab 1

6 pages

memory

memory

3 pages

Structure

Structure

12 pages

Video

Video

3 pages

pacman

pacman

4 pages

Lab 1

Lab 1

6 pages

Scorched

Scorched

64 pages

lab 1

lab 1

3 pages

Video

Video

22 pages

Memory

Memory

23 pages

DVoiceR

DVoiceR

29 pages

MAZE

MAZE

56 pages

PAC XON

PAC XON

13 pages

PACXON

PACXON

13 pages

MP3 Player

MP3 Player

133 pages

Load more
Download Card Counting Project Design
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Card Counting Project Design and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Card Counting Project Design 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?