ITEC2110 FALL 2011 TEST 2 REVIEW Chapters 2-3: Images I. Concepts Graphics A. Bitmaps and Vector Representations Logical vs. Physical Pixels - Images are modeled internally as an array of pixel values (the logical pixels) - Physical pixels are the actual dots on screen Sampling Rate = Resolution Quantization Level = Color Depth = Bit Depth = Number of Colors Most common Color Depth = 24-bit (how many colors is that?) More colors does not necessarily mean better quality. Choice of colors is also important. Anchor points points that define a vector graphic curve Aliasing - Jagged edges of an image caused by undersampling Anti-aliasing - Softens jaggedness of aliasing with intermediary shades where sharp color changes occur Problem with scaling bitmap graphics why? See upsampling and downsampling. Upsampling - Increasing the resolution - Requires new pixels (interpolation) Downsampling - Decreasing the resolution - Discard some pixels Bitmap vs. vector - Bitmap: array of pixels vs. Vector: mathematical formula - Strengths - Bitmapped graphics - File size not affected by complexity
- Pixel-based filters/effects (such as blur) are possible - Vector Graphics - Scaling is easy - File size not affected by image size - Weaknesses - Bitmapped graphics - Problems scaling - File size affected by image size - Vector graphics - Pixel-based filters/effects (such as blur) are impossible - File size affected by image complexity B. Compression Dictionary-based/Table-based Compression - Lossless compression - Table of colors, each pixel points to one of those colors - i.e. Painting by numbers Run-Length Encoding (RLE) - Lossless compression - Indicate how many repetitions of a color there are rather than store the same color for each pixel - Can result in a larger image if there are few repetitions JPEG - Best suited for images with fine details and continuous tone changes - Suffers from artifacts and blur along high frequency edges Convolution - Computational process to an image that takes surrounding pixels into account C. Color RGB - Red, Green, Blue - Based on light/the eyes - Additive color system - Know basic combinations (red + green =?) - Used for monitors CMYK - Cyan, Magenta, Yellow, Key (Black) - Based on ink/paint - Subtractive color system
- Know basic combinations (cyan + magenta =?) - Used for printing Why is a separate black ink necessary? - Cyan, Magenta and Yellow inks don't mix to form a perfect black (some color is still reflected) - Mixing three inks takes a long time to dry HSV - Hue, Saturation, Intensity - Different representation of RGB colors - Based on how we think about colors - Hue: dominant color - Saturation: how pale/pure the color is - V: brightness Color Gamuts - A set of colors - RGB and CMYK don t perfectly overlap - RGB and CMYK don t capture all colors visible to the human eye Banding - A negative effect of reducing the number of colors in which high-contrast edges appear along the edges where the color changes Dithering - Uses a group of colors to approximate a color - Helps counteract banding - Works better in high-resolution images D. Devices How Scanners Work - Row of sensors captures dots of light - Row of sensors moves - Repeat for the length of the image Sampling Rate for a Scanner = number of sensors AND the amount the scan head moves with each step Megapixels = 1,000,000 pixels - Used to describe digital camera quality - Does not indicate resolution More megapixels does not necessarily mean better quality
PPI vs. DPI - PPI = Print resolution - Relevant to printing images - Determines print size - DPI = Printer Resolution / Scanning resolution - Relevant to the printer / scanner - Ink dots per inch / color dots sampled per inch - Affects print quality / determines scan size Steps of digital image retouching - Crop and straighten the image - Repair small imperfections - Adjust the overall contrast or tonal range of the image - Remove color casts - Fine-tune specific parts of the image - Sharpen the image Histogram - A histogram is a bar chart that shows the relative number of pixels plotted against the color value E. JPEG vs. GIF vs. PNG JPEG - Best with continuous-tone images with a broad color range - JPEG supports 24-bit color (millions of colors) - Does not work well with solid colors or contrast edges - Blur the image detail - Show visible artifacts around the high contrast edges - Drastically reduces file size GIF - Most effective for images with solid colors such as illustrations, logos, and line art - Up to 8-bit color (256 colors) - Supports background transparency - Can be animated - Undesirable stripes in smooth gradient areas (banding) - Some colors are altered (remapped to a different colors on the palette) - Dithering can counter some negative effects - Smaller file size after reducing number of colors PNG - 24-bit colors - Supports background transparency
- Lossless compression - Larger file size than JPEG but without the ugly JPEG compression artifacts II. Calculations Graphics and Devices Convolution - Center convolution mask on target pixel - Multiply mask values by pixel values and add everything together Determining Scanning Resolution - Determine desired pixel dimensions - Desired scanning resolution (dpi) = pixel dimensions (px) / physical dimensions (in) How Many Megapixels? - Multiply resolution (3,000 x 2,000 = 6,000,000 pixels) - Divide by 1,000,000 (= 6 Megapixels) Print Size of an Image - Physical size (inches) = pixel dimensions (px) / pixel resolution (ppi)