Vous êtes sur la page 1sur 37

Chapter Two

Digital Image Fundamentals


• Agenda:
– Light and Electromagnetic Spectrum
– Image Sensing & Acquisition
– Image Sampling & quantization
– Relationship Between Pixels
Electromagnetic Spectrum

Wavelength = c/ (frequency )
Energy = h* frequency
Definitions

• Monochromatic (achromatic) light: Light that is


void of color
- Attribute: Intensity (amount) .
- Gray level is used to describe monochromatic intensity.

• Chromatic light: To describe it, three quantities


are used:
- Radiance: The total amount of energy that flows from the light
source (measured in Watts).
- Luminance: The amount of energy an observer perceives from
a light source (measured in lumens).
- Brightness: A subjective descriptor of light perception that is
impossible to measure (key factor in describing color sensation)
Image Sensing & Acquisition

How to transform
illumination energy
into digital images
using sensing
devices
Image Sensing & Acquisition

• Image Acquisition using single sensor


Image Sensing & Acquisition

• Image Acquisition using Sensor Strips

scanners
Image Sensing & Acquisition

• Image Acquisition using Sensor Array


Image Sampling & quantization

Continues image
f(x,y) needs to be
in digital form.
Digitizing the
coordinate values
called sampling.
Sampling should
be in both
coordinates and
in amplitude.
Image Sampling
Image Sampling & quantization

Digitizing the Amplitude


values called image
quantization.

Sampling limits
established by no. of
sensors, but quantization
limits by color levels.

Image Quantization
Image Sampling & quantization

Digital Image Representation

Each element called image element, picture


element, or pixel
Image Sampling & quantization
Image Sampling & quantization

Consider an image which has :


M * N : size of the image
L : Number of discrete gray levels in this image
L= 2k Where k is any positive integer

The total number of bits needed to store this image b :


b = M * N * K,
If M = N, then b= N2 * K
Image Sampling & quantization

The dynamic range of an image can be described as:


• High dynamic range:
Gray levels span a significant portion of the gray
scale.
•Low dynamic range:
Dull, washed out gray look.
Image Sampling & quantization

• Spatial resolution:
- # of samples per unit length or area.
- Lines and distance: Line pairs per unit distance.

• Gray level resolution:


- Number of bits per pixel.
- Usually 8 bits.
- Color image has 3 image planes to yield 8 x 3 = 24
bits/pixel.
- Too few levels may cause false contour.
Image Sampling & quantization

Spatial Image Resolutions


No. of gray levels (K) is constant(8-bits images).
No. of samples (N) is reduced (No. of sensors)
Image Sampling & quantization

Comparison between all image sizes


Image Sampling & quantization

Gray Level Image Resolutions


No. of samples (N) is constant, but gray levels (K) decreases.
(false contouring)
Image Sampling & quantization

What is the effect of changing N and K..?

Little, Intermediate, and Large amount of details


Image Sampling & quantization

Isopreference Curve
Image Sampling & quantization

Zooming (digital image) can be viewed by


oversampling (continuous image).
1- Creation of new pixel locations
2- Assign a gray level value to this new location
using :
Nearest neighbor interpolation (Pixel replication )
Bilinear interpolation
Image Sampling & quantization

Shrinking (digital image) can be viewed by


undersampling (continuous image).
1- Deletion of row column pixels.
2- Assign a gray level value using :
Nearest neighbor interpolation
Bilinear interpolation
Image Sampling & quantization

Image Zoomed by 8, 16, 32 using


nearest neighbor interpolation
Image Sampling & quantization

Image Zoomed by 8, 16, 32 using


bilinear interpolation
Relationship Between Pixels

1- Neighbors of a Pixel:
P
The 4- neighbors of pixel p are:
N4(p)
P
The 4- diagonal neighbors are:
ND(p)
The 8-neighbors are : P

N8(p)
Relationship Between Pixels

2- Adjacency of Pixel: Two pixels are adjacent if


their values are in the same (binary image).
4- Adjacency: Two pixels p and q with values from V
are 4-adjacent if q is in the set N4(p).

8- Adjacency: Two pixels p and q with values from V


are 8-adjacent if q is in the set N8(p).
Relationship Between Pixels

m- Adjacency: Two pixels p and q with values from V are


m-adjacent if
- q is in the set N4(p) or
- q is in ND(p) and the set N4(p) ∩ N4(q) has no pixels
whose values are from V.

8-adjacent, m-adjacent
Relationship Between Pixels

Two image area subsets S1 and S2 are


adjacent if some pixel in S1 is adjacent
to some pixel in S2.
Relationship Between Pixels

Digital path (or curve):a path from pixel p with


coordinates (x,y) to pixel q with coordinates (s,t) is a
sequence of distinct pixels with coordinates
(x0,y0),(x1,y1),…(xn,yn)
where (x0,y0) = (x,y) , (xn,yn) = (s,t) and
(xi,yi) is adjacent to (xi-1,yi-1)

� n is the length of the path


Relationship Between Pixels

we can define 4-,8-, or m-paths depending


on type of adjacency specified.

8-adjacent, m-adjacent
Relationship Between Pixels

 Distance Measures
• for pixel p, q and z with coordinates
(x,y), (s,t) and (u,v) respectively,
• D is a distance function or metric if
� (a) D(p,q) ≥ 0 ; D(p,q) = 0 iff D=q
� (b) D(p,q) = D(q,p)
� (c) D(p,z) ≤ D(p,q) + D(q,z)
Relationship Between Pixels

Distance Measures:
1- The Euclidean distance between p and q is
defined as:
Relationship Between Pixels

Distance Measures:
2- The D4 distance (city-block distance) between p
and q is defined as:
Relationship Between Pixels

Distance Measures:
3- The D8 distance (chessboard distance) between p
and q is defined as
Relationship Between Pixels

Distance Measures:
4- The Dm distance: the shortest m-path between the
points.
Image Operations on a Pixel Basis

• used extensively in most branches of image processing.


• � Addition : p+q used in image average to reduce noise.
• � Subtraction : p-q basic tool in medical imaging.
• � Multiplication : pxq
• � Division : p÷q
• � Arithmetic Operation entire images are carried out pixel by pixel.

• � AND : p AND q (p•q)


• � OR : p OR q (p+q)
• � COMPLEMENT : NOT q ( )
• � logic operations apply only to binary images.
• � arithmetic operations apply to multivalued pixels.
• � logic operations used for tasks such as masking, feature detection, and shape
analysis.
• � logic operations perform pixel by pixel.
Linear and Nonlinear Operations

• H is a Linear operator if:


H(af + bg) = aH(f) + bH(g)
where a and b are two scalars
f and g are two images

Vous aimerez peut-être aussi