[PD] weird behaviour with [pix_opencv_facetracker] on windows
IOhannes m zmölnig
zmoelnig at iem.at
Sat Mar 28 19:59:54 CET 2015
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.
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
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 819 bytes
Desc: OpenPGP digital signature
More information about the Pd-list