0% found this document useful (0 votes)
28 views18 pages

Digital Image Processing: Lecture # 2

This document discusses key concepts in digital image processing including: 1. Spatial resolution refers to the smallest discernible detail in an image, which depends on sampling. Gray-level resolution refers to the smallest discernible change in gray level. 2. Connectivity, regions, and boundaries are defined based on whether pixels are adjacent or connected by a path of adjacent pixels of the same value. 3. Pixel distances can be measured in different ways such as Euclidean, city-block, or based on the shortest path between pixels along allowed connections.

Uploaded by

nnehasingh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views18 pages

Digital Image Processing: Lecture # 2

This document discusses key concepts in digital image processing including: 1. Spatial resolution refers to the smallest discernible detail in an image, which depends on sampling. Gray-level resolution refers to the smallest discernible change in gray level. 2. Connectivity, regions, and boundaries are defined based on whether pixels are adjacent or connected by a path of adjacent pixels of the same value. 3. Pixel distances can be measured in different ways such as Euclidean, city-block, or based on the shortest path between pixels along allowed connections.

Uploaded by

nnehasingh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 18

Digital Im

age
Processing
Lecture #
2

Contents
0 Spatial resolution
0 Gray-level resolution
0 Zooming
0 Shrinking
0 MATLAB functions

Representing digital
images

Spatial and Gray-level


Resolution
0 Spatial resolution is the smallest discernible detail in an

image; depends upon sampling


0 Spatial resolution: smallest number of discernible line
pairs per unit distance, where line pair consists of one
line of width W and its adjacent space of same width
such that, the width of a line pair is 2W.
0 Gray-level resolution: smallest discernible change in
gray level
0 Due to hardware considerations, the number of gray
levels is usually an integer power of 2
0 An L-level digital image of size M X N has a spatial
resolution of M*N pixels and a gray-level resolution of L
levels

Number of bits required

Relation between N and k

For images with


a large amount
of detail only a
few gray levels
may be needed

Spatial resolution
128

64

256
512
Gray-levels represented with 8 bits for spatial
resolution.
1024

Sub-sampling done by deleting appropriate


number of rows and columns.
Number of gray levels allowed = 256

Spatial resolution

1024

128

512

256

64

Gray level resolution

False
contouring

Gray level resolution

Number of allowed gray-levels reduced => reduced number of bits


required.

Pixel relationship

(1,1 (1,2
)
)

4-neighbors

(2,1
)
x

x-1,
y-1
x,y1

x1,y
x, y

Diagonal neighbors
x-1,
y+1

x,y+
1

x+1, x+1, x+1,


y-1
y
y+1

8 neighbors

Pixel adjacency
0 Pixels: p(x,y) and q(s,t)
0 V = set of intensity values used to define

adjacency = {1} say


0 4-adjacency: p and q with values from V, are 4-

adjacent if they are 4 neighbors


0 8-adjacency: p and q with values from V, are 8adjacent if they are 8 neighbors
0 m-adjacency (mixed adjacency): p and q with
values from V, are m-adjacent if:
0 q is 4-neighbor of p, or
0 Q is diagonal neighbor of p and there is no common

4-neighbor for p and q, that is, N 4(p) N4(q) =

Path
0 A (digital) path (or curve) from pixel p(x, y) to

pixel q(s, t) is a sequence of distinct adjacent


pixels to reach q from p, that is, (x0 , y0), (x1 , y1),
, (xn , yn) length of path = n
where (x0 , y0) = (x, y), (xn , yn) = (s, t)
0 If (x0 , y0) = (x, y) and (xn , yn) = (x, y) closed
path

8-paths m-path

Connectivity, Regions &


Boundaries
0 Let S represent a subset of pixels in an image. Two

pixels p and q are said to be connected in S if there


exists a path between them consisting entirely of
pixels in S.
0 For any pixel p in S, the set of pixels that are
connected to it in S is called a connected component
of S. If all elements of S form one connected
component, then set S is called a connected set.
0 A subset of pixels in an image, R is a region of the
image if R is a connected set. The boundary (also
called border or contour) of a region R is the set of
pixels in the region that have one or more neighbors
that are not in R.

Boundary and Edge


0Boundary of finite regions form a

closed path and edges may be open.


0Boundaries are based on

connectivities and edges on a


measure of gray-level discontinuties.

Pixel distances
0 For pixels p, q, and z, with coordinates (x, y), (s,

t), and (v, w), respectively, D is a distance


function or metric if

0 Euclidean distance

the points with distance d are contained in a disk


of radius d centered at (x, y).

Pixel Distances

(Contd.)

0 TheD4 distance (also called city-block distance)

between p and q is
0 TheD8 distance (also called chessboard distance)
between p and q is
Note that the D4 and D8
distances between p and q
are independent of any
paths that might exist
between the points because
these distances involve only
the coordinates of the points

Pixel Distances

(Contd.)

0 Dm distance: shortest m-path between the points.


0 Dm distance between two pixels will depend on the

values of the pixels along the path, as well as the


values of their neighbors.
0
1

0
1

Dm = 2

1
1
1

0
1
Dm = 3

1
1
1

1
1
Dm = 4

You might also like