Sampling, Quantization, Color Models & Indexed Color CS450 Lecture 2 Sampling, Quantization, Color Models & Indexed Color
Digital Image Sources Digital Cameras Scanned Film & Photographs Digitized TV Signals Computer Graphics Radar & Sonar Medical Imaging Devices (X-Ray, CT) The Internet
Digitizing Images Images are digitized using a two step process: sampling the continuous tone image quantizing pixels
Sampling
Quantization pixel’s samples are averaged
Quantization Example
Image Resolution 68 x 104 136 x 208 272 x 416 less detail more detail less storage more storage
Digital Cameras Low-Res 640x480 (TV grade) Medium Low-Res 1536x1024 Medium-Res 2048x1536 Medium Hi-Res 2560x1920 Hi-Res 3000x2000 up to 10 Megapixel
Dynamic Range The number of quantized pixel values: 256 levels
Images - 2D array of values Binary Images (pixel values = 0,1) Grayscale Images (pixel values = 0-255) Color Images Each pixel has three color components For example, (red, green, blue) or RGB Each color component is 0-255
Color Images 3 Images Overlayed Blue Green Red
Histograms: What’s in the image? What is a histogram? Simple numeric example Histogram 1 3 21 31 21 4 2 1 2 1 2 3 4
Color Image Histograms Histogram for each color
RGB Additive Color Model RED GREEN BLUE bright values => high amounts of that color dark values => low amounts of that color
CMYK Subtractive Color Model CYAN MAGENTA Bright => use less of that ink color Dark => use lots of YELLOW BLACK
HSB Visual Color Model HSB: how artists perceive color properties
HSB Visual Color Model HSB: how artists perceive color properties 360 o Hue Select Hue
HSB Visual Color Model HSB: how artists perceive color properties 360 Saturation o Hue Select Hue - then click in box for saturation, brightness
HSB Visual Color Model HSB: how artists perceive color properties 360 Saturation Brightness o Hue Select Hue - then click in box for saturation, brightness
Digital Image Formats GIF (Graphic Interchange Format) indexed color (up to 256 colors) compressed used in Web applications JPEG (Joint Photographic Experts Group) lossy compression with variable controls also used in Web applications
Digital Image Formats PNG (Portable Network Graphics) BMP designed for online viewing (e.g., Web) patent-free replacement for GIF lossless compression BMP MS Windows image format
Indexed Color “Indexed Color” can be used to reduce the size of a color image file 255 = 27 bytes = 18 bytes 1 2 0 1 2
Indexed Color Images are derived from full color images are smaller or more compact in storage are composed of pixels selected from a limited palette of colors or shades