Hi - I'm trying to figure out how to add additional manipulations to FaceSubstitution after it overlays a face using James George's ofxSlitscan. Slitscan takes an image, but it seems that the final result of FaceSubstitution is a Clone (for which I can't really find documentation).
in the update function, there is the folowing code:
cloneReady = camTracker.getFound();
ofMesh camMesh = camTracker.getImageMesh();
clone.update(srcFbo.getTextureReference(), cam.getTextureReference(), maskFbo.getTextureReference());
Once this is done, that clone is drawn to screen in the draw function:
So I'm assuming that during the update function, I need to take the clone, and convert it into an image that I can pass to slitscan. That process normally goes as follows:
where cam is the webcam image (ofGrabber) and addImage takes an ofImage type
Any idea how to take that clone and convert it to an image that can be passed to slitscan.addImage?
Off the top of my head, I think clone is an ofFbo and it has a function called something like readbackPixels or similar that will retun pixels you can load into an ofImage.
Ah - I found Clone - no readbackPixels - just an update and draw function, where the draw function draws to "buffer" which is an Fbo.
ofFbo::readToPixels() is what you want. going to close this now.