Skip to content

Commit

Permalink
Replace deprecated initGrabber() function with setup().
Browse files Browse the repository at this point in the history
  • Loading branch information
bakercp committed Oct 27, 2015
1 parent 5078f61 commit 7b6f62b
Show file tree
Hide file tree
Showing 21 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion example-ar/src/ofApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ using namespace cv;

void ofApp::setup() {
ofSetVerticalSync(true);
cam.initGrabber(640, 480);
cam.setup(640, 480);

calibration.load("mbp-2011-isight.yml");
patternSize = calibration.getPatternSize();
Expand Down
2 changes: 1 addition & 1 deletion example-background/src/ofApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ using namespace ofxCv;
using namespace cv;

void ofApp::setup() {
cam.initGrabber(640, 480);
cam.setup(640, 480);
background.setLearningTime(900);
background.setThresholdValue(10);
}
Expand Down
2 changes: 1 addition & 1 deletion example-blur/src/ofApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

void ofApp::setup() {
useGaussian = false;
cam.initGrabber(640, 480);
cam.setup(640, 480);
}

void ofApp::update() {
Expand Down
2 changes: 1 addition & 1 deletion example-calibration/src/ofApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const int startCleaning = 10; // start cleaning outliers after this many samples

void ofApp::setup() {
ofSetVerticalSync(true);
cam.initGrabber(640, 480);
cam.setup(640, 480);

FileStorage settings(ofToDataPath("settings.yml"), FileStorage::READ);
if(settings.isOpened()) {
Expand Down
2 changes: 1 addition & 1 deletion example-contours-advanced/src/ofApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ using namespace ofxCv;
using namespace cv;

void ofApp::setup() {
cam.initGrabber(640, 480);
cam.setup(640, 480);
contourFinder.setMinAreaRadius(10);
contourFinder.setMaxAreaRadius(150);
//contourFinder.setInvert(true); // find black instead of white
Expand Down
2 changes: 1 addition & 1 deletion example-contours-basic/src/ofApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ using namespace ofxCv;
using namespace cv;

void ofApp::setup() {
cam.initGrabber(640, 480);
cam.setup(640, 480);
contourFinder.setMinAreaRadius(10);
contourFinder.setMaxAreaRadius(200);
}
Expand Down
2 changes: 1 addition & 1 deletion example-contours-color/src/ofApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ using namespace ofxCv;
using namespace cv;

void ofApp::setup() {
cam.initGrabber(640, 480);
cam.setup(640, 480);
contourFinder.setMinAreaRadius(10);
contourFinder.setMaxAreaRadius(200);
trackingColorMode = TRACK_COLOR_RGB;
Expand Down
2 changes: 1 addition & 1 deletion example-contours-quad/src/ofApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ using namespace ofxCv;
using namespace cv;

void ofApp::setup() {
cam.initGrabber(640, 480);
cam.setup(640, 480);
contourFinder.setMinAreaRadius(10);
contourFinder.setMaxAreaRadius(200);
unwarped.allocate(150, 100, OF_IMAGE_COLOR);
Expand Down
2 changes: 1 addition & 1 deletion example-difference-columns/src/ofApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ using namespace cv;

void ofApp::setup() {
ofSetVerticalSync(true);
cam.initGrabber(320, 240);
cam.setup(320, 240);

// imitate() will set up previous and diff
// so they have the same size and type as cam
Expand Down
2 changes: 1 addition & 1 deletion example-difference/src/ofApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ using namespace cv;

void ofApp::setup() {
ofSetVerticalSync(true);
cam.initGrabber(320, 240);
cam.setup(320, 240);

// imitate() will set up previous and diff
// so they have the same size and type as cam
Expand Down
2 changes: 1 addition & 1 deletion example-edge/src/ofApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ using namespace ofxCv;
using namespace cv;

void ofApp::setup() {
cam.initGrabber(640, 480);
cam.setup(640, 480);
}

void ofApp::update() {
Expand Down
2 changes: 1 addition & 1 deletion example-face-follow/src/ofApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ void ofApp::setup() {
finder.setup("haarcascade_frontalface_default.xml");
finder.setPreset(ObjectFinder::Fast);
finder.getTracker().setSmoothingRate(.3);
cam.initGrabber(640, 480);
cam.setup(640, 480);
sunglasses.load("sunglasses.png");
ofEnableAlphaBlending();
}
Expand Down
2 changes: 1 addition & 1 deletion example-face-zoom/src/ofApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ void ofApp::setup() {

objectFinder.setup(ofToDataPath("haarcascade_frontalface_default.xml"));
objectFinder.setPreset(ObjectFinder::Fast);
cam.initGrabber(640, 480);
cam.setup(640, 480);
cropped.allocate(ofGetWidth(), ofGetHeight(), OF_IMAGE_COLOR);
}

Expand Down
2 changes: 1 addition & 1 deletion example-face/src/ofApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ void ofApp::setup() {
ofSetFrameRate(120);
finder.setup("haarcascade_frontalface_default.xml");
finder.setPreset(ObjectFinder::Fast);
cam.initGrabber(640, 480);
cam.setup(640, 480);
}

void ofApp::update() {
Expand Down
2 changes: 1 addition & 1 deletion example-flow-distort-shader/src/ofApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ using namespace ofxCv;
using namespace cv;

void ofApp::setup() {
cam.initGrabber(1280, 720);
cam.setup(1280, 720);
motionAmplifier.setup(cam.getWidth(), cam.getHeight(), 2, .25);
}

Expand Down
2 changes: 1 addition & 1 deletion example-flow-distort/src/ofApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ using namespace cv;
void ofApp::setup() {
ofSetVerticalSync(true);
ofSetFrameRate(120);
cam.initGrabber(320, 240);
cam.setup(320, 240);

mesh.setMode(OF_PRIMITIVE_TRIANGLES);
stepSize = 8;
Expand Down
2 changes: 1 addition & 1 deletion example-flow-keypoints/src/ofApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ using namespace cv;
using namespace ofxCv;

void ofApp::setup(){
grabber.initGrabber(640,480);
grabber.setup(640,480);
}

void ofApp::update(){
Expand Down
2 changes: 1 addition & 1 deletion example-flow/src/ofApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ using namespace cv;
void ofApp::setup() {
ofBackground(0);

camera.initGrabber(320, 240);
camera.setup(320, 240);

gui.setup();

Expand Down
2 changes: 1 addition & 1 deletion example-smile/src/ofApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ using namespace cv;
void ofApp::setup() {
ofSetVerticalSync(true);
ofSetFrameRate(120);
cam.initGrabber(640, 480);
cam.setup(640, 480);
smile.setup();
}

Expand Down
2 changes: 1 addition & 1 deletion example-threshold/src/ofApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ using namespace cv;
using namespace ofxCv;

void ofApp::setup() {
cam.initGrabber(640, 480);
cam.setup(640, 480);
thresh.allocate(640, 480, OF_IMAGE_GRAYSCALE);
}

Expand Down
2 changes: 1 addition & 1 deletion example-undistortion/src/ofApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ using namespace cv;

void ofApp::setup() {
ofSetVerticalSync(true);
cam.initGrabber(640, 480);
cam.setup(640, 480);
calibration.setFillFrame(true); // true by default
calibration.load("mbp-2011-isight.yml");
imitate(undistorted, cam);
Expand Down

0 comments on commit 7b6f62b

Please sign in to comment.