Using video input in Squeak

Jack Johnson knapjack at gmail.com
Tue Jul 20 18:53:08 UTC 2004


I can't help you with the implementation details, but I can tell you
that in order to generate B&W, most people will average the RGB to get
an 8-bit grayscale value.  The overhead of this for a live video feed
can be noticeable, and you'll find that for most video systems if you
just take the values for green and compose a B&W image from it, the
contrast will be more what you would want or expect from B&W video.

As for true B&W, the easy thing to do once you have grayscale is to
pick some frames and test kicking all values below x to black, and
above to white.  Depending on the contrast in the back & foreground,
this can be trivial or a real pain in the rear.  Otherwise you're
probably looking at fudging some sort of edge detection or some other
process to generate a nice, clean shadow (if that's what you're
after).

Typical blue- and green-screen tricks work well if you have some level
of wardrobe control or are willing to invest a little more time in the
image filtering.

-Jack

On Tue, 20 Jul 2004 11:03:33 -0500, Rob Hensley <hensleyrj at rockhurst.edu> wrote:
> So, I want to take my Form object and make a BitBlt out of it, and then
> do what w/ the BitBlt object's colorMap? The comments seem to indicate
> that I can convert my Form object into a MaskedForm object, and then
> pass a list of colors (in my case, black and white) that the colorMap
> should be in terms of. Is that what you were advising me to do?
> 
> -----Original Message-----
> From: squeak-dev-bounces at lists.squeakfoundation.org
> [mailto:squeak-dev-bounces at lists.squeakfoundation.org] On Behalf Of Bert
> Freudenberg
> Sent: Friday, July 16, 2004 6:31 PM
> To: The general-purpose Squeak developers list
> Subject: Re: Using video input in Squeak
> 
> Use BitBlt with a colorMap (see BitBlt's class comment).
> 
> - Bert -
> 
> Am 16.07.2004 um 20:31 schrieb Rob Hensley:
> 
> > I'm not sure who has been following my story, but I started this
> > project
> > using a Mac, and then switched to a PC running Windows (at the urging
> > of
> > my mentor).
> >
> > I am using the DVideoShowDecoderPlugin. I have tested it, and it
> works.
> > My next step is separating the live actor's shadow part of the video
> > image from the white background: I need to convert the Form from color
> > to black and white. Once I have the shadow only, I can make a Morph
> out
> > of it and instruct the virtual balls to react to it.
> >
> > Does anyone have any tips on the easiest way to convert the color
> image
> > to B/W?
> >
> > -----Original Message-----
> > From: squeak-dev-bounces at lists.squeakfoundation.org
> > [mailto:squeak-dev-bounces at lists.squeakfoundation.org] On Behalf Of
> > Bert
> > Freudenberg
> > Sent: Wednesday, July 14, 2004 6:55 AM
> > To: The general-purpose Squeak developers list
> > Subject: Re: Using video input in Squeak
> >
> > You would have to write a plugin similar to Diego's V4LPlugin that
> uses
> > Quicktime to read from the camera. To my knowledge, there is no such
> > plugin, yet. It might be a good idea to use the same primitives to
> > minimize platform-dependencies on the image side.
> >
> > - Bert -
> >
> > Am 12.07.2004 um 14:42 schrieb Rob Hensley:
> >
> >> Ah, I'm using a Mac for this project...
> >>
> >> Any ideas?
> >>
> >>      -----Original Message-----
> >>      From: squeak-dev-bounces at lists.squeakfoundation.org on behalf of
> > Ned
> >> Konz
> >>      Sent: Wed 7/7/2004 3:47 PM
> >>      To: The general-purpose Squeak developers list
> >>      Cc:
> >>      Subject: Re: Using video input in Squeak
> >>
> >>
> >>
> >>      On Wednesday 07 July 2004 1:30 pm, Rob Hensley wrote:
> >>      > That's exactly where I got the idea for the project!
> >>      >
> >>      > Do you have any suggestions as to where to start looking for
> >> interface
> >>      > code/demos?
> >>
> >>      Diego Gomez Deck has been working on an interface from
> > Video4Linux to
> >> Squeak.
> >>
> >>      Look at:
> >>      http://minnow.cc.gatech.edu/squeak/3765
> >>
> >>      Also:
> >>      http://minnow.cc.gatech.edu/squeak/1853
> >>      http://minnow.cc.gatech.edu/squeak/2411
> >>      http://www.is.titech.ac.jp/~ohshima/squeak/DShowVideo/
> >>
> >>      --
> >>      Ned Konz
> >>      http://bike-nomad.com/squeak/
> 
>



More information about the Squeak-dev mailing list