lecture 3 digital image fundamentals dr. arslan shaukat · pdf filedigital image fundamentals...

18
EC-433 Digital Image Processing Lecture 3 Digital Image Fundamentals Dr. Arslan Shaukat Acknowledgement: Lecture slides material from Dr. Rehan Hafiz, Dr. Imtiaz Taj, Wanasanan Thongsongkrit

Upload: trinhtuong

Post on 28-Mar-2018

232 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Lecture 3 Digital Image Fundamentals Dr. Arslan Shaukat · PDF fileDigital Image Fundamentals Dr. Arslan Shaukat ... Image Sampling and Quantization ... –Binary (1 bit quantization)

EC-433 Digital Image Processing

Lecture 3

Digital Image Fundamentals

Dr. Arslan Shaukat

Acknowledgement: Lecture slides material from

Dr. Rehan Hafiz, Dr. Imtiaz Taj, Wanasanan Thongsongkrit

Page 2: Lecture 3 Digital Image Fundamentals Dr. Arslan Shaukat · PDF fileDigital Image Fundamentals Dr. Arslan Shaukat ... Image Sampling and Quantization ... –Binary (1 bit quantization)

A Simple Image Formation Model

Image refers to a 2D light-intensity function, f(x,y).

The amplitude of f at spatial coordinates (x,y) gives the

intensity of the image at that point.

f(x,y) must be nonzero and finite, i.e. 0 < f(x,y) < ∞

Page 3: Lecture 3 Digital Image Fundamentals Dr. Arslan Shaukat · PDF fileDigital Image Fundamentals Dr. Arslan Shaukat ... Image Sampling and Quantization ... –Binary (1 bit quantization)

Image Formation Model

f(x,y) may be characterized by 2 components:

– Illumination, i(x,y): the amount of source light incident on the

scene being viewed

– Reflectance, r(x,y): the amount of light reflected by the objects

in the scene

f (x, y) = i(x, y) r(x, y)

0 < i(x, y) < ∞: determined by the nature of the light

source

0 < r(x, y) < 1: determined by the nature of the object

Page 4: Lecture 3 Digital Image Fundamentals Dr. Arslan Shaukat · PDF fileDigital Image Fundamentals Dr. Arslan Shaukat ... Image Sampling and Quantization ... –Binary (1 bit quantization)

Image Formation Model

We call the intensity of a monochrome image f at

coordinate (x,y), the gray level (l) of the image at that

point.

Thus, l lies in the range Lmin ≤ l ≤ Lmax

Lmin is positive and Lmax is finite.

Gray scale = [Lmin, Lmax]

Common practice, shift the interval to [0, L]

0 = black , L = white

Page 5: Lecture 3 Digital Image Fundamentals Dr. Arslan Shaukat · PDF fileDigital Image Fundamentals Dr. Arslan Shaukat ... Image Sampling and Quantization ... –Binary (1 bit quantization)

Image Sampling and Quantization

An image may be continuous with respect to the x- and y-

coordinates, and also in amplitude.

To convert it to digital form, we have to sample the

function in both coordinates and in amplitude.

Sampling: Digitizing the coordinate values.

Quantization: Digitizing the amplitude values.

– 8 bit quantization: 28 =256 gray levels (0: black, 255: white)

– Binary (1 bit quantization):2 gray levels (0: black, 1: white)

Commonly used number of samples (resolution)

– Digital still cameras: 640x480, 1024x1024, up to 4064 x 2704

– Digital video cameras: 640x480 at 30 frames/second

1920x1080 at 60 f/s (HDTV)

Page 6: Lecture 3 Digital Image Fundamentals Dr. Arslan Shaukat · PDF fileDigital Image Fundamentals Dr. Arslan Shaukat ... Image Sampling and Quantization ... –Binary (1 bit quantization)

Sampling and Quantization

Page 7: Lecture 3 Digital Image Fundamentals Dr. Arslan Shaukat · PDF fileDigital Image Fundamentals Dr. Arslan Shaukat ... Image Sampling and Quantization ... –Binary (1 bit quantization)

Sampling and Quantization

