Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Full Transcript

Lecture 2: Fundamentals of Digital Imaging Copyright © 2016 Pearson Education, Inc. All Rights Reserved Learning Objectives 2.1 What does digitizing images mean and the process of digitization? 2.2 How are pixels, image resolution, and bit depth affect image fidelity and details...

Lecture 2: Fundamentals of Digital Imaging Copyright © 2016 Pearson Education, Inc. All Rights Reserved Learning Objectives 2.1 What does digitizing images mean and the process of digitization? 2.2 How are pixels, image resolution, and bit depth affect image fidelity and details? 2.3 What are bitmap images and vector graphics? 2.4 What do aliasing and anti-aliasing mean? 2.5 How does pixel dimensions and bit-depth affect image file size? 2.6 What are the various color models and how do they represent colors? Copyright © 2016 Pearson Education, Inc. All Rights Reserved Pegboard Analogy (Digitize musical note) What to copy music note Pegboard with more holes Each peg hole on the pegboard is a sample point. The sample points are discrete. In digital imaging, each of these discrete sample points is called a picture element, or pixel for short. Copyright © 2016 Pearson Education, Inc. All Rights Reserved Sampling step of digitizing a natural scene Sample grid of 25 X 20 Sample grid of 100 X 80 When we change the grid from 25x20 to 100x80 it means we have increased the sampling rate. Copyright © 2016 Pearson Education, Inc. All Rights Reserved Resolution In digital imaging, increasing the sampling rate is equivalent to increasing the image resolution. With higher resolution, You have more sample points (pixels) to represent the same scene, i.e., the pixel dimensions of the captured image are increased. The file size of the digitized image is larger. You gain more detail from the original scene. Copyright © 2016 Pearson Education, Inc. All Rights Reserved Quantization Step (1 of 2) To encode an infinite number of colors and shades with a finite list. Quantizing the sampled image involves mapping the color of each pixel to a discrete and precise value. First, you need to consider how many possible colors you want to use in the image. Example 100x80 sampled image Copyright © 2016 Pearson Education, Inc. All Rights Reserved Consequences of Quantization (1 of 2) When we reduce the colors, different colors from the original may be mapped to the same color on the palette. This causes the loss of the image fidelity and details. The details that rely on the subtle color differences are lost during quantization. The same area in the 4-color The area outlined in red is made up image now has only one color. of many different green colors. Copyright © 2016 Pearson Education, Inc. All Rights Reserved Bit Depth The number of colors used for quantization is related to the color depth or bit depth of the digital image. A bit depth of n allows 2 n different colours. Examples : − A 2 - bit digital image allows 2 2 (i.e.,4)colours in the image. − A 8 - bit digital image allows 2 8 (i.e.,256)colours in the image. The most common bit depth is 24. A 24-bit image allows 2 24 (i.e.,16,777,216) colours Copyright © 2016 Pearson Education, Inc. All Rights Reserved Will Increasing The Number of Colors In The Palette Improve The Image Fidelity? The number of colors or the bit depth is not the only determining factor for image fidelity in quantizing an image. The choice of colors for the quantization also plays an important role in the reproduction of an image. Higher bit depth means more bits to represent a color and a larger file size. Copyright © 2016 Pearson Education, Inc. All Rights Reserved Bitmapped images Characteristics The image is divided in a grid (think of it as a pegboard) Each cell (think of it as a peghole) in the grid stores only one color value (think of it as a peg) Each cell is called a pixel- picture element Bitmap images are resolution dependent; each image has a fixed resolution The level of details the image can represent depends on the number these cells, or pixels. A pegboard with more holes lets you create a picture with finer details. Examples; JPEG, PNG, GIFF, Web and Photoshop images Copyright © 2016 Pearson Education, Inc. All Rights Reserved Bitmapped Images (2 of 2) If I specify “1” to represent yellow and “0” to represent purple, the data to describe this image is: 11111111111111111111110111111011111101111110111111011111 11111111 The size of the data (the file size) in this example-an 8x8-pixel image is not too bad, but what about we have a 3000x2000-pixel-an image from a 6-megapixel digital camera? Copyright © 2016 Pearson Education, Inc. All Rights Reserved Bitmap versus Pixmap Bitmap: In certain contexts, it refers to images with 1 bit per pixel, i.e., each pixel has a value either 0 or 1. Pixmap: If each pixel has a color value that uses more than 1 bit. Here we are using the term bitmap or bitmapped images to refer to all pixel-based images. Copyright © 2016 Pearson Education, Inc. All Rights Reserved Vector Graphics Characteristics Generated mathematically, i.e. instructions not pixel- based Resolution independent A simple postscript example: %! newpath 200 200 moveto 300 200 lineto stroke showpage Examples; Adobe Flash, Adobe illustrator Copyright © 2016 Pearson Education, Inc. All Rights Reserved Bitmap Images versus Vector Graphics (2 of 4) An analogy: Driving Directions: A visual Triptik map versus a written instruction Which one takes up more storage space? Triptik map → bitmap Which one takes you more time to translate the direction into a mental image? written instruction → vector graphics (take more computation to display on computer because it is mathematically generated) Copyright © 2016 Pearson Education, Inc. All Rights Reserved Bitmap Images versus Vector Graphics (4 of 4) 1111111111111111111111011111101111110111111011 111101111111111111 %! newpath 2 1 moveto 6 5 lineto stroke showpage Copyright © 2016 Pearson Education, Inc. All Rights Reserved Rastering Vector Graphics Raster means convert vector graphics into pixel-based images. Most vector graphics programs let you rasterize vector graphics. Need to specify a resolution for rasterizing, that is, how coarse or how fine the sampling. Copyright © 2016 Pearson Education, Inc. All Rights Reserved Aliasing The rasterized image will appear jagged. Original vector graphics Rastered vector graphics without anti-aliasing This jagged effect is a form of aliasing caused by under-sampling (which means insufficient sampling rate.) Recall the musical note on a pegboard example. Copyright © 2016 Pearson Education, Inc. All Rights Reserved Anti-aliasing Techniques To soften the jaggedness by coloring the pixels with intermediary shades in the areas where the sharp color changes occur. Original vector graphics Rastered vector graphics without anti-aliasing Rastered vector graphics with anti-aliasing Copyright © 2016 Pearson Education, Inc. All Rights Reserved How Many Bits? Suppose 6-megapixel digital camera may produce digital images of 3000 × 2000 pixels images of 1500 × 1000 pixels images of 3000 × 2000 pixels in 24−bit color depth. in 24−bit color depth. in 24−bit color depth. Total pixels: Total pixels: Total pixels: 3000 × 2000 pixels 1500 × 1000 pixels 3000 × 2000 pixels = 6,000,000 pixels = 1,500,000 pixels = 6,000,000 pixels File size in bits: File size in bits: File size in bits: 6,000,000 pixels × 24 1,500,000 pixels × 24 6,000,000 pixels × 8 bits/pixel = 144,000,000 bits bits/pixel = 36,000,000 bits bits/pixel = 48,000,000 bits File size in bytes: File size in bytes: File size in bytes: 144,000,000 bits /(8 36,000,000 bits /(8 48,000,000 bits /(8 bits/byte) = 18,000,000 bytes bits/byte) = 4,500,000 bits/byte) = 6,000,000 ≅ 17MB bytes ≅ 4.3MB bytes ≅ 5.7MB It’s 1/4th of the file size It’s 1/3th of the file size Copyright © 2016 Pearson Education, Inc. All Rights Reserved Strategies To Reduce File Sizes Reducing the pixel dimensions – Capture the image at a lower resolution in the first place Lowering the bit depth (color depth) – Resample (resize) the existing image to a lower pixel dimensions Compress the file Copyright © 2016 Pearson Education, Inc. All Rights Reserved Weighing Bit Depth Against File Size 24-bit → 8-bit: – You lose about 16 million colors! – May cause image quality degradation. But 8-bit will work well if your image does not need more than 256 colors. Grayscale images: e.g. – scanned images of black-and-white photos – hand-written notes (may be even lowered to 4-bit, 2-bit, or 1-bit) Illustration graphics: e.g. poster or logo – contains only a few colors as large areas of solid colors Copyright © 2016 Pearson Education, Inc. All Rights Reserved File Compression Methods (1 of 2) File compression: To reduce the size of a file by squeezing the same information into fewer bits. Lossless compression method: – e.g., TIFF, PNG, PSD – No information is lost – GIF files also use lossless compression, but it limits the number of colors to 256 Lossy compression method: – e.g., JPEG – Some information is lost in the process. Copyright © 2016 Pearson Education, Inc. All Rights Reserved Working with Lossy Compression (2 of 4) An original TIFF image JPEG version JPEG close-up view Copyright © 2016 Pearson Education, Inc. All Rights Reserved File Types During Editing or Capturing PSD (Photoshop Digital Image) PNG (Portable Network Graphics) TIFF (Tag Image File Format) camera RAW Copyright © 2016 Pearson Education, Inc. All Rights Reserved Color Models Used to describe colors numerically, usually in terms of varying amounts of primary colors. Common color models: –RGB –CMYK –HSB –CIE and their variants. Copyright © 2016 Pearson Education, Inc. All Rights Reserved RGB Color Model Primary colors: –red –green –blue Additive Color System Full intensities of red + green + blue = white Full intensities of red + green = yellow Full intensities of green + blue = cyan Full intensities of red + blue = magenta Zero intensities of red, green, and blue = black Same intensities of red, green, and blue = some kind of gray Copyright © 2016 Pearson Education, Inc. All Rights Reserved RGB Color Model (1 of 11) Depicted graphically as a cube defined by three axes in 3-D space The maximum value on each axis is normalized to 1. Copyright © 2016 Pearson Education, Inc. All Rights Reserved CMYK Color Model Primary colors: –cyan –magenta –yellow –black Subtractive Color System Full intensities of cyan + magenta + yellow = black Full intensities of cyan + magenta = blue Full intensities of cyan + yellow = green Full intensities of magenta + yellow = red Zero intensities of cyan, magenta, and yellow = white Copyright © 2016 Pearson Education, Inc. All Rights Reserved HSB Color Model (1 of 5) Hue: –basic color –0o to 360o : the location on a color wheel –in the order of colors in a rainbow Saturation: –purity of the color –how far away from the neutral gray of the same brightness Brightness Copyright © 2016 Pearson Education, Inc. All Rights Reserved HSB Color Model (2 of 5) Matches well with the way humans intuitively think about colors Do not encompass all the colors human can see Copyright © 2016 Pearson Education, Inc. All Rights Reserved CIE XYZ Color Model Primaries: –X –Y –Z Primaries are not physical colors Its color space encompasses all the colors human can see. Normally not used in digital image editing because monitors and printers cannot reproduce all the colors in the CIE XYZ color space anyway. Copyright © 2016 Pearson Education, Inc. All Rights Reserved Color Gamuts (1 of 3) Refers to the range of colors of a specific system or device can produce or capture Colors that human can see RGB color gamut of typical CRT monitors CMYK color gamut of typical inkjet printers Copyright © 2016 Pearson Education, Inc. All Rights Reserved Difficulties in Reproducing Colors in Digital Images Digital devices cannot produce all of the colors visible to human Difficulties exist in reproducing color across devices –different devices have different color gamuts –additive color system for screen display vs. subtractive color system for printing Copyright © 2016 Pearson Education, Inc. All Rights Reserved

Use Quizgecko on...
Browser
Browser