Professional Documents
Culture Documents
ST Nandasara/ADMTC
Contents
Color
Theory 2D Bitmap Image Theory 2D Bitmap Image Processing 2D Vector Image Theory
Color Theory
How to manipulate color digitally?
What is color?
Perceptive colors for human eyes = around 400nm ~ 700nm (wavelength) But human eyes cannot distinguish every color
A color =
400
500
600
700
Visible spectrum
Progressive Rainbow
"visible" light can be broken down into a spectrum that ranges from blue to red in a progressive rainbow
Progressive Rainbow
Beam of sunlight
Red
Orange
Yellow
Green
Blue
Indigo
Violet
Visible spectrum
Progressive Rainbow
nm is the most common unit to describe the wavelength of light, with visible light falling in the region of 400700 nm. The data in compact discs is stored as indentations (known as pits) that are approximately 100 nm deep by 500 nm wide. Reading an optical disk requires a laser with a wavelength 4 times the pit depth -- a CD requires a 780 nm wavelength (near infrared) laser, while the shallower pits of a DVD requires a shorter 650 nm wavelength (red) laser, and the even shallower pits of a Blu-ray Disc require a shorter 405 nm wavelength (blue) laser.
Progressive Rainbow
The ability of the human eye to distinguish colors is based upon the varying sensitivity of different cells in the retina to light of different wavelengths. The retina contains three types of color receptor cells, or cones. One type, relatively distinct from the other two, is most responsive to light that we perceive as violet, with wavelengths around 420 nm. (Cones of this type are sometimes called short-wavelength cones, S cones, blue cones.) The other two types are closely related genetically and chemically. One of them (sometimes called long-wavelength cones, L cones, red cones) is most sensitive to light we perceive as yellowish-green, with wavelengths around 564 nm; the other type (sometimes called middle-wavelength cones, M cones, green cones) is most sensitive to light perceived as green, with wavelengths around 534 nm.
Visible spectrum
This image contains 1 million pixels, each of a different color. The human eye can distinguish about 10 million different colors.
Color Model
Math model for color information RGB
10
Red, Green, Blue Cyan, Magenta, Yellow, blacK (or Key) Hue , Saturation , Lightness (Brightness/Value) Luminance + 2 Chrominance (Color differences)
CMY / CMYK
Wheel of Color
11
A color wheel usually include 12 distinct colors. The color wheel is essentially the linear progression of color as seen in the color spectrum, connecting the two ends together.
12
Most of us now use color display, for which the primary colors will be Red, Green and Blue.
13
Y W Green C
Blue
Most of us now use color display, for which the primary colors will be Red, Green and Blue.
14
Red
Blue
Green
White
Black
G R
15
Secondary color wheel: the three colors that are obtained by combining any two adjacent primary colors. These will be the secondary colors: cyan, magenta, and yellow.
16
Secondary color wheel: the three colors that are obtained by combining any two adjacent primary colors. These will be the secondary colors: cyan, magenta, and yellow.
17
Cyan
Yellow
C
White
Black
Why K (Black) ?
Wheel of Color
18
Tertiary colors are the same for both the additive and subtractive worlds.
Wheel of Color
19
Analogous Colors
Analogous colors directly beside a given color. If you start with Orange and you want its two analogous colors, select Red and Yellow.
Wheel of Color
20
Complementary colors are directly opposite each other on the color wheel. Selecting contrasting colors is useful when you want to make the colors stand out more vibrantly.
Wheel of Color
21
Split complementary colors can be made up of two or three colors. You select a color, find its complementary color or colors on the either side of the color wheel.
Wheel of Color
22
Warm Colors
Warm colors are made up of the Red hues, such as Red, Orange and Yellow. They lend a sense of warmth, comfort, and energy to the color selection. They also produce visual result.
Wheel of Color
23
Cool Colors
Cool colors come from the Blue hues, such as Blue, Cyan, and Green. These colors will stabilize and cool the color scheme. These are good to use for page background.
24
25
White
Color Matching
26
Color Gamut
Eye
CRT
Scanner
Printer
Offset
Color Matching
Adjustment / Compensation of the difference of color gamut among multiple image devices
Color Depth
27
Color Depth
How
28
Gray Scale
= 8 bit (256 shadows)
29
Color (Palette)
00 01 02 03 04 FE FF
03 F1 C3 4A 01 83 9B FC 45 1D 3E 47 20 1D 80 56 5B 40 FA E4 5A 33 0F D0 7A 00 12 E2 C4 79 ED 1C 03 F1 C3 4A 01 83 9B 2C 45 1D 3E 47 20 1D 80 53 79 40 FA E4 5A 33 0F D8 5A 00 12 E2 C4 79 ED 32
Image Data
Palette
Picture
256-color image
Color Depth
How
30
Full Color
= 8 bits for each R, G and B = 24 bits (16.7 million colors)
Red
Green
Blue
Color Depth
31
Gray Scale
= 8 bit (256 shadows)
Indexed Color
= 8 bit (217~256 color pallet)
Full Color
= 8 bit each for RGB = 24 bit (16.7 million colors)
Color Depth
32
Graphic/Image Data Structure Pixels: picture elements in digital images Image resolution: number of pixels in a digital image Bit-map: a representation of the graphic/image data in the same manner as they are stored in video memory
Color Depth
33
Gray Scale
= 8 bit (256 shadows)
Gray-scale image Each pixel is usually stored as a byte (0 to 255 levels) A 640 X 480 gray-scale image requires over 300 Kbytes
Color Depth
34
Full Color
= 8 bit each for RGB = 24 bit (16.7 million colors)
Three byte for each pixel Support 256X256X256 colors A 640 X 480 24-bit color image requires 921.6 KBytes
Video Systems
35
Transmitter
Goals:
Receiver
Camera Operation
S-Video
36
Zoom Lens
Color Filters
R
Camera Tubes
YC
Beam Splitter
R G B
Note: 1. Camera has 1, 2, or 3 tubes for sampling 2. More tubes (CCDs) and better lens produce better pictures
RGB Composite
Component
Encoder
Y R-Y B-Y
Color Perception
37
Retina (on the back wall of the eye) composed of approximately 125 million rods and 7 million cones
Cones respond to different frequencies (three types, RGB) Rods measure brightness at low light levels (i.e., night vision)
38
Spectral-response functions of each of the three types of cones on the human retina G > R >> B Humans more sensitive to brightness than color The processing and perception of the image takes place in the brain. Need to understand that there are also physiological and psychological aspects to the perception of color. Colors are often associated with various emotions, such as "feeling blue."
39
YIQ color model: used in NTSC color TV Y is luminance containing brightness and the detail (monochrome TV) To create the Y signal, the red, green and blue inputs to the Y signal must be balanced to compensate for the color perception misbalance of the eye.
Y = 0.3R + 0.59G + 0.11B I = 0.6R 0.28G - 0.32B (cyan-orange axis) Q = 0.21R 0.52G + 0.31B (purple-green axis)
Chrominance
In a channel (6 MHz) of NTSC TV, 4 MHz is allocated to Y, 1.5 MHz to I, and 0.5 MHz to Q.
40
YUV color model: for PAL TV and CCIR 601 standard for digital video Same definition for Y as in YIQ model Chrominance is defined by U and V the color differences
U=BY V=RY
YCbCr color model: used in JPEG and MPEG Closely related to YUV: scaled and shifted YUV
Y U V
41
42
The primaries can either be RGB or a luminance-chrominance transformation of them (e.g., YIQ, YUV). Best color reproduction Requires more bandwidth and good synchronization of the three components
Composite video -- color (chrominance) and luminance signals are mixed into a single carrier wave. Some interference between the two signals is inevitable. S-Video (Separated video, e.g., in S-VHS) -- a compromise between component analog video and the composite video. It uses two lines, one for luminance and another for composite chrominance signal.
Analog Video
43
NTSC Video: 525 scan lines per frame, 30 frames per second (or be exact, 29.97 fps, 33.37 msec/frame) Interlaced, each frame is divided into 2 fields, 262.5 lines/field 20 lines reserved for control information at the beginning of each field
So a maximum of 485 lines of visible data Laserdisc and S-VHS have actual resolution of ~420 lines Ordinary TV -- ~320 lines
Each line takes 63.5 microseconds to scan. Horizontal retrace takes 10 microseconds (with 5 microseconds horizontal synch pulse embedded), so the active line time is 53.5 microseconds.
Scanning Video
44
Scanning Video
45
4:4:4 No subsampling
Y CR CB Y CR CB Y CR CB
Line 1
Line 2
Line 3
Line 4
Scanning Video
46
Line 1
Line 2
Line 3
Line 4
Scanning Video
47
Line 1
Line 2
Line 3
Line 4
Scanning Video
48
Line 2
Line 3
Line 4
49
Y
Y
U
U
V
V
JPEG (1:50)
50
CIF
QCIF
1920 x 1080
960 x 540 4:2:2 60 16:9 Yes
352 x 288
176 x 144 4:2:0 30 4:3 No
176 x 144
88 x 72 4:2:0 30 4:3 No
CCIR Consultative Committee for International Radio CIF Common Intermediate Format (approximately VHS quality)
Sampling
51
1 Frame is stored 720x480 pixels for NTSC 1 Frame is stored 720x576 pixels for PAL Each Pixel is processed for Y (Luminance (B&W) 4:2:2 Samples 2 of every 4 pixels for color 4:1:1 Samples 1 of every 4 pixels for color 4:2:2 has twice the color detail for 4:1:1 (shaper color edges) 4:4:4 is not necessary as humans are more sensitive to change in luminance than color
Sampling
The first number refers to the 13.5 MHz sampling rate of the luminance The other two numbers refer to the sampling rates of the color difference signals R-Y and B-Y (or,more properly in the digital domain, Cr and Cb)
52
Sampling
53
4:2:2 systems (D-1, D-5, DigiBeta, BetaSX, Digital-S,DVCPRO50) color sampled at half the rate of luminance, Y is 13.5 MHz R-Y and B-Y is each 6.75 MHz 360 color samples (in each of Cr and Cb) per scanline. 4:1:1 systems (NTSC DV & DVCAM, DVCPRO Color data are sampled half as frequently as in 4:2:2 Y is 13.5 MHz R-Y and B-Y is each 3.375 MHz . 180 color samples per scanline.
Sampling
54
4:2:2 Better for Computer Graphics Special Effects Chroma Keying Compositing Matting
55
1 sec takes 701.3 x 30 = 21,039 kbytes, or 21 Mbytes 1 min takes 21,039 x 60 = 1,262,340 kbytes, or 1.26 gigs
56
BOTTOM LINE
1 Gbyte will hold ~47 seconds 1 hour takes ~76 Gbytes Of Active Picture (Does not include sync Blanking etc as these can be regenerated)
57
1 hour takes ~
Uncompressed 76 Gbytes 2:1 Compression 38 Gbytes 5:1 Compression 15 Gbytes
58
Color (Palette)
00 01 02 03 04 FE FF
03 F1 C3 4A 01 83 9B FC 45 1D 3E 47 20 1D 80 56 5B 40 FA E4 5A 33 0F D0 7A 00 12 E2 C4 79 ED 1C 03 F1 C3 4A 01 83 9B 2C 45 1D 3E 47 20 1D 80 53 79 40 FA E4 5A 33 0F D8 5A 00 12 E2 C4 79 ED 32
Image Data
Palette
Picture
Palette Optimization
256-color image
Optimized Palette & Dithered Banding Effect
Dithering
Better perception
Gamma Correction
59
output input
Alpha Channel
Transparency
60
information of image
Anti-aliasing
61
Aliasing problem
Not a problem of image data itself Problem of PC's pixel-based display screen
Aliased image
Anti-aliasing technology
Bitmap image
63
Pixel based
RGB = (FF,B6,98)
A pixel
Resolution Dependent
64
Loss-less Compression
Can reproduce mathematically identical original image without any data loss Not high compression ratio (~2.0)
Lossy Compression
Compression algorithms
Algorithm RLE
Loss-Less Lossy (Run-Length Encoding)
65
Basic Concept
Pack repetitive data Build treed dictionary Cut non-sensitive color information Transform to series of Cosine functions Transform to series of Wavelet functions
LZW
(Lempel-Zif-Welsh)
Color-space compression
~2.0
DCT
(Discrete Cosine Transformation)
~100
~100
Wavelet compression
66
We should reserve information on this component We can reduce information from these 2 components
67
Y
Y
U
U
V
V
JPEG (1:50)
Transformation Algorithm
68
Used in JPEG, MPEG, MPEG2, etc. Uses series of wavelet functions to encode image
Wavelet Transformation
= a0
+ a1
+ a2
Algorithm Comparison
69
Compress to 3 KB (1:50)
Fractal
DCT
Wavelet
70
Industry standard
Platform Standard
BMP - Windows PICT - Macintosh GIF - CompuServe
International Standard
JPEG - ISO 10918 PNG - MIT/W3C JPEG2000 - ISO 15444
http://www.dcs.ed.ac.uk/home/mxr/gfx/
71
Highly flexible
Ability to handle various kinds of specialized image formats by using internal Tag
over-24bit images (32, 36, up to 64-bits) Alpha-channel (Transparency) can be stored Multiple Layers LZW, JPEG or other compression
For Professional
72
Transparency (1 bit only) Interlace (for fast perception over net) Animation (Cell Animation)
Flexible choice of bit-per-pixel (1~8) Indexed color only (no full color support) LZW compression (*patented)
73
Less sensitive to color than lightness (YUV) Good for photography or artistic image NG for scientific image (uneven information loss) The only international standard (up to now)
Block noise
1:10
1:100
74
Macromedia Fireworks
JPEG2000
75
Less noise in high compression ratio True progressive transfer Option for Loss-less compression Support for video Codec (Motion JPEG2000) Error resistance (good for the Internet) ROI (Region of interest) support No native support in Web browsers
IrfanView32
Slow acceptance
77
How can you enhance your photograph taken by digital cameras / image scanners?
Before doing any creative operation in Photoshop, you should do basic (but important) image adjustment
78
79
Brightness change
Histograms
Contrast change
Black White
Black
White
80
81
Only Brightness
Highlight and shadow are the same. Only middle tone changes
82
83
Original
Gamma Correction
Shadow/Highlight (Photoshop)
Photo Retouching
84
Vector image
86
Filled polygon
Vector Based
Resolution Independent
87
Curve
Open Path
Closed Path
Open Path
Closed Path
Fill
Simple
Gradient
Pattern
88
Z-order
Grouping
Group of 2 objects
Group of 18 polygons
Mathematical Curves
89
B-Spline curve
Simple and fast calculation Easy to modify curve locally Used in TrueType Font, etc.
Control Point
Anchor Point 2
Bzier curve
The most popular 2D curve standard Easy to control the shape Anchor Point 1 Widely used in almost Control all vector based graphics programs
Point 2
90
Industry Standard
EPS - Adobe Artistic drawing AI - Adobe Artistic drawing DXF - Autodesk 2D/3D CAD
Platform Standard
International Standard
CGM (Computer Graphics Metafile) - ANSI/ISO SVG - (W3C recommendation)
91
PostScript based
PostScript = Bzier-curve based page definition language developed by Adobe For printing complex page layout
Highly expressive
For Professional Artist Used in publishing / illustration industry Not used in mechanical drawing DXF
AI (Adobe Illustrator)
92
Inconsistency in versions
Each new version of Adobe Illustrator has newer version of file format Incompatible
93