TAMS / Java / Hades / applets: contents | previous | next | ||||
Hades Applets contents visual index introduction std_logic_1164 gatelevel circuits delay models flipflops adders and arithm... counters LFSR and selftest memories programmable logic state-machine editor misc. demos I/O and displays DCF-77 clock relays (switch-le... CMOS circuits (sw... RTLIB logic RTLIB registers Prima processor D*CORE MicroJava Pic16 cosimulation Mips R3000 cosimu... Intel MCS4 (i4004) image processing ... color channels JPEG compres... Sobel filter Gauss filter resize rotate chessboard gamma correc... saturation chroma-keying chroma-keying purple fringing red-eye [Sch04] Codeumsetzer [Sch04] Addierer [Sch04] Flipflops [Sch04] Schaltwerke [Sch04] RALU, Min... [Fer05] State-Mac... [Fer05] PIC16F84/... [Fer05] Miscellan... [Fer05] Femtojava FreeTTS | Chroma-keying (mult-add)
Circuit Description
A second demonstration of chroma-keying,
this time with a smoothed-out transition between the foreground
and background areas.
This makes the decision more tolerant against slight lightning differences
and possible color variations of the bluescreen itself,
but at the cost of a slight blurring of the outline.
The algorithm then proceeds as follows. The input image is compared with an image of the background (bluescreen) color, and a mask image (white/black) is contructed from this. Unlike a simple pixel equality test, class EqualsWithinFilter will accept all pixels up to a certain absolute difference level (currently 100) as equal, and up to twice the level as almost equal. It constructs a mask output image that has white for all pixels determined equal between the input images, and gray for pixels inside the 'almost equals' range. The positive mask has white for all blue pixels, while the inverted negative mask has white for all 'person' pixels. A multiplication of the positive mask and the background mask leaves background pixels for all originally bluescreen pixels, while the corresponding multiplication of the negative mask and the original input image leaves only the 'person' pixels. Again, click on the corresponding image viewer components in the schematics to view those intermediate images. A final add operation is then used to merge the intermediate image into the single combined output image. The following three images show the original input image (girl in front of bluescreen, image provided courtesy of chroma-key), the background image, and the resulting combined output image:
As you can see, the algorithm as implemented here is less sensitive to an absolutely exact lightning of the background. | |||
Print version | Run this demo in the Hades editor (via Java WebStart) | ||||
Usage | FAQ | About | License | Feedback | Tutorial (PDF) | Referenzkarte (PDF, in German) | ||||
Impressum | http://tams.informatik.uni-hamburg.de/applets/hades/webdemos/00-intro/02-imageprocessing/chroma-mult.html |