[PD] avoiding flicker with pix_video+pix_movement
Matteo Sisti Sette
matteosistisette at gmail.com
Sun Mar 21 18:22:36 CET 2010
Hi,
I've found a thread about this issue in the archives but no solution.
When you use [pix_video] followed by [pix_movement], you get either a
white frame or a black frame every once in a while.
In Windows I see black-frame flickering, while in Mac I have seesn
"frame-identity" flickering. By "frame-identity flickering" I mean that
pix_movement outputs an image equal to the input frame, as if the frame
was compared with a black previous frame.
I guess the reason of the flickering is that the camera may generate
frames slowlier than Gem renders, that is, in the time between one frame
rendering and the next one, the camera may not have produced a new frame.
My guess is that that in Mac, when this happens, the "missing" frame is
seen as a black frame, so pix_movement produces a difference equal to
the input frame. This is clearly a bug. Pretty strange since it seems to
affect only pix_movement (by directly using pix_video as a texture you
don't get any black frames)....
In Windows on the other hands, it seems that when the camera has not had
the time to produce a new frame, a frame identical to the last one is
seen, which produces a null difference in pix_movement.
While this last case is probably the expected behaviour, it makes the
combination [pix_video]+[pix_movement] totally useless to do motion
detection.
How do you work this around? How can one "know" whether a new frame has
been captured or not? Without this information you can't do any useful
motion detection: you never know whether you are comparing two actually
identical frames or the same frame.......
Any idea?
An obvious workaround is to lower gem's framerate but this is obviously
unacceptable in most situations...
thanks in advance
m.
--
Matteo Sisti Sette
matteosistisette at gmail.com
http://www.matteosistisette.com
More information about the Pd-list
mailing list