0% found this document useful (0 votes)
48 views55 pages

Ch02 S21 27 March

The document discusses digital image processing topics including spatial and intensity resolution, image formation, image sensing using different sensor types, pixel relationships and mathematical operations that can be performed on digital images such as arithmetic, distance calculations and interpolation methods.

Uploaded by

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

Ch02 S21 27 March

The document discusses digital image processing topics including spatial and intensity resolution, image formation, image sensing using different sensor types, pixel relationships and mathematical operations that can be performed on digital images such as arithmetic, distance calculations and interpolation methods.

Uploaded by

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

Digital Image Processing

LECTURE: 03,04
(CH 02)
Spatial and Intensity Resolution


Spatial and Intensity Resolution (Cont.)

 Example: A digital camera with a 20-megapixel CCD


imaging chip can be expected to have a higher
capability to resolve detail than an 8-megapixel
camera,
 Assuming that both cameras are equipped with comparable
lenses and
 The comparison images are taken at the same distance.
 Intensity resolution similarly refers to the smallest
discernible change in intensity level.
Spatial and Intensity Resolution (Cont.)
Image Formation

Courtesy: DIP 3/Edition


Umer Javed, CS: 407: Digital Image Processing Chapter:2, Slide # 5
Image Formation (Cont.)

Image Formation (Cont.)
Image Sensing
 Mostly images are generated by combination of the

“illumination source” and the

“reflection/absorption/transmission” of the energy by the

element of scene.
 Reflected or transmitted energy is used/directly by sensor plane/film to generate image

 Some cases Reflected or transmitted energy is focused on a photoconverter to convert it into

visible light.

 This visible light is detected by another sensing device to create digital image (Normally

digital imaging)
Image Sensing (Cont.)
 Principal Sensor Arrangement:
 Single image sensor (Fig 1).

 Linear sensor (Fig. 2)

 Array sensor (Fig. 3)


Image Sensing (Cont.)
 Principal Sensor Arrangement:
Fig. 1

Fig. 3
Image Sensing (Cont.)

 Imaging using single sensor


 Photodiode follows this kind of behavior.

 Colored sensors give maximum voltage for similar

colors and minimum for others.

Chapter:2, Slide # 11
Image Sensing (Cont.)

Fingerprint sweep sensor


Computerized Axial Tomography
Image Sensing
 Sensor Arrays:

 Charged Coupled Devices (CCD)

 Widely used in digital cameras

 Complimentary Metal Oxide Semiconductor (CMOS)

 CMOS doesn’t require charged couples

 Application Areas:

 Air Borne Imaging

 X-Rays Scan

 Computerized Axial Tomography (CAT)

 Positron Emission tomography (PET)

 Magnetic Resonance Imaging (MRI)


Image Sensing (Cont.)

w Used for convert a continuous


image into a digital image

w Contains an array of light sensors

w Converts photon into electric charges


accumulated in each sensor unit

CCD KAF-3200E from Kodak.


(2184 x 1472 pixels,
Pixel size 6.8 microns2)
Pixel relationships
(0,0) y
 Neighborhood

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

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


x

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

 Regions and boundaries

Chapter:2, Slide # 15
Spatial Relationship
 Nearest Neighborhood

 4-Connected pixels are neighbors to every pixel that touches one of


their edges.

 These pixels are connected horizontally and vertically.

 N4 = (x + 1, y),(x − 1, y),(x, y + 1),(x, y −1)


 Diagonal Neighbors

ND = (x + 1, y + 1),(x + 1, y − 1),(x − 1, y + 1),(x − 1, y − 1)


 Eight Neighbors

N8 = N 4 ND

Chapter:2, Slide # 16
Spatial Relationship

Pixel neighborhood: (a). Nearest/N4, (b). Diagonal/ND and (c). N8 neighborhood

Chapter:2, Slide # 17
Pixel adjacency
 Let v={}, set of intensity values

 Binary image, v={1 or 0}.

 Determine adjacency with “1” intensity pixels.

 Similarly it can be done for gray scale images.

 Types of adjacency

 4-adjacency

 8-adjacency

 M-adjacency

Chapter:2, Slide # 18
Pixel adjacency
 4-adjacecncy:

 Two pixels ‘p’ and ‘q’ are 4-adjacent IF

 ‘p’ and ‘q’  set ‘v’ AND ‘q’ is in N4(p).

 8-adjacecncy:

 Two pixels ‘p’ and ‘q’ are 8-adjacent IF

‘p’ and ‘q’  set ‘v’ AND ‘q’ is in N8(p).


 M-adjacency:

 Two pixels ‘p’ and ‘q’ are M-adjacent IF ‘p’ and ‘q’  set ‘v’
AND ‘q’ is in N4(p).

 ‘q’ is in ND(p) AND N4(p) N4(q) has no pixel  set ‘v’


Path

q
p

We can define type of path: 4-path, 8-path or m-path


depending on type of adjacency.
Pixel adjacency
 Given, v={1 , 2} the adjacent pixels and path are:

Chapter:2, Slide # 21
Connectivity

