Created
June 12, 2017 02:31
-
-
Save koji/20ecc88afbb84ebc9ee11927a198558c to your computer and use it in GitHub Desktop.
openFrameworks_camera.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//-------------------------------------------------------------- | |
void ofApp::setup(){ | |
ofSetFrameRate(60); | |
ofBackground(0); | |
// capture size | |
myVideo.initGrabber(640,480, true); | |
} | |
//-------------------------------------------------------------- | |
void ofApp::update(){ | |
myVideo.update(); | |
} | |
//-------------------------------------------------------------- | |
void ofApp::draw(){ | |
int left = (ofGetWidth() - myVideo.getWidth())/2; | |
int top = (ofGetHeight() - myVideo.getHeight())/2; | |
ofTranslate(left, top); | |
myVideo.draw(0,0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment