Raster and Vector Images, Textures, Curves, and Anti-Aliasing
Images
What is an Image?
A 2D distribution of intensity or color. Raster images store the pixel value for each pixel, usually color in RGB form. A Vector image is described by storing shape descriptions with no reference to the pixel grid. They are resolution-independent images but they need to be rasterized before display.
Raster Devices
- Output/Input
- Output (display: LCD/LED or hardcopy: printer)
- Input (digital camera/scanner)
Digital images are an approximation of the real scene. Formats: 1, 3, or 4 values per point/pixel (grayscale, RGB, or RGB/Alpha). Image processing uses an algorithm to alter an image. Examples include noise removal, noise reduction, contrast change, edge detection, compression, and inpainting (reconstructing damaged images).
Stages in Image Processing
- Problem
- Image Acquisition
- Image Enhancement
- Image Restoration
- Morphological Processing
- Segmentation
- Representation/Description
- Object Recognition
Displays
Displays can be either:
- Emissive (use pixels that emit a controllable amount of light) (LED, 3 components: RGB, each emitting light of different colors)
- Transmissive (pixels control the amount of light passing through them) (LCD, is able to rotate the polarization of light passing through it)
Transmissive displays need a backlight behind the array.
Data Types for Raster Images
- Bitmaps (boolean per pixel)
- Grayscale (int pp)
- Color (3 int pp)
- Float, etc.
Dithering
When decreasing bits per pixel, we quantize and make consistent choices. Instead, be inconsistent and dither: turn on some pixels, not others, and trade spatial resolution for tonal. Choose a pattern based on the device. Types: Ordered/Diffusion.
Textures
Include image-1009-texturing in GLSL/pipeline.
Anti-aliasing and Compositing
Anti-aliasing is how to carefully throw away the detail. It can be done by rasterization, point sampling, or texture mapping. Compositing is how to account for details when combining images. Sampling is storing discrete points and reconstructing values in between as needed. Read up on 1009 and 1012.
Curves
Digital Matting
Traditionally, composite two different elements by printing them. Motivations include smoothness and shapes without discontinuities.
Classic
Origin of spline: a strip of flexible material, held in place by pegs to make a shape, traced to make a contour.
Maths
Use a piecewise polynomial. For smoothness, use low-order polynomials, which act as smoothing functions. Use user-specified control points to give shape.
Types of Curves
A continuous image of some interval in an n-dimensional space (a curve is a set of points). A continuous map from a one-dimensional to an n-dimensional space (a curve is a mapping between time and a set of points).
Specifying Curves
- Implicit: Defines the set of points on a curve by giving a procedure that tests to see if a point is on the curve, f(x,y)=0.
- Parametric: Provides a mapping from a free parameter to a set of points on the curve, i.e., the free parameter provides an index to points on the curve, (x,y)=f(t).
- Generative/Procedural: Provides procedures that can generate the points on the curve that do not fall into the first two categories.
Parametric Curves
Parametric curves have a function that is a mapping from an interval of a parameter, usually running from 0 to 1. u=0 is the start of the curve, u=1 is the end of the curve. The curve is specified by mapping time to position. Given f(t) over [a,b], we can specify f'(u) over the unit interval. f and f’ represent the same curve, with different parameterizations. Creating a new parametrization for an existing curve is called re-parameterization.
Arc Length Parameterization
Define curves by functions that map from distance along the curve to the position.