Skip to content

Commit

Permalink
Added videograbber to tracker
Browse files Browse the repository at this point in the history
  • Loading branch information
HalfdanJ committed Apr 20, 2012
1 parent 2b18c68 commit e02acf4
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 4 deletions.
6 changes: 3 additions & 3 deletions code/testApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

//--------------------------------------------------------------
void testApp::setup(){

tracker.setup();
}

//--------------------------------------------------------------
void testApp::update(){

tracker.update();
}

//--------------------------------------------------------------
void testApp::draw(){

tracker.drawDebug();
}

//--------------------------------------------------------------
Expand Down
14 changes: 14 additions & 0 deletions code/tracker.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include "tracker.h"

void Tracker::setup(){
videoGrabber.initGrabber(640, 480);
}

void Tracker::update(){
videoGrabber.update();
}

void Tracker::drawDebug(){
videoGrabber.draw(0, 0, 640, 480);
}

22 changes: 22 additions & 0 deletions code/tracker.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,29 @@

#include "ofxOpenCv.h"

enum BlockColor {
BlockRed,
BlockPoo
};

struct Block {
BlockColor color;
bool invalid;
};


//--------

class Tracker {

public:
void setup();
void update();
void drawDebug();

Block blocks[8][6];

private:
ofVideoGrabber videoGrabber;

};
2 changes: 1 addition & 1 deletion osx/Project.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ OF_PATH = ../../..
#include "../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig"

OTHER_LDFLAGS = $(OF_CORE_LIBS)
HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS)
HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) $(OF_PATH)/addons/ofxOpenCv/src $(OF_PATH)/addons/ofxOpenCv/libs/opencv/include $(OF_PATH)/addons/ofxOpenCv/libs/opencv/include/opencv

0 comments on commit e02acf4

Please sign in to comment.