Multimedia Software Systems CS4551
Digital Image Data Representations 24bit to 8bit Color Quantization
• Consistsofpixels(pictureelements).
• 2D array of pixel values.
Copyright By PowCoder代写 加微信 powcoder
• Pixel depth of pixel
– 1bit(bi-levelimageormonochromeimage) – 8bits(grayimage,indexedcolorimage)
– 24bits(truecolorimage)
• Image resolution
– Numberofpixelsinimage.Highresolutionyieldsbettervisualquality. – Computed by pixels in width × pixels in height (e.g. 640×480).
CSULA CS451 Multimedia Software Systems by Eun-Young Kang 2
Images – Color Depth
1 bit (2 colors) 8 bits (256 colors)
4 bits (16 colors)
8 bits (256 colors) 24 bits (224 colors, true color) Images from Wikipedia
Binary, Decimal, and Hexadecimal
Hexadecimal
CSULA CS451 Multimedia Software Systems by Eun-Young Kang 4
Images – 1-bit Images
• 1-Bit Images
– Each pixel is stored as a single bit.
– File size of 640×480 bi-level image: 37.5KB (1KB = 1024bytes)
– Good for only simple graphics and text images (e.g. Facsimile images)
CSULA CS451 Multimedia Software Systems by Eun-Young Kang 5
Images – 8-bit Gray-scale Images • 8-Bit Gray Images
– Each pixel is stored as a byte (8 bits) and has a gray-value between 0 and 255. The smaller value is darker. Pure black is 0 and pure white is 255.
– File size of a 640×480 8-bit image: 300KB (1KB = 1024bytes)
– Dithering : gray-scale to binary (skip for now and will come
CSULA CS451 Multimedia Software Systems by Eun-Young Kang 6
Gray Scale Tones
CSULA CS451 Multimedia Software Systems by Eun-Young Kang 7
Images – 24-bit Color Images
• 24-bit Color Images
– Each pixel is represented by 3 bytes (24 bits) usually representing RGB.
– A value of each pixel ranges 0 to 224-1.
– RGB Color Chart
(https://www.rapidtables.com/web/color/RGB_Color.html)
– File size of a 640×480 24-bit image: 900KB (1KB =
1024bytes)
CSULA CS451 Multimedia Software Systems by Eun-Young Kang 8
Images – 32-bit Color Images
• 32-bit Color Images
– Each pixel is represented by 4 bytes (32 bits)
– Usually the first 3 bytes representing RGB. The last 1 byte is for alpha values.
– File size of a 640×480 32-bit image: 1200KB = 640×480×4bytes
CSULA CS451 Multimedia Software Systems by Eun-Young Kang 9
Alpha Channel
• An additional channel that suggests a measure of the transparency for that pixel value.
• It is used in image compositing applications, such as blue screen matting.
CSULA CS451 Multimedia Software Systems by Eun-Young Kang
1 for opaque
0 for transparent
LUT (Look Up Table) and Pixel Color
LUT is also known as palette or color map.
CSULA CS451 Multimedia Software Systems by Eun-Young Kang
Look Up Table
Images – 24-bit Color Image and LUT
Pixel Value in decimal (R,G,B) = (0, 128, 0)
CSULA CS451 Multimedia Software Systems by Eun-Young Kang
Look Up Table
Images – 24-bit Color Image and LUT
True Color
Final Resulting Color
Pixel Value
CSULA CS451 Multimedia Software Systems by Eun-Young Kang 13
Images – 8-bit Color Images • 8-bit Color Images (a.k.a. Indexed Image)
– Many systems use only 8-bits (256 colors) per pixel when space is a concern.
– File size of a 640×480 8-bit image: 300KB
– Each pixel is represented by 1 byte (8 bits) representing an
index to a 3-byte-value in the color Look-Up Table (LUT).
– If a pixel stores the value 25, the meaning is to go to row 25 in the LUT and use the 3-byte-value representing RGB for actual display color.
CSULA CS451 Multimedia Software Systems by Eun-Young Kang 14
Images – 8-bit Color Image and LUT
Pixel Value is a value in [0, 255].
CSULA CS451 Multimedia Software Systems by Eun-Young Kang
Look Up Table
Images – 8-bit Color Image and LUT
Pseudo Color
Final Resulting Color
Color Index Value
Pixel Value
CSULA CS451 Multimedia Software Systems by Eun-Young Kang 16
Images – 8-bit Color Images
Display of a 8-bit color image
CSULA CS451 Multimedia Software Systems by Eun-Young Kang 17
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com