410 likes | 432 Views
This instructor-led course explores the mathematical representation and conversion of colors in digital imaging. Learn about popular color models like RGB, CMYK, HSB, YUV, and YCbCr.
E N D
Digital Color Imaging Instructor:L. J. Wang, Dept. of Information Technology, National Pingtung Institue of CommerceReference: John F. McGowan, http://www.jmcgowan.com/ L. J. Wang
Color Spaces • Mathematical representation for a set of colors • Three most popular color models: • RGB (used in computer graphics) • YCbCr (used in video systems) • CMYK (used in color printing) L. J. Wang
RGB Color Space • RGB: red, green, blue. • RGB color space is widely used throughout computer graphics. • R, G, B are three primary additional colors (individual components are added together to form a desired color). L. J. Wang
RGB Color Cube L. J. Wang
100% RGB Color Bars L. J. Wang
RGB - Additional Colors L. J. Wang
CMYK Color Space • CMYK: Cyan, Magenta, Yellow, blacK. • CMYK color space is widely used in color printing. • C, M, Y are three primary subtractive colors (individual components are subtracted [absorbed] together to form a desired color). L. J. Wang
CMYK - Subtractive Colors L. J. Wang
HSB Color Space • HSB: Hue, Saturation, Brightness. L. J. Wang
Chromaticity Diagram L. J. Wang
YUV Color Space • YUV color space is used by PAL, and NTSC composite color video standards. • Black-and-white system used only luminance (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 receivers decoded the additional color information to display a color picture. L. J. Wang
YUV Color Space (II) • Basic equations to convert between gamma-corrected RGB (R’G’B’) and YUV are: L. J. Wang
YIQ Color Space • YIQ color space is derived from YUV color space and is optionally used by NTSC composite color video standard. • I stands for in-phase. • Q stands for quadrature, which is the modulation method used to transmit the color information. L. J. Wang
YIQ Color Space (II) • Basic equations to convert between R’G’B’ and YIQ are: L. J. Wang
YCbCr Color Space • YCbCr color space was developed as part of ITU-R BT.601 during the development of a world-wide digital component video standard. • YCbCr is a scaled and offset version of the YUV color space. • Several YCbCr sampling formats, such as 4:4:4, 4:2:2, 4:1:1, and 4:2:0. L. J. Wang
YCbCr Color Space (II) • Basic equations to convert between R’G’B’ and YCbCr in SDTV are: L. J. Wang
YCbCr Color Space (III) • Computer systems considerations for between R’G’B’ and YCbCr in SDTV are: L. J. Wang
YCbCr Color Space (IV) • Basic equations to convert between R’G’B’ and YCbCr in HDTV are: L. J. Wang
YCbCr Color Space (V) • Computer systems considerations for between R’G’B’ and YCbCr in HDTV are: L. J. Wang
YCbCr - 4:4:4 Sampling L. J. Wang
YCbCr - 4:2:2 Sampling L. J. Wang
YCbCr -4:2:2 Frame Buffer Formatting L. J. Wang
YCbCr - 4:1:1 Sampling L. J. Wang
YCbCr - 4:1:1 Frame Buffer Formatting L. J. Wang
YCbCr - 4:2:0 Sampling L. J. Wang
YCbCr - 4:2:0 Sampling (II) L. J. Wang
YCbCr - 4:2:0 Sampling (III) L. J. Wang
YCbCr - 4:2:0 Sampling (IV) L. J. Wang
75% YCbCr Color Bars L. J. Wang
YCbCr Format Applications L. J. Wang
Gamma Correction • RGB values are normalized to have a range of 0 to 1: L. J. Wang
Effect of Gamma L. J. Wang
Pixel • Pixel - picture element • Examples: • 640×480 picture Width (horizontal) × Height (vertical) = 640 × 480 = 307200 pixels • 320×240 picture Width × Height = 320 × 240 = 76800 pixels L. J. Wang
Resolution • Resolution is the measure of the smallest discernable unit. (pixels per unit) • Image resolution – measured In pixels-per-inch (ppi). • Printer resolution – measured In dots-per-inch (dpi). • Display resolution – 螢幕桌面的大小設定. • Camera resolution – measured In ppi. • Scanner resolution – measured In dpi (ppi). L. J. Wang
Four Different Modes • Four different modes: Line Art, Halftone, Grayscale, and Color. L. J. Wang
Line Art Mode • Line Art format requires the least amount of memory for storing the image. • Only black and white information is stored (without any shade of gray). • Image consists of only 1-bit of data. • This format is most useful when scanning text or line drawings. L. J. Wang
Halftone Mode • While computers can manipulate and display images with continuous shades of gray, many printers are still unable to print them. A technique called, halftoning, solves this problem. • Halftone images are displayed as patterns of solid dots, fooling the eyes into seeing continuous shades of gray. • This type of image is most commonly found in newspapers. L. J. Wang
Halftone Mode (II) • Each of the three squares below are made of 64 dots, or pixels. Each dot can be either black or white. • By manipulating the arrangement of these dots, various shades of gray can be achieved. • In the examples below from left to right, the three squares represent 100% white, 25% gray, and 50% gray respectively. L. J. Wang
Grayscale Mode • Grayscale image is equivalent to a black and white photograph. • Computers display a grayscale image by assigning a number value, ranging from 0 to 255, to every pixel of that image. • Number value 0 represents the black; number value 255 represents the white. All numbers from 1 to 254 represent various shades of gray. • Each pixel takes up 8 bits and assigns to any of the 256 (0 ~ 255) values. L. J. Wang
Color Mode • Color images are the largest and most complex images to store. • TV's and computer monitors mix the colors red, green, and blue to display all the colors visible to the human eye. • Monitor's internal electronics can vary the intensity of each color dot to 256 different levels of intensity. • At the 0 intensity level, the dots are completely off and the screen appears black. • If the red and green intensity is 0 and the blue intensity is 255, you see a rich blue color. • By varying the intensity of each color dot between 0 and 255, there are 16.77 million different combinations L. J. Wang
Color Mode (II) • Each combination appears as a different color. • Images under different color modes. • 16 color: Each pixel requires 4 bits of memory. • 256 color: Each pixel requires 8 bits of memory. • True color: Each pixel requires 24 bits of memory (8 bits x 3) to fully represent the entire color spectrum. L. J. Wang