reversing/mirroring video input to ofxFaceTracker?

I’m using Kyle’s ofxFaceTracker and am trying to figure out how to reverse/mirror the video fed into it, but I’m having trouble. I know I can easily reverse/mirror the camera output when its drawn to the screen (using a negative width on the draw()). However, to get the tracking mesh aligned with the output, I need what’s fed into the tracker to be reversed as well.

The tracker is taking an ofVideoGrabber object and converting it using toCv() and feeding that into the tracker. toCv() accepts type ofBaseHasPixels& and converts it to type Mat.

Any suggestions?


Maybe not the more efficient one, but it for sure an easy and fast solution to solve this is using:
But I haven’t try after OF7 came out with all changes in pixel management template system. It have a method call: void mirror(bool horizontal, bool vertical);

Yep… with an extra ofImage.
As mar.canet said… this is not the more efficient way of doing it

void testApp::update() {  
	if(cam.isFrameNew()) {  
           flipCam.mirror(false, true);  

1 Like