Using video input in Squeak
Bert Freudenberg
bert at impara.de
Wed Jul 21 10:02:16 UTC 2004
Am 20.07.2004 um 20:53 schrieb Jack Johnson:
> 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.
Yep, this can be very efficiently done in a single BitBlt call (mapping
green component directly into black or white). See ColorMap>>mapPixel:,
which is what the bitblt primitive does for each pixel when you set an
instance of ColorMap as the bitblt's colorMap.
- Bert -
More information about the Squeak-dev
mailing list
|