Digital ImageProcessing - Sampling & Quantization
Digital ImageProcessing - Sampling & Quantization
Established in 1998
Session: 2020-21
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Image Sensing & Acquisition
How to transform
illumination energy
into digital images
using sensing
devices
Image Sensing & Acquisition
scanners
Image Sensing & Acquisition
– The strength of the radiation from a light source is measured using the unit
called the candela, or candle power. The total energy from the light source,
including heat and all electromagnetic radiation, is called radiance and is
usually expressed in watts.
– Luminance is a measure of the light strength that is actually perceived by the
human eye. Radiance is a measure of the total output of the source;
luminance measures just the portion that is perceived.
– Brightness is a subjective, psychological measure of perceived intensity. Brightness is
practically impossible to measure objectively. It is relative. For example, a burning
candle in a darkened room will appear bright to the viewer; it will not appear bright in
full sunshine.
– The strength of light diminishes in inverse square proportion to its distance
from its source. This effect accounts for the need for high intensity projectors
for showing multimedia productions on a screen to an audience. Human light
perception is sensitive but not linear
Digital Image Processing
Reflected Light
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
Sampling limits
established by no. of
sensors, but quantization
limits by color levels.
Image Quantization
Image Sampling & quantization
The
The notation
notation (0,1),
(0,1), is
is used
used to
to signify
signify the
the second
second sample
sample along
along the
the first
first row,
row, not
not the
the
actual
actual physical
physical coordinates
coordinates when
when the
the image
image was
was sampled
sampled
Image Sampling & quantization
• Spatial resolution:
-No. of samples per unit length or area.
- Lines and distance: Line pairs per unit distance.
Isopreference Curve
BASIC RELATIONSHIP BETWEEN PIXELS
PIXEL
The word pixel is based on a contraction of pix ("pictures") and el (for
"element"); similar formations with el for "element" include the
words: voxel and texel.
In digital imaging, a pixel (or picture element) is a single point in a raster
image. The pixel is the smallest addressable screen element; it is the
smallest unit of picture that can be controlled. Each pixel has its own
address. The address of a pixel corresponds to its coordinates.
The number of distinct colors that can be represented by a pixel depends on the
number of bits per pixel (bpp). A 1 bpp image uses 1-bit for each pixel, so each pixel
can be either on or off. Each additional bit doubles the number of colors available, so
a 2 bpp image can have 4 colors, and a 3 bpp image can have 8 colors:
1- Neighbors of a Pixel:
P
The 4- neighbors of pixel p are:
N4(p)
The 4- diagonal neighbors are: P
ND(p)
The 8-neighbors are :
P
N8(p)
Relationship Between Pixels
Adjacency of Pixels:-
4- adjacency
Two pixels p and q with values from V are 4- adjacency if q is in the set N4(p) .
Adjacency
8- adjacency
Two pixels p and q with values from V are 8- adjacency if q is
in the set N8(p) .
A (digital) path(or curve) from pixel p at (x,y) to pixel q at (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 pixel (xi,yi) and (xi-1,yi-1) are adjacent for 1≤ i ≤ n
n is the length of the path
If (x0,y0) =(xn,yn), the path is a closed path
The path can be defined 4-,8-,m-paths depending on adjacency type
Connectivity
Suppose that an image contains K disjoint regions, Rk, k = 1,2 ,...,k, none of which touches
the image border.
Let Ru be the union of all the K regions, and let (Ru)c denote its complement.
We call the points in Ru the foreground, and all the points in (Ru)c the background of the
image.
The inner boundary (border or contour) of a region R is the set of points that are adjacent
to the points in the complement of R. i.e set of pixels in the region that have at least one
background neighbour.
Boundary
Array product
a11 a12 b11 b12 a11b11 a12b12
a
a b b a b a
21 22 21 22 21 21 22 22 b
Let a1 = 1 , a2 =-1
0 2 6 5
f1 and f2
2 3 4 7
0 2 6 5 6 3
max (1) (1) max
2 3 4 7 2 4
-2
0 2 6 5
(1)max (1) max 3 (1)7
2 3 4 7
-4
Arithmetic Operations
If the noise satisfies the constrains just stated, then an image g(x,y) is formed by
averaging K different noisy images,
1 K
g ( x, y ) g i ( x, y )
K i 1
E g ( x, y ) f ( x, y )
1 2
g2( x , y ) ( x, y )
K
1
g ( x, y ) ( x, y )
K
As K increases the variability of the pixels at each location decreases.
Arithmetic Operations
Arithmetic Operations
Multiplication as masking
Logic Operation
AND: p AND q (p. q)
OR: p OR q (p + q)
COMPLEMENT: NOT q ( q )
Logic Operations
Spatial Operations
Single-pixel operations
Alter the values of its individual pixels
s = T(z)
Spatial Operations
Neighbourhood operations
Neighbourhood processing generates a
corresponding pixel at the same
coordinates in an output image.
t11 t12 0
x y 1 v w 1T v w 1t 21 t 22 0
t31 t32 1
Scale, rotate, translate, or sheer a set of coordinate points depending on the matrix T
Spatial Operations
Spatial Operations
Four pairs of the corresponding points -> 8 equations to find the unknown coefficients.
Image Transformation
r ( x, y, u, v) r1 ( x, u )r1 ( y, v)
2-D Fourier transform
M 1 N 1
T (u , v) f ( x, y )e 2 j ( ux / M vy / N )
x 0 y 0
M 1 N 1
1
f ( x, y )
MN
T (u ,
u 0 v 0
v ) e j 2 ( ux / M vy / N )
Probabilistic Methods
p( z
k 0
k ) 1
L 1
mean average m z
k 0
k p( zk )
L 1
2
(z
k 0
k m) 2 p ( z k )
Is the measure of the spread of the value of z about the mean, so it is useful to
measure an image contrast
Probabilistic Methods