没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
RGB Color Space
15
RED
GREEN
WHITE
BLACK
BLUE
MAGENTA
CYAN
YELLOW
Chapter 3
Color Spaces
15
RGB Color Space
The red, green, and blue (RGB) color space is
widely used throughout computer graphics.
Red, green, and blue are three primary addi-
tive colors (individual components are added
together to form a desired color) and are rep-
resented by a three-dimensional, Cartesian
coordinate system (Figure 3.1). The indicated
diagonal of the cube, with equal amounts of
each primary component, represents various
gray levels. Table 3.1 contains the RGB values
for 100% amplitude, 100% saturated color bars,
a common video test signal.
A color space is a mathematical representation
of a set of colors. The three most popular color
models are RGB (used in computer graphics);
YIQ, YUV, or YCbCr (used in video systems);
and CMYK (used in color printing). However,
none of these color spaces are directly related
to the intuitive notions of hue, saturation, and
brightness. This resulted in the temporary pur-
suit of other models, such as HSI and HSV, to
simplify programming, processing, and end-
user manipulation.
All of the color spaces can be derived from
the RGB information supplied by devices such
as cameras and scanners.
Figure 3.1. The RGB Color Cube.
Chapter 3: Color Spaces
16
Chapter 3: Color Spaces
The RGB color space is the most prevalent
choice for computer graphics because color
displays use red, green, and blue to create the
desired color. Therefore, the choice of the
RGB color space simplifies the architecture
and design of the system. Also, a system that is
designed using the RGB color space can take
advantage of a large number of existing soft-
ware routines, since this color space has been
around for a number of years.
However, RGB is not very efficient when
dealing with “real-world” images. All three
RGB components need to be of equal band-
width to generate any color within the RGB
color cube. The result of this is a frame buffer
that has the same pixel depth and display reso-
lution for each RGB component. Also, process-
ing an image in the RGB color space is usually
not the most efficient method. For example, to
modify the intensity or color of a given pixel,
the three RGB values must be read from the
frame buffer, the intensity or color calculated,
the desired modifications performed, and the
new RGB values calculated and written back to
the frame buffer. If the system had access to an
image stored directly in the intensity and color
format, some processing steps would be faster.
For these and other reasons, many video
standards use luma and two color difference
signals. The most common are the YUV, YIQ,
and YCbCr color spaces. Although all are
related, there are some differences.
YUV Color Space
The YUV color space is used by the PAL
(Phase Alternation Line), NTSC (National
Television System Committee), and SECAM
(Sequentiel Couleur Avec Mémoire or Sequen-
tial Color with Memory) composite color video
standards. The black-and-white system used
only luma (Y) information; color information
(U and V) was added in such a way that a
black-and-white receiver would still display a
normal black-and-white picture. Color receiv-
ers decoded the additional color information to
display a color picture.
The basic equations to convert between
gamma-corrected RGB (notated as R´G´B´ and
discussed later in this chapter) and YUV are:
Y = 0.299R´ + 0.587G´ + 0.114B´
U= – 0.147R´ – 0.289G´ + 0.436B´
= 0.492 (B´ – Y)
V = 0.615R´ – 0.515G´ – 0.100B´
= 0.877(R´ – Y)
Table 3.1. 100% RGB Color Bars.
Nominal
Range
White
Yellow
Cyan
Green
Magenta
Red
Blue
Black
R 0 to 255 255 255 0 0 255 255 0 0
G 0 to 255 255 255 255 255 0 0 0 0
B 0 to 255 255 0 255 0 255 0 255 0
YIQ Color Space
17
R´ = Y + 1.140V
G´ = Y – 0.395U – 0.581V
B´ = Y + 2.032U
For digital R´G´B´ values with a range of 0–
255, Y has a range of 0–255, U a range of 0 to
±
112, and V a range of 0 to
±
157. These equa-
tions are usually scaled to simplify the imple-
mentation in an actual NTSC or PAL digital
encoder or decoder.
Note that for digital data, 8-bit YUV and
R´G´B´ data should be saturated at the 0 and
255 levels to avoid underflow and overflow
wrap-around problems.
If the full range of (B´ – Y) and (R´ – Y) had
been used, the composite NTSC and PAL lev-
els would have exceeded what the (then cur-
rent) black-and-white television transmitters
and receivers were capable of supporting.
Experimentation determined that modulated
subcarrier excursions of 20% of the luma (Y)
signal excursion could be permitted above
white and below black. The scaling factors
were then selected so that the maximum level
of 75% amplitude, 100% saturation yellow and
cyan color bars would be at the white level
(100 IRE).
YIQ Color Space
The YIQ color space, further discussed in
Chapter 8, is derived from the YUV color space
and is optionally used by the NTSC composite
color video standard. (The “I” stands for “in-
phase” and the “Q” for “quadrature,” which is
the modulation method used to transmit the
color information.) The basic equations to con-
vert between R´G´B´ and YIQ are:
Y = 0.299R´ + 0.587G´ + 0.114B´
I = 0.596R´ – 0.275G´ – 0.321B´
= Vcos 33
°
– Usin 33
°
= 0.736(R´ – Y) – 0.268(B´ – Y)
Q= 0.212R´ – 0.523G´ + 0.311B´
= Vsin 33
°
+ Ucos 33
°
= 0.478(R´ – Y) + 0.413(B´ – Y)
or, using matrix notation:
R´ = Y + 0.956I + 0.621Q
G´ = Y – 0.272I – 0.647Q
B´ = Y – 1.107I + 1.704Q
For digital R´G´B´ values with a range of 0–
255, Y has a range of 0–255, I has a range of 0
to
±
152, and Q has a range of 0 to
±
134. I and Q
are obtained by rotating the U and V axes 33
°
.
These equations are usually scaled to simplify
the implementation in an actual NTSC digital
encoder or decoder.
Note that for digital data, 8-bit YIQ and
R´G´B´ data should be saturated at the 0 and
255 levels to avoid underflow and overflow
wrap-around problems.
YCbCr Color Space
The YCbCr color space was developed as part
of ITU-R BT.601 during the development of a
world-wide digital component video standard
(discussed in Chapter 4). YCbCr is a scaled
and offset version of the YUV color space. Y is
I
Q
01
10
33
()
cos 33
()
sin
33
()
sin–33
()
cos
U
V
=
剩余19页未读,继续阅读
资源评论
夏菠
- 粉丝: 354
- 资源: 23
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- Matlab版本2023b的Embedded Coder Support Package for ARM Cortex-M Processors支持包免费分享,1.8G压缩包分成3个(2/3)
- ghostscript-10.0.0
- 医疗保障信息平台定点医药机构接口规范
- Python编程基础入门到高级开发技巧指南
- 手机充电头外观尺寸检测机工程图机械结构设计图纸和其它技术资料和技术方案非常好100%好用.zip
- JSP EIMS系统-OA子系统的设计与开发(源代码+LW).zip
- (JSP)JTBC_CMS_2.0.0.8.zip
- linux java jdk8
- Windows系统上Tomcat的安装与配置详解
- Linux-Shell基础命令语言
- 服装图像数据集,衣服图像数据,包含服装属性
- Matlab版本2023b的Embedded Coder Support Package for ARM Cortex-M Processors支持包免费分享,1.8G压缩包分成3个(3/3)
- glove11111wwee.pdf
- ECharts象形柱图-圣诞愿望清单和山峰高度-4.zip
- ECharts象形柱图-人体含水量-2.zip
- ECharts象形柱图-驯鹿的速度-6.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功