You are on page 1of 52

Digital Image Processing

Digital Image Processing


Digital Image Fundamentals

S. G. Lakhdive, Head, Dept. of Computer Science,

Prof. Ramkrishna More College, Akurdi, Pune

Digital Image Processing

Outline

Structure of the human eye


Image formation in the human eye Brightness adaptation and discrimination

Digital Image Processing

Human and Computer Vision

We cant think of image processing without considering the human vision system. We observe and evaluate the images that we process with our visual system. Without taking this elementary fact into consideration, we may be much misled in the interpretation of images.

Digital Image Processing

Structure of the human eye

Digital Image Processing

Structure of the human eye

The cornea and sclera outer cover


The choroid
Ciliary body Iris Lens

The retina (two kinds of receptors)


Cones vision (photopic/bright-light vision) : centered at fovea, highly sensitive to color Rods (scotopic/dim-light vision) : general view Blind spot
6

Digital Image Processing

Lens & Retina

Lens : both infrared and ultraviolet light are absorbed


appreciably by proteins within the lens structure and, in excessive amounts, can cause damage to the eye.

Retina : Innermost membrane of the eye which lines


inside of the walls entire posterior portion. When the eye is properly focused, light from an object outside the eye is imaged on the retina.

Digital Image Processing

Receptors

Pattern vision is afforded by the distribution of discrete light receptors over the surface of the retina.

Receptors are divided into 2 classes:


Cones Rods

Digital Image Processing

Cones 6-7 million, located primarily in the central portion of the retina (the fovea, muscles controlling the eye rotate the eyeball until the image falls on the fovea)
Highly sensitive to color. Each is connected to its own nerve end thus human can resolve fine details. Cone vision is called photopic or bright-light vision.

Digital Image Processing

Rods

75-150 million, distributed over the retina surface.


Several rods are connected to a single nerve end reduce the amount of detail discernible.

Serve to give a general, overall picture of the field of view.


Sensitive to low levels of illumination.

Rod vision is called scotopic or dim-light vision.

10

Digital Image Processing

11

Digital Image Processing

Cross Section Right eye

12

Digital Image Processing

Image formation in the human eye

Radiant Energy

Light Receptor

Brain

13

Digital Image Processing

Brightness adaptation

Dynamic range of human visual system: 10-6~104 mL (millilambert)


Can not accomplish this range simultaneously

The current sensitivity level of the visual system is called brightness adaptation level

14

Digital Image Processing

Brightness adaptation

15

Digital Image Processing

Digital Image Processing

Brightness discrimination

Weber ratio (the experiment) : I C / I


I: the background illumination

I C : the increment of illumination


Small Weber ratio indicates good discrimination Larger Weber ratio indicates poor discrimination Weber's Law states that the ratio of the increment threshold to the background intensity is a constant. So when you are in a noisy environment you must shout to be heard while a whisper works in a quiet room. And when you measure increment thresholds on various intensity backgrounds, the thresholds increase in proportion to the background.
17

Digital Image Processing

Brightness discrimination

18

Digital Image Processing

Psycho-visual effects

The perceived brightness is not a simple function of intensity


Mach band pattern Simultaneous contrast Optical illusion

19

Digital Image Processing

Mach band pattern

20

Digital Image Processing

Simultaneous contrast

21

Digital Image Processing

Optical illusion

22

Digital Image Processing

Optical illusion

23

Digital Image Processing

Optical illusion

24

Digital Image Processing


Sampling, Quantization and Other Simple Operations

Digital Image Processing

Sampling, Quantization, and Operations Outline

Digital image representation


Image formation model Uniform sampling

Uniform quantization
Relationships between pixels

26

Digital Image Processing

Digital Image Representation

A digital image is an image f(x,y) that has been digitized both in spatial coordinates and brightness.
The value of f at any point (x,y) is proportional to the brightness (or gray level) of the image at that point. A digital image can be considered a matrix whose row and column indices identify a point in the image and the corresponding matrix element value identifies the gray level at that point.

Digital Image Processing

Digital Image Representation

Pixel values in highlighted region

CAMERA =>

DIGITIZER

=>A set of number in 2D grid

Samples the analog data and digitizes it.

Digital Image Processing

Sampling, Quantization and Other Simple Operations Image Formation Model


Monochrome image
Illumination:
f x, y may be characterized by two components : i x, y
r x, y

Reflectance:

f x, y i x, y r x, y 0 i x, y
0 f x, y

0 r x, y 1

Typical values of the illumination and reflectance:


Illumination: sun on earth: 90,000 lm/m2 on a sunny day; 10,000 lm/m2 on a cloud day; moon on clear evening: 0.1 lm/m2; in a commercial office is about 1000 lm/m2 Reflectance: 0.01 for black velvet, 0.65 for stainless steel, 0.80 for flat-white wall paint, 0.90 for silver-plated metal, and 0.93 for snow
29

Digital Image Processing

30

Digital Image Processing

Sampling, Quantization, and Operations Uniform sampling and quantization


Sampling
digitalized in spatial domain