Page 8: Lecture 3 Digital Image Fundamentals Dr. Arslan Shaukat · PDF fileDigital Image Fundamentals Dr. Arslan Shaukat ... Image Sampling and Quantization ... –Binary (1 bit quantization)

Digital Image Representation

N: No. of Columns

M: No. of Rows

Page 9: Lecture 3 Digital Image Fundamentals Dr. Arslan Shaukat · PDF fileDigital Image Fundamentals Dr. Arslan Shaukat ... Image Sampling and Quantization ... –Binary (1 bit quantization)

Digital Image Representation

L intensity or gray-levels

– L = 2k

– K-bit image

– Integer values [0, L-1]

– Dynamic Range

• Range of values spanned by the

gray scale

Page 10: Lecture 3 Digital Image Fundamentals Dr. Arslan Shaukat · PDF fileDigital Image Fundamentals Dr. Arslan Shaukat ... Image Sampling and Quantization ... –Binary (1 bit quantization)

Digital Image Representation

Number of bits required to store a digitized image

b = M x N x k

When M = N

b = N2k

Page 11: Lecture 3 Digital Image Fundamentals Dr. Arslan Shaukat · PDF fileDigital Image Fundamentals Dr. Arslan Shaukat ... Image Sampling and Quantization ... –Binary (1 bit quantization)

Spatial Resolution

– Smallest discernible detail in an image

– Defined by spatial sampling interval

– Dots (pixels) per unit distance or dots per inch (DPI) is a

measure of image resolution

Intensity Resolution

– Defined by the intensity quantization

– Number of gray levels is usually an integer power of 2

– Image whose intensity is quantized into 256 levels has 8 bits of

intensity resolution

Resolution

Page 12: Lecture 3 Digital Image Fundamentals Dr. Arslan Shaukat · PDF fileDigital Image Fundamentals Dr. Arslan Shaukat ... Image Sampling and Quantization ... –Binary (1 bit quantization)

Effects of Reducing Spatial Resolution

Page 13: Lecture 3 Digital Image Fundamentals Dr. Arslan Shaukat · PDF fileDigital Image Fundamentals Dr. Arslan Shaukat ... Image Sampling and Quantization ... –Binary (1 bit quantization)

Effect of reducing

Intensity Resolution

Page 14: Lecture 3 Digital Image Fundamentals Dr. Arslan Shaukat · PDF fileDigital Image Fundamentals Dr. Arslan Shaukat ... Image Sampling and Quantization ... –Binary (1 bit quantization)

Effect of reducing

Intensity Resolution

Page 15: Lecture 3 Digital Image Fundamentals Dr. Arslan Shaukat · PDF fileDigital Image Fundamentals Dr. Arslan Shaukat ... Image Sampling and Quantization ... –Binary (1 bit quantization)

Level of Details

Page 16: Lecture 3 Digital Image Fundamentals Dr. Arslan Shaukat · PDF fileDigital Image Fundamentals Dr. Arslan Shaukat ... Image Sampling and Quantization ... –Binary (1 bit quantization)

Required in image resizing such as shrinking and

zooming

Using known data to estimate data at unknown points

Interpolation

Page 17: Lecture 3 Digital Image Fundamentals Dr. Arslan Shaukat · PDF fileDigital Image Fundamentals Dr. Arslan Shaukat ... Image Sampling and Quantization ... –Binary (1 bit quantization)

Simply replicate the value from neighboring pixels

Nearest Neighbor Interpolation

1 0 1

1 1 0

1 0 1

1 0 1

1 1 0

1 0 1

Page 18: Lecture 3 Digital Image Fundamentals Dr. Arslan Shaukat · PDF fileDigital Image Fundamentals Dr. Arslan Shaukat ... Image Sampling and Quantization ... –Binary (1 bit quantization)

Severe distortion of straight edges

Nearest Neighbor Interpolation

1 0 1

1 1 0

1 0 1

1 1 0 0 0 1 1

1 1 0 0 0 1 1

1 1 1 1 1 0 0

1 1 1 1 1 0 0

1 1 1 1 1 0 0

1 1 0 0 0 1 1

1 1 0 0 0 1 1