void draw() { ofSetColor(255); cam.draw(0, 0); tracker.draw(); glPointSize(4); ofSetColor(ofColor::red); trackerDataSave.draw(); ofSetColor(ofColor::blue); trackerDataLoad.draw(); }
void draw() { cam.draw(0, 0); ofPushStyle(); ofNoFill(); ofSetLineWidth(2); for(int i = 0; i < results.size(); i++) { ofDrawRectangle(results[i]); ofDrawBitmapStringHighlight(ofToString(i), results[i].getPosition() + ofPoint(-5,-5)); } ofPopStyle(); ofDrawBitmapStringHighlight("press any key to track", 10,20); }
void draw() { ofPushMatrix(); float screenWidth = config["screen"]["width"]; float screenHeight = config["screen"]["height"]; float camWidth = config["camera"]["width"]; float camHeight = config["camera"]["height"]; ofTranslate(screenWidth / 2, screenHeight / 2); ofRotateZDeg(config["camera"]["rotate"]); ofTranslate(-camWidth / 2, -camHeight / 2); if(cam->isInitialized()) { cam->draw(0,0); } clipping.draw(0, 0); ofPopMatrix(); if(cam->isInitialized()) { drawHistogram(cam->getPixels(), mouseY); } }
//-------------------------------------------------------------- void testApp::draw(){ videoGrabber.draw(0, 200); // make sure all OpenCL kernels have finished executing before drawing openCL.finish(); // draw the OpenGL texture (which was mapped to the OpenCL image) clImage[activeImageIndex].getTexture().draw(vidWidth, 200); ofDrawBitmapString( " app FPS : " + ofToString(ofGetFrameRate(), 2) + "\n capture FPS : " + ofToString(captureFPS, 2) + "\n" + "\n doBlur (b) : " + (doBlur ? "X" : "") + "\n blurAmount (1-9) : " + ofToString(blurAmount) + "\n doFlipX (x) : " + (doFlipX ? "X" : "") + "\n doFlipY (y) : " + (doFlipY ? "X" : "") + "\n doGreyscale (g) : " + (doGreyscale ? "X" : "") + "\n doInvert (i) : " + (doInvert ? "X" : "") + "\n doThreshold (t) : " + (doThreshold ? "X" : "") + "\n threshLevel ([]) : " + ofToString(threshLevel, 2) , 30, 30); }
//-------------------------------------------------------------- void VisualRingBuffer::setTexture(ofVideoGrabber grabber){ begin(); grabber.draw(0, 0, width, height); end(); }