0  i  n, (x i , yi )  S i

Chapter:2, Slide # 22
Connectivity
 Let S represent a subset of pixels in an image

 For every pixel p in S, the set of pixels in S that are connected to p is

called a connected component of S.

 If S has only one connected component, then S is called Connected

Set.

 We call R a region of the image if R is a connected set.

 Two regions, Ri and Rj are said to be adjacent if their union forms a

connected set.

 Regions that are not to be adjacent are said to be disjoint.

Chapter:2, Slide # 23
Border, Background and Foreground
 Boundary (or border)

 The boundary of the region R is the set of pixels in the region that

have one or more neighbors that are not in R.

 If R happens to be an entire image, then its boundary is defined as the

set of pixels in the first and last rows and columns of the image.

 Foreground and background

 An image contains K disjoint regions, Rk, k = 1, 2, …, K.

 Let Ru denote the union of all the K regions, and let (Ru)c denote its

complement.

 All the points in Ru is called foreground,

 All the points in (Ru)c is called background.

Chapter:2, Slide # 24
Mathematical operations

 Following mathematical operations can be


performed on digital
 Linear or Non-linear operations

 Arithmetic operations

 Spatial operations

 Distance measurements

 Geometric transformations

Chapter:2, Slide # 25
Linear / Non linear operations

 Linear operator need to satisfy two condition


 Additivity

 Homogeneity

Chapter:2, Slide # 26
Arithmetic Operations

 Two images A and B can be:


 Added

 Subtracted

 Multiplied

 Divided

Chapter:2, Slide # 27
Arithmetic Operations
 Averaging for noise reduction.
Arithmetic Operations
Addition for dynamic contrast enhancement
[Debevec, Malik, 1997]

Chapter:2, Slide # 29
Arithmetic Operations

 Subtraction for highlighting differences

Chapter:2, Slide # 30
Arithmetic Operations

 Image subtraction for Biomedical imaging.

In Angiography, subtraction of new frame from


previous highlights the difference. After this, contrast
enhancement can also be used.

Chapter:2, Slide # 31
Arithmetic Operations
 Image multiplication for segmentation.

Chapter:2, Slide # 32
Arithmetic Operations
 Image multiplication for segmentation.
Arithmetic Operations
 Set operations.
Arithmetic Operations

Courtesy: DIP 3/Edition

Umer Javed, CS: 407: Digital Image Processing Chapter:2, Slide # 35


Distance Calculations
 Given pixels p, q and z with coordinates (x, y), (s, t),
(u, v), respectively.
 The following distances can be found:
 Euclidean distance:
1
2 2 2
DE (p, q) = [(x - s) + (y - t) ]

 City Block distance:


D4 (p,q) =| x - s | + | y - t |

 Chess Board distance:


D8 (p, q) = max(| x - s |,| y - t |)
Image Interpolation

Original Image Resample Image Zoomed Image


Enhancing Resolution

Low Resolution

High Resolution
Inserting Rows and Columns
Linear Interpolation
Filling of new locations by using linear interpolation method

Note: a=0.5, will result in average of two


f(n)=[0,120,180,120,0]
f(x)=[0,60,120,150,180,150,120,60,0], x=n/2
f(x)=[0,20,40,60,80,100,120,130,140,150,160,170,180,…], x=n/6
Courtesy: image_interpolation.ppt, google.com

Umer Javed, CS: 407: Digital Image Processing Introduction 39


Chapter:2, Slide # 39
Higher Order Interpolation

Filling of new locations by using non linear interpolation method

Courtesy: image_interpolation.ppt, google.com

Introduction 40
Chapter:2, Slide # 40
Image Interpolation
 Nearest neighborhood.
 Bilinear Interpolation. (Set N=1)
 Bicubic Interpolation. (Set N=3)

Chapter:2, Slide # 41
Bilinear Interpolation

Courtesy: image_interpolation.ppt, google.com

Chapter:2, Slide # 42
Technique comparisons
Bilinear Interpolation

100 x 100

400 x 400
Bicubic Interpolation

100 x 100

400 x 400
Courtesy: image_interpolation.ppt, google.com

Chapter:2, Slide # 45
Affine Transformation
 It is an important class of linear 2-D geometric
transformations.
 It maps the variables of an input image into new
variables (e.g. in an output image) by applying a
linear combination of following operations.
 Translation

 Scaling

 Rotation

 Shear
Chapter:2, Slide # 46
Translation

Courtesy: S. Savarese

Chapter:2, Slide # 47
Translation

 Alternative approaches,

Courtesy: S. Savarese

Chapter:2, Slide # 48
Scaling

Courtesy: S. Savarese

Chapter:2, Slide # 49
Translation and Scaling

Courtesy: S. Savarese

Chapter:2, Slide # 51
Translation and Scaling

 Alternative approach,

Courtesy: S. Savarese

Chapter:2, Slide # 52
Rotation

Courtesy: S. Savarese

Chapter:2, Slide # 53
Multiple operations
 Translation, scaling and rotation.

Courtesy: S. Savarese

Chapter:2, Slide # 54
Summary

You might also like