Digital Signal Processing Reference
In-Depth Information
α
α
α
f g
b g
f r
b r
f b
b b
×
×
×
+/-
+/-
+/-
+/-
+/-
+/-
Figure 7.2. The hardware to
implement the alpha blending
equations.
Composite Pixel (RED)
Composite Pixel (GREEN)
Composite Pixel (BLUE)
background behind that person. As the person moves, the
background adjusts perfectly. This effect uses alpha blending
principles.
First the subject sits or stands in front of a background that is
a different color (such as bright green) to the subject's shirt, suit
or face.
The background on which we wish to superimpose the subject
is shot separately. Then all we have to do is alpha blend
with
a slight change. Each pixel is compared to the green value. If the
pixel is green, then by adjusting the alpha value the desired
background pixel wins and replaces the green pixel. If the pixel is
not green then we can safely assume that it is some portion of the
subject's anatomy, and it is left alone. The background pixel loses
and the subject's pixel wins.
By virtue of this approach the composite frame is adjusted so
that the background changes around the subject smoothly, even
in motion.
This is but one example of the very useful type of video pro-
cessing that can be done using alpha blending.
e
7.5 Conclusion
Readers beginning with video processing must understand that
the alpha blending function has uses that ranges from simple
graphics overlay to creating special effects with multiple video
streams. But in spite of how different these effects may look - the
fact remains that what is required to be done is to generate
a composite pixel - which is a function of two different pixels. In
effect the underlying function - alpha blending - is the same.
Alpha blending, though mathematically a simple concept
requires fast hardware since the processing has to be done at pixel
rates. As we have seen earlier these pixel rates are very high
especially for HD video. The applications of alpha-blending are
many and with the advent of low-cost FPGAs that can handle HD
pixel rates, this computationally intensive function can be
provided in a cost-effective manner.
Search WWH ::




Custom Search