Graphics Image Processing Graphics Lab Korea University Overview
Graphics Image Processing 고려대학교 컴퓨터 그래픽스 연구실 Graphics Lab @ Korea University
Overview n Image Representation n n CGVR What is an image? Halftoning and Dithering Trade spatial resolution for intensity resolution n Reduce visual artifacts due to quantization n n Sampling and Reconstruction Key steps in image processing n Avoid visual artifacts due to aliasing n Graphics Lab @ Korea University
What is an Image? n CGVR An image is a 2 D rectilinear array of pixels Continuous image Digital image Graphics Lab @ Korea University
What is an Image? n CGVR An image is a 2 D rectilinear array of pixels Continuous image Digital image Graphics Lab @ Korea University
What is an Image? n CGVR An image is a 2 D rectilinear array of pixels Continuous image Digital image A pixel is a sample, not a little square!! Graphics Lab @ Korea University
Image Acquisition n CGVR Pixels are samples from continuous function Photoreceptors in eye n CCD cells in digital camera n Rays in virtual camera n Graphics Lab @ Korea University
Image Display n CGVR Re-create continuous function from samples n Example: cathode ray tube Image is reconstructed by displaying pixels with finite area (Gaussian) Graphics Lab @ Korea University
Image Resolution n Intensity resolution n n Each pixel has only “Depth” bits for colors/intensities Spatial resolution n n CGVR Image has only “Width” x “Height” pixels Temporal resolution n Monitor refreshes images at only “Rate” Hz Graphics Lab @ Korea University
Sources of Error n Intensity quantization n n Not enough intensity resolution Spatial aliasing n n CGVR Not enough spatial resolution Temporal aliasing n Not enough temporal resolution Graphics Lab @ Korea University
Overview n Image Representation n n CGVR What is an image? Halftoning and Dithering Trade spatial resolution for intensity resolution n Reduce visual artifacts due to quantization n n Sampling and Reconstruction Key steps in image processing n Avoid visual artifacts due to aliasing n Graphics Lab @ Korea University
Quantization n CGVR Artifact due to limited intensity resolution Frame buffers have limited number of bits per pixel n Physical devices have limited dynamic range n 255 150 255 255 150 150 75 750 255 150 75 750 255 150 75 750 0 0 Blue channel Green channel Red channel Graphics Lab @ Korea University
Uniform Quantization CGVR I(x, y) P(x, y) 2 bits per pixel Graphics Lab @ Korea University
Uniform Quantization n CGVR Image with decreasing bits per pixel: 8 bits 4 bits 2 bits 1 bit Notice contouring Graphics Lab @ Korea University
Reducing Effects of Quantization n Halftoning n n CGVR Classical halftoning Dithering Random dither n Ordered dither n Error diffusion dither n Graphics Lab @ Korea University
Classical Halftoning n CGVR Use dots of varying size to representation intensities n Area of dots proportional to intensity in image I(x, y) P(x, y) Graphics Lab @ Korea University
Classical Halftoning CGVR Newspaper image From New York Times 9/21/99 Graphics Lab @ Korea University
Halftone Patterns n CGVR Use cluster of pixels to represent intensity n Trade spatial resolution for intensity resolution Graphics Lab @ Korea University
Halftone Patterns n CGVR How many intensities in a n x n cluster? Graphics Lab @ Korea University
Dithering n CGVR Distribute errors among pixels Exploit spatial integration in our eye n Display greater range of perceptible intensities n Original (8 bits) Uniform Quantization (1 bit) Floyd-Steinberg Dither (1 bit) Graphics Lab @ Korea University
Random Dither n CGVR Randomize quantization errors n Errors appear as noise Graphics Lab @ Korea University
Random Dither Original (8 bits) Uniform Quantization (1 bit) CGVR Random Dither (1 bit) Graphics Lab @ Korea University
Ordered Dither n CGVR Pseudo-random quantization errors n Matrix stores pattern of thresholds j = x mod n i = y mod n e = I(x, y) – trunc(I(x, y)) if( e > D(i, j) ) P(x, y) = ceil(I(x, y)) else P(x, y) = floor(I(x, y)) Graphics Lab @ Korea University
Ordered Dither Original (8 bits) Uniform Quantization (1 bit) CGVR Ordered Dither (1 bit) Graphics Lab @ Korea University
Error Diffusion Dither n CGVR Spread quantization error over neighbor pixels n Error dispersed to pixels right and below α β γ δ α + β + γ + δ = 1. 0 Graphics Lab @ Korea University
Error Diffusion Dither Original (8 bits) Random Dither (1 bit) Ordered Dither (1 bit) CGVR Floyd-Steinberg Dither (1 bit) Graphics Lab @ Korea University
Overview n Image Representation n n CGVR What is an image? Halftoning and Dithering Trade spatial resolution for intensity resolution n Reduce visual artifacts due to quantization n n Sampling and Reconstruction Key steps in image processing n Avoid visual artifacts due to aliasing n Graphics Lab @ Korea University
Sampling and Reconstruction CGVR Sampling Reconstruction Graphics Lab @ Korea University
Sampling and Reconstruction CGVR Graphics Lab @ Korea University
Aliasing n In general: n n CGVR Artifacts due to under-sampling or poor reconstruction Specifically, in graphics: Spatial aliasing n Temporal aliasing n Under-sampling Graphics Lab @ Korea University
Spatial Aliasing n CGVR Artifacts due to limited spatial resolution Graphics Lab @ Korea University
Spatial Aliasing n CGVR Artifacts due to limited spatial resolution “Jaggies” Graphics Lab @ Korea University
Temporal Aliasing n CGVR Artifacts due to Limited Temporal Resolution Strobing n Flickering n Graphics Lab @ Korea University
Temporal Aliasing n CGVR Artifacts due to Limited Temporal Resolution Strobing n Flickering n Graphics Lab @ Korea University
Temporal Aliasing n CGVR Artifacts due to Limited Temporal Resolution Strobing n Flickering n Graphics Lab @ Korea University
Temporal Aliasing n CGVR Artifacts due to Limited Temporal Resolution Strobing n Flickering n Graphics Lab @ Korea University
Antialiasing n CGVR Sample at higher rate Not always possible n Doesn’t always solve problem n n Pre-filter to form bandlimited signal Form bandlimited function (low-pass filter) n Trades aliasing for blurring n Must consider sampling theory! Graphics Lab @ Korea University
Sampling Theory CGVR n How many samples are required to represent a given signal without loss of information? n What signals can be reconstructed without loss for a given sampling rate? Graphics Lab @ Korea University
Sampling Theorem CGVR n A signal can be reconstructed from its samples, if the original signal has no frequencies above ½ the sampling frequency – Shannon n The minimum sampling rate for bandlimited function is called “Nyquist rate” A signal is bandlimited if its highest frequency is bounded. The frequency is called the bandwidth. Graphics Lab @ Korea University
Image Processing n Quantization CGVR n Filtering n Blur Uniform quantization n Detect edge n Random dither n Ordered dither n Floyd-Steinberg dither n Warping n Scale n Pixel operations n Rotate n Warps n Add random noise n Add luminance n Add contrast n Combining n Add saturation n Morphs n Composite n Graphics Lab @ Korea University
- Slides: 39