Sei sulla pagina 1di 23

The Digital Image

The digital image should


adequately resolve all spatial
and intensity details of the
original continuous tone
image. The Nyquist
(sampling) theorem
requires that the pixel size
should less than half the size
of the finest detail in the
original image. Likewise, the
grey level brightness
increments should be less
than half the smallest tonal
variation in the original
The Digital Image

Undersampling
occurs when the
number of pixels in
a digital image is
too low to accurately
represent the fine
details present in the
original image.
The Digital Image
Undersampling results in
spatial aliasing. The example
shows this effect as Moire
patterns.
Digital Image
Spatial resolution
refers to the number of
pixels in the digital
image.
(a) 1024x1024 pixels
(b) 512x512 pixels
(c) 256x256 pixels
(d) 128x128 pixels
(e) 64x64 pixels
(f) 32x32 pixels
Typically, 256x256 is the
minimum acceptable
spatial resolution.
The Digital Image - Zooming

Although a digital image may appear smooth to the


human eye, when zoomed up enough the individual
pixels always become visible.
The Digital Image
Brightness resolution
refers to the number of
grey levels available in
the digital image.
(b) 256 grey levels
(b) 128 grey levels
(c) 64 grey levels
(d) 32 grey levels
The Digital Image
For convenient
computer storage, the
number of grey levels
is almost always 2N, N =
number of bits.

(e) 16 grey levels


(f) 8 grey levels
(g) 4 grey levels
(h) 2 grey levels

Image (h) is a binary image.


The Digital Image
Typically, the minimum
number of acceptable
grey levels is 16.

Note the introduction of


false contouring when
the brightness
resolution is too low.
The Digital Image
27 = 26 = 25 = 24 = 23 22 21 20 = 1
128 64 32 16 =8 =4 =2
Bit 7 Bit Bit Bit Bit Bit Bit Bit 0
(MSB) 6 5 4 3 2 1 (LSB)

1 Bit : max value = 1 = 21 – 1


1 Byte = 8 bits : max value = 255 = 28 – 1
1 Word = 2 bytes = 16 bits : max value = 65535 = 216 - 1
The Digital Image

A bit-plane is the
binary image
associated with a
selected bit’s
contribution to overall
pixel brightness. Most
of the image structure
is conveyed in the
higher order bit
planes.
The Digital Image

The lower order bit


planes carry the
important but more
subtle shading and
detail of the digital
image.
The Digital Image

N : 2N = number of pixels, square digital image.


m: 2m = number of grey levels.
The memory requirements to store digital images is large.
One typical high-resolution image requires 1 Megabyte of
memory. Colour images require 3X the memory of
monochrome images.
Basic relationships between
pixels
Neighbours of a pixel – 4-neighbors

A pixel p at coordinates (x, y) has four horizontal and vertical


neighbors whose coordinates are given by

(x+1,y), (x-1,y), (x,y+1), (x,y-1)

This set of pixels, called the 4-neighbors of p, is denoted by


N4(p).

Each pixel is a unit distance from (x, y), and some of the
neighbors of p lie outside the digital image if (x, y) is on the
border of the image.
Neighbours of a pixel – 8-
neighbors
The four diagonal neighbors of p have coordinates
(x+1,y+1),(x+1,y-1),(x-1,y+1),(x-1,y-1)
and are denoted by ND(p).

These points, together with the 4-neighbors, are called the 8-


neighbors of p, denoted by N8(p).

As before, some of the points in ND(p) and N8(p) fall outside


the image if (x, y) is on the border of the image.
Some Definitions
• Two pixels are said to connected if they
are neighbors and if their gray levels
satisfy a specified criterion of similarity
(say, if their gray levels are equal)
• 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).
Basic relationships between pixels
Arrangement of pixels:
0 1 1
0 1 0
0 0 1

4 neighbours N4(p):
1
0 1 0
0
Basic relationships between pixels
Mixed Connectivity:
Note: Mixed connectivity can eliminate the multiple path
connections that often occurs in 8-connectivity

Pixel 8-adjacent to the


m-adjacency
arrangement center pixel
Basic relationships between pixels
Path
Let coordinates of pixel p: (x, y), and of
pixel q: (s, t)
A path from p to q 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) 1≤ i ≤
n
Regions
Distance Measures
Given coordinates of pixels p, q, and z: (x,y), (s,t),
De (and
p, q ) =(u,v)
( x − s) 2 + ( y − t ) 2
Euclidean distance between p and q:
D4 ( p, q ) = x − s + y − t

• City-block distance between p and q:


D8 ( p, q ) = max(| x − s |, | y − t |)

• Chessboard distance between p and q:


Image Operation on a Pixel
Basis
• when we refer to an operation like
“dividing one image by another,” we mean
specifically that the division is carried out
between corresponding pixels in the two
images

• Other arithmetic and logic operations are


similarly defined between corresponding
pixels in the images involved.
Liner and Nonlinear Operations
• Let H be an operator whose input and
output are images. H is said to be a linear
operator if, for any two images f and g and
any two scalars a and b,
H(af + bg) = aH(f) + bH(g).

• An operator that fails the test of above


equation by definition is nonlinear.
Reading Assignment

• Chapter 2 (2.3-2.6) of “Digital Image


Processing” by Gonzalez.
Lab Assignment
• Develop an algorithm for converting a one-
pixel-thick 8-path to a 4-path.
• Develop an algorithm for converting a one-
pixel-thick m-path to a 4-path.