Image Fundamentals - I
Human Visual Perception
- Understanding image processing begins with understanding the human vision system.
- It's crucial to observe and evaluate images within our own biological system to avoid misinterpreting image formation.
- Key questions to consider:
- What intensity differences can we distinguish?
- How accurately do we estimate and compare distances and areas?
- How do we sense colors?
- By which features can we detect and distinguish objects?
Eye vs. Camera
| Eye Components | Camera Components |
|---|
| Lens, cornea | Lens |
| Iris, pupil | Shutter |
| Retina | Film |
| Optic nerve | Cable to transfer images |
- The optic nerve sends information to the brain.
- The shape of the lens in the eye is controlled by tension in the fibers of the ciliary body.
Signals
- A signal is a function that carries information.
- The content of the signal changes over spatial and/or temporal dimensions.
Time-varying Signals
- These signals vary over time, represented as f(t).
- Example: An audio signal, which can be thought of as a collection of tones with varying audible frequencies over time.
Spatially-varying Signals
- These signals vary over space.
- An image can be represented as a function of two spatial dimensions: f(x,y).
- For monochromatic images, the function value represents the amount of light at point (x,y).
- Medical CAT and MRI scanners produce images as functions of three spatial dimensions: f(x,y,z).
Spatiotemporal Signals
- Signals can vary both spatially and temporally.
- These are referred to as spatio-temporal signals.
Digital Images
- Computers process discrete information.
- Digitizing a continuous image involves sampling and quantization.
Digital Image Representation
- A digital image is an image f(x,y) that has been digitized in both spatial coordinates and intensity values.
- The value of f at any point (x,y) is proportional to the brightness or gray level of the image at that point.
Computer Model
- A digital image can be represented as a matrix (2D array).
- Row and column indices identify a point in the image.
- The matrix element value identifies the gray level at that point.
- An image can be plotted as a function of two variables.
Gray Level
- Monochromatic light is light void of color; its only attribute is intensity.
- Gray level is the term used to describe monochromatic intensity, ranging from black to white.
- The intensity of a monochrome image f at coordinate (x,y) is the gray level l of the image at that point.
- l lies in the range L<em>min≤l≤L</em>max, where L<em>min is positive and L</em>max is finite.
- Gray scale is defined as [L<em>min,L</em>max] and is often shifted to [0,L] where 0 = black and L = white.
Number of Bits
- The number of gray levels is typically an integer power of 2: L=2k
- The number of bits required to store a digitized image is b=M∗N∗k, where M and N are the dimensions of the image.
Resolution
- Resolution, which determines the level of detail in an image, depends on sampling and gray levels.
- Spatial Resolution
- Gray-level Resolution
- Higher sampling rates and gray scales improve the approximation of the digitized image from the original.
- Increasing the quantization scale increases the size of the digitized image.
- The number of samples used to generate an image is at the discretion of the user.
- The number of gray levels is bounded by hardware considerations.
- A common number of bits used is 8 bits, resulting in 28=256 gray levels.
Subsampling
- Subsampling reduces the resolution of an image.
- Problem: Decreasing the resolution too much can lead to problems such as the checkerboard effect.
False Contouring
- If the gray scale is insufficient, it can affect smooth areas of the image.
- False contouring can occur in smooth areas with fine gray scales.
Types of Digital Images
- Binary image: 1 bit/pixel
- Grayscale image: 8 bits/pixel
- True color or RGB image: 24 bits/pixel
- Indexed image: 8 bits/pixel
Binary Images
- Efficient in terms of storage.
- Used in document processing, handwriting, and fingerprint analysis.
Grayscale Images
- The range is usually a power of 2.
- 256 levels are sufficient for most applications.
True Color Images
- RGB (red-green-blue) images have 16,777,216 different possible colors.
Indexed Images
- These images have an associated color map, which is a list of all the colors used in the image.
- Common formats include GIF and PNG.
Image File Size
- The number of bits or bytes used by an image.
- Examples:
- 512x512 binary image: 512∗512∗1=262,144 bits = 32,768 bytes ≈ 0.033 Mb
- 512x512 grayscale image: 512∗512∗8=262,144 bytes ≈ 0.262 Mb
- 512x512 RGB image: 512∗512∗24=786,432 bytes ≈ 0.75 Mb
Basic Relationships Between Pixels
- Neighbors of a pixel
- Connectivity
- Other Relationships: Adjacency, Path, Connected components, Region, Boundary
- Distance Measures
Neighbors of a Pixel
- A pixel p at coordinate (x,y) has:
- N4(p): 4-neighbors of p, which are (x+1,y),(x−1,y),(x,y+1),(x,y−1)
- ND(p): 4-diagonal neighbors of p, which are (x+1,y+1),(x+1,y−1),(x−1,y+1),(x−1,y−1)
- N<em>8(p): 8-neighbors of p, which is a combination of N</em>4(p) and ND(p)
Connectivity
- Let V be the set of gray-level values used to define connectivity.
- 4-connectivity: Two pixels p and q with values from V are 4-connected if q is in the set N4(p).
- 8-connectivity: Two pixels p and q with values from V are 8-connected if q is in the set N8(p).
Adjacency, Path, Connected Components, Region, Boundary
- Adjacency: A pixel p is adjacent to pixel q if they are connected.
- Path: A sequence of distinct pixels that are adjacent to each other.
- Connected Component: A set of pixels that are adjacent to each other.
- Region: A subset R of pixels in an image is a region if R is a connected set.
- Boundary: The set of pixels in the region that have one or more neighbors that are not in R.
Distance Measures
- Let pixels p,q, and z have coordinates (x,y),(s,t), and (u,v), respectively.
- D is a distance function or metric if:
- D(p,q)≥0,D(p,q)=0 if p=q
- D(p,q)=D(q,p)
- D(p,z)≤D(p,q)+D(q,z)
Euclidean Distance
- De(p,q)=(x−s)2+(y−t)2