Image Representation
Digital Cameras Scanned Film & Photographs Digitized TV Signals Computer Graphics Radar & Sonar Medical Imaging Devices (X-Ray, CT) The Internet Digital Image Sources
Pixel = “Picture Element” Image [x,y] = pixel value (number) Images - 2D array of values = pixels
Pixel – an element of the 2-D image array Pixel Value = brightness - black = 0 - gray = white = many shades over the range Pixels and Pixel Values
Images are digitized using a two step process: 1. sampling the continuous tone image 2. quantizing pixels Digitizing Images
Sampling
pixel’s samples are averaged Quantization
Quantization Example
Image Resolution 68 x x x 416 less detail more detail less storage more storage
Digital Cameras Low-Res 640x480 (TV grade) Medium-Res 1536x1024 Hi-Res 2048x1536 Very Hi-Res 2560x1920
Dynamic Range 256 levels The number of quantized pixel values: 16 levels4 levels2 levels
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 Images - 2D array of values
3 Images Overlayed Color Images Red Green Blue
What is a histogram? Simple numeric example Histogram Histograms: What’s in the image?
Histogram for each color Color Image Histograms
RGB Additive Color Model RED bright values => high amounts of that color dark values => low amounts of that color GREENBLUE
BLACK CYAN MAGENTA YELLOW CMYK Subtractive Color Model Bright => use less of that ink color Dark => use lots of that ink color
HSB: how artists perceive color properties HSB Visual Color Model
HSB: how artists perceive color properties HSB Visual Color Model Select Hue 0oHue 360 o
HSB: how artists perceive color properties HSB Visual Color Model Saturation Select Hue 0oHue 360 o - then click in box for saturation, brightness
HSB: how artists perceive color properties HSB Visual Color Model Brightness Saturation Select Hue 0oHue 360 o - then click in box for saturation, brightness
Storing Digital Images Digital images are converted to files for storage and transfer The file type is a special format for ordering and storing the bytes that make up the image File types or formats are not necessarily compatible You must often match the file type with the application
Storing Digital Images 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
Storing Digital Images PNG (Portable Network Graphics) –designed for online viewing (e.g., Web) –patent-free replacement for GIF –lossless compression BMP –MS Windows image format
How Many Bytes to Store an Image? Suppose we a have an image that is 500x500 pixels in size That’s a total of 250,000 pixels Binary image (1 bit/pixel) = 31,250 bytes Grayscale image (8 bits/pixel) = 250,000 bytes Color image (24 bits/pixel) = 750,000 bytes
Indexed Color “Indexed Color” can be used to reduce the size of a color image file = 27 bytes = 18 bytes
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