//-------------------------------------------------------------- void testApp::setup(){ //img.loadImage("test.jpg"); //Setup haar finder finder.setup("haarcascade_frontalface_default.xml"); finder.setScaleHaar(1.1); //Close to but above 1.0 for accuracy, higher for less accuracy. //Initialize key states keyIsPressed = 0; keyPressed_Space = false; keyPressed_A = false; keyPressed_D = false; keyPressed_S = false; keyPressed_F = false; //Particle init elapsedTime = 0; spawnRate = 5; ofVec2f ps_loc(ofGetWidth()/2,ofGetHeight()/2); ps.init(0, ps_loc); previousCentroid.set(ps_loc); //Camera and texture init camWidth = 640; // try to grab at this size. camHeight = 480; vidGrabber.setVerbose(false); vidGrabber.initGrabber(camWidth,camHeight); videoTexture.allocate(camWidth,camHeight, GL_RGB); camImg.allocate(camWidth, camHeight, OF_IMAGE_COLOR); debugImg.allocate(camWidth,camHeight,OF_IMAGE_COLOR); texScreen.allocate(camWidth,camHeight,GL_RGB); }
//-------------------------------------------------------------- void testApp::setup(){ ofSetFrameRate(60); ofxVec2f ps_loc(ofGetWidth()/2,ofGetHeight()/2); ofxVec2f ps_loc2(600,200); ps.init(2, ps_loc); }