Hi, I am trying to track faces and places masks on them. I allready have the tracking stuff and the images. Now i have to make the image stick to the face, the problem is I just don’t how to do that. Can anybody help me out?
Thnx!
Bram
Hi, I am trying to track faces and places masks on them. I allready have the tracking stuff and the images. Now i have to make the image stick to the face, the problem is I just don’t how to do that. Can anybody help me out?
Thnx!
Bram
Some of the members of OF have already done it
They also provide src code for you.
Check the thread below
http://www.openframeworks.cc/forum/view-…-e+tracking
Thanks!
Hi Bram,
As this is quite specific to your project it might be better to email me about this.
But here is how to draw the image on the biggest face found.
Assuming the ofImage is called img.
If you’re video is 320 240 and you want to draw it at 640 480 - the dimensions of your image will also need to be scaled up.
//--------------------------------------------------------------
void testApp::draw(){
ofSetColor(255, 255, 255);
cvColor.draw(0, 0, 320, 240);
faceFinder.draw(0, 0, 320, 240);
ofSetColor(50, 50, 255);
ofDrawBitmapString("find those faces!", 10, 15);
if(numFaces > 0){
ofSetColor(0xFFFFFF);
img.draw(faceFinder.blobs[0].boundingRect.x, faceFinder.blobs[0].boundingRect.y, faceFinder.blobs[0].boundingRect.width, faceFinder.blobs[0].boundingRect.height);
}
}