On 03/28/2015 01:53 PM, Alexandros Drymonitis wrote:
I'm trying to use [pix_opencv_facetracker] on a windows machine and there's something strange happening. I'm opening the help patch and the camera is projected properly, but the face detection stuff (the outline of the face and the frames/sec) are being projected upside down.
put a [pix_flip] directly after [pix_video].
many of image grabbing backends have an upside-down orientation, that is: (0,0) is the upper left corner, whereas openGL (and Gem) believe that (0,0) is the lower left corner. for performance reasons, Gem takes images as delivered by the backends, and only sets a flag, whether the image needs to be flipped when being displayed (flipping the texture is way faster than flipping a pix). unfortunately many analysis objects ignore this flag, so you get upside-down results. iirc, some other objects have this problem too; e.g. when trying to [pix_mix] an image obtained from an upside-down backend and an image obtained from a correctly aligned backend, the result will not be "correct".
[pix_flip] (without any arguments) will unset the upside-down flag and correct the image if needed.
gfmsrda IOhannes
PS: afaict, virtually all image acquisition backends in the next Gem release will feature unified image orientation (all backends will deliver upside-down images), so the behaviour should be consistent on all platforms.