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 ComponentsCamera Components
Lens, corneaLens
Iris, pupilShutter
RetinaFilm
Optic nerveCable 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)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)f(x,y).
  • For monochromatic images, the function value represents the amount of light at point (x,y)(x, y).
  • Medical CAT and MRI scanners produce images as functions of three spatial dimensions: f(x,y,z)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)f(x, y) that has been digitized in both spatial coordinates and intensity values.
  • The value of ff at any point (x,y)(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 ff at coordinate (x,y)(x, y) is the gray level ll of the image at that point.
  • ll lies in the range L<em>min≤l≤L</em>maxL<em>{min} \leq l \leq L</em>{max}, where L<em>minL<em>{min} is positive and L</em>maxL</em>{max} is finite.
  • Gray scale is defined as [L<em>min,L</em>max][L<em>{min}, L</em>{max}] and is often shifted to [0,L][0, L] where 0 = black and L = white.

Number of Bits

  • The number of gray levels is typically an integer power of 2: L=2kL = 2^k
  • The number of bits required to store a digitized image is b=M∗N∗kb = M * N * k, where MM and NN 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=2562^8 = 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,144512 * 512 * 1 = 262,144 bits = 32,768 bytes ≈ 0.033 Mb
    • 512x512 grayscale image: 512∗512∗8=262,144512 * 512 * 8 = 262,144 bytes ≈ 0.262 Mb
    • 512x512 RGB image: 512∗512∗24=786,432512 * 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 pp at coordinate (x,y)(x, y) has:
    • N4(p)N_4(p): 4-neighbors of pp, which are (x+1,y),(x−1,y),(x,y+1),(x,y−1)(x+1, y), (x-1, y), (x, y+1), (x, y-1)
    • ND(p)N_D(p): 4-diagonal neighbors of pp, which are (x+1,y+1),(x+1,y−1),(x−1,y+1),(x−1,y−1)(x+1, y+1), (x+1, y-1), (x-1, y+1), (x-1, y-1)
    • N<em>8(p)N<em>8(p): 8-neighbors of pp, which is a combination of N</em>4(p)N</em>4(p) and ND(p)N_D(p)

Connectivity

  • Let VV be the set of gray-level values used to define connectivity.
    • 4-connectivity: Two pixels pp and qq with values from VV are 4-connected if qq is in the set N4(p)N_4(p).
    • 8-connectivity: Two pixels pp and qq with values from VV are 8-connected if qq is in the set N8(p)N_8(p).

Adjacency, Path, Connected Components, Region, Boundary

  • Adjacency: A pixel pp is adjacent to pixel qq 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 RR of pixels in an image is a region if RR is a connected set.
  • Boundary: The set of pixels in the region that have one or more neighbors that are not in RR.

Distance Measures

  • Let pixels p,q,p, q, and zz have coordinates (x,y),(s,t),(x, y), (s, t), and (u,v)(u, v), respectively.
  • DD is a distance function or metric if:
    • D(p,q)≥0,D(p,q)=0D(p, q) \geq 0, D(p, q) = 0 if p=qp = q
    • D(p,q)=D(q,p)D(p, q) = D(q, p)
    • D(p,z)≤D(p,q)+D(q,z)D(p, z) \leq D(p, q) + D(q, z)
Euclidean Distance
  • De(p,q)=(x−s)2+(y−t)2D_e(p, q) = \sqrt{(x-s)^2 + (y-t)^2}