[PD] using 2 web cams with GEM for multiblob
IOhannes m zmölnig
zmoelnig at iem.at
Sun May 17 21:23:53 CEST 2009
punchik punchik wrote:
> Hello, im working on a interactive installation, im using a web cam in the roof to track the movements of people in a space. The thing is that the roof is not so tall, so i just can track a little space. So i was wondering if a i oould use 2 web cams in gem and render both videos as textures in one square in gem. I need to join both videos from the web cams into one for using the pix_multiblob object to tracking multiple blobs.
>
> Is this possible? Do anybody have tried this before?
>
hi
first of all: i have used Gem with multiple cameras, there is no real
problem doing so.
then: no you cannot texture 2 pixes onto a single square as you would
like to
then: [pix_multiblob] has no notion of what a pix is textured to, so
managing to put 2 pixes on a single geo will not help you with
[pix_multiblob] at all.
instead, [pix_multiblob] will always work on a single pix, so what you
really have to do is merging the 2 pixes into 1.
there are probably a number of ways to do so; the one that comes to my
mind now is rendering to a framebuffer (with 2 geos) and grabbing the
pix-data with [pix_snap]. this feels ugly (performance wise).
however, you could use 2 [pix_multiblob]s (one for each cam) and merge
the meta-data.
this is probably easier. you will get some problems if a blob wanders
from the view of cam1 to thhat of cam2.
try to setup the cameras with a sufficiently overlapping area (or no
overlapping area at all), so that you never have a blob being partly in
cam1 and the other part in cam2 (which will result in 2 small
disconnected blobs), but either in one of the 2 cams or in both of them
(or none of them -))
i imagine the problems be easier to handle then to try to merge the 2
images smoothly.
mfg.asdrt.
IOhannes
More information about the Pd-list
mailing list