Quantization
digitalized in amplitude

31

Digital Image Processing

Sampling, Quantization, and Operations Uniform sampling and quantization

32

Digital Image Processing

Sampling, Quantization, and Operations Digital image representation

33

Digital Image Processing

Sampling, Quantization, and Operations Image resolution

Spatial resolution : It is a measure of smallest discernible details in an image. The more pixels in a fixed range, the higher the resolution
Gray-level resolution : the more bits, the higher the resolution

34

Digital Image Processing

Gray level

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 L min <= l <= L max Where Lmin is positive and Lmax is finite. gray scale = [Lmin, Lmax]

0 = black , L = white

Digital Image Processing

Number of bits

The number of gray levels typically is an integer power of 2 L = 2k


Number of bits required to store a digitized image b=MxNxk

Digital Image Processing

Resolution

Resolution (how much you can see the detail of the image) depends on sampling and graylevels.
the bigger the sampling rate (n) and the gray

scale (g), the better the approximation of the


digitized image from the original.

Digital Image Processing

Checkerboard effect

(a) 1024x1024
(b) 512x512 (c) 256x256

(d) 128x128
(e) 64x64 (f) 32x32

if the resolution is decreased too much, the checkerboard effect can occur.

Digital Image Processing

False contouring

a) Gray level = 16
b) Gray level = 8 c) Gray level = 4 d) Gray level = 2 if the gray scale is not enough, the smooth area will be affected. False contouring can occur on the smooth area which has fine gray scales.

Digital Image Processing

Sampling, Quantization, and Operations Image zooming and shrinking

Both applied to digital image


Zooming
Creation of new pixel locations

Assignment of gray levels to those new locations


Pixel replication, when increasing the size of an image an integer times

Shrinking

40

Digital Image Processing

Neighbors of a pixel Neighbors of pixel are the pixels that are adjacent pixels of an identified pixel.
Each pixel is a unit distance from the particular pixel. Some of the neighbors of pixel lie outside the digital image if its position is on the border of the image.

Pixel at coordinate (column x, row y) can be represented by f(x,y)


0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Digital Image Processing

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Pixel at the 7th column and 4th row is yellow color

Zoom 1600%

4-neighbors of pixel

Digital Image Processing

4-neighbors of pixel is denoted by N4(p)


It is set of horizontal and vertical neighbors (x-1) (x) (x+1) (y-1) (y)

(y+1)

f(x,y) is a yellow circle f(x,y-1) is top one f(x-1,y) is left one f(x+1,y) is right one f(x,y+1) is bottom one

Diagonal neighbors of pixel

Digital Image Processing

Diagonal neighbors of pixel is denoted by ND(p)


It is set of diagonal neighbors (x-1) (x) (x+1) f(x,y) is a yellow circle f(x-1,y-1) is top-left one (y-1) f(x+1,y-1) is top-right one (y) f(x-1,y+1) is bottom-left one f(x+1,y+1) is bottom-right one (y+1)

8-neighbors of pixel

Digital Image Processing

8-neighbors of pixel is denoted by N8(p)


4-neighbors and Diagonal neighbors of pixel
(x-1) (x) (x+1) (y-1) (y)

(y+1)

f(x,y) is a yellow circle (x-1,y-1), (x,y-1),(x+1,y-1), (x-1,y), (x,y), (x+1,y), (x-1,y+1),(x,y+1), (x+1,y+1)

Connectivity

Digital Image Processing

Establishing boundaries of objects and components of regions in an image.


Group the same region by assumption that the pixels being the same color or equal intensity will are the same region

Connectivity

Digital Image Processing

Let C is the set of colors used to define


There are three type of connectivity:
4-Connectivity : 2 pixels (p and q) with value in C are 4-connectivity if q is in the set N4(p)

8-Connectivity : 2 pixels (p and q) with value in C are 8-connectivity if q is in the set N8(p)
M-Connectivity : 2 pixels (p and q) with value in C are 8-connectivity if
(i)
(ii)

Q is in N4(p), or
Q is in ND(p) and the set N4(p) N4(q) has no pixels whose value are from V

Digital Image Processing

Sampling, Quantization, and Operations Relationships between pixels


m-adjacency

48

Digital Image Processing

49

Digital Image Processing

Distance Measure

For pixels p, q, and z, with coordinates (x,y), (s,t) and (u,v) respectively, D is a distance function or metric if
(a) (b) (c) (d) D(p,q) 0 and D(p,q) = 0 iff p = q and D(p,q) = D(q,p) and D(p,z) D(p,q) + D(q,z)

Digital Image Processing

The D4 Distance Also called city-block distance


Calculate between p and q is defined as D4(p,q) = | x- s | + | y - t |
2 2 2 1 2 1 0 1 2 2 1 2 2

Digital Image Processing

The D8 Distance

Also called chessboard distance


Calculate between p and q is defined as D8(p,q) = max(| x - s |,| y - t |)
2 2 2 2 2 2 1 1 1 2 2 1 0 1 2 2 1 1 1 2 2 2 2 2 2

You might also like