Hi. I'm developing in Eclipse. With a kinect (depth sensor).
Currently, I'm trying to mask images. But for some reason as soon I apply a filter, the image flips (or rotates 180º). And I just can't get them back to the current position.
This happens not only with mask() method, but also with other filters (with filter method itself or the blend() one)
I'm giving you an example code:
PGraphics mappingZone;
..
mappingZone = applet.createGraphics(kinect.width, kinect.height, PApplet.P2D);
..
filteredImg = applet.createImage(kinect.width, kinect.height, PApplet.P2D);
...
mappingZone.beginDraw();
mappingZone.background(0);
mappingZone.image(mappingTexture, 0, 0);
mappingZone.mask(filteredImg);
mappingZone.endDraw();
applet.image(mappingZone, 0, 0, applet.width, applet.height);
I tried several things to flip the image to the correct position, like:
mappingZone.scale(-1, -1);
But nothing works. However, applying a second filter usually return the image to the correct position. Any clue?