Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 48

CSCS365 - DIGITAL IMAGE PROCESSING

Lecture No 1
Introduction and Fundamentals
Elements of the Visual
Perception
The Human Eye

Elements of
Visual
Perception
Rods and Cones
Image Formation in the Eye
Image Formation in the Eye
From the Eye to the Brain

•How does our brain receive this information?


•Once the image is clearly focused on the sensitive part of the retina,
•energy in the light that makes up that image creates an electrical signal.
• Nerve impulses can then carry information about that image to the brain through the
optic nerve.
Retina: Contains specialized cells: (photo) receptors {converts light into electrical signals}
Rods – Black & White (Gray) images in low light (night)
Cones – Color Vision in bright light (day)
Direction of
Light
What happens when light reaches the retina?

The retina is packed with photosensitive cells


called rods and cones.
• Cones are the cells responsible for daylight
vision there are three different kinds – each
responding to a different wavelength of light
• One responds to red light, one to green
light and one to blue light.
• It is these cones which allow us to see in
colour and detail
• Rods, on the other hand, are responsible
for night vision.
• They are sensitive to light but not to
wavelength information (colour)
In darkness, the cones do not function at all– so
we need rods in order to see things even if it
is only in shades of grey
Rods and
Cones
BRIGHTNESS DISCRIMINATION AND ADAPTATION
• The ability of the eye to discriminate b/w
changes in brightness at any specific
adaptation level is of considerable
interest.
I • I is uniformly illuminated on a flat area
large enough to occupy the
Weber's ratio: Ic/I entire field of view.
• Ic is thechange in the object
Good brightness discrimination
 Ic/I is small. brightness required to just distinguish
the object from the background
Bad brightness discrimination
 Ic/I is large.

14
Interesting
Facts about
Human Vision
Interesting Facts About Human Vision
Optical Illusions
Image Sensing and
Acquisition
Image Acquisition
Sampling and Quantization

• Sampling:
• Digitization of the spatial coordinates (x,y)

• Quantization:
• Digitization in amplitude (also known as gray level quantization)

19
Sampling and Quantization

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

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

• Sampling
• Commonly used number of samples (resolution)

• Digital still cameras: 640x480, 1024x1024, 4064 x 2704


• Digital video cameras: 640x480 at 30 frames/second (fps)

20
Sampling and Quantization
Sampling and Quantization

A digital Image is an approximation of a real world scene

22
Image Formation

A Digital Image is an approximation of a real world scene

Sampling
23
Image Formation

A Digital Image is an approximation of a real world scene

Quantization
24
Digital Image
What is a digital image?

• Two-dimensional function f (x, y)


• Picture element/pixel
• Intensity or gray level
What is a Digital Image?
X

10 15

50
Y

28
What is a Digital Image
•  A digital Image is an array of Pixels
• Pixel is a picture element, quantifying the
“intensity” at that point
• Intensity values must lie within a range 10 15 15 12 10

10 50 53 48 10

10 48 47 10 10
• We call the intensity of a grayscale image f at 10 25 27 40 50
coordinate (), the gray level () of the image at
that point. 10 25 20 15 9
What is a Digital Image

a grid of squares,
1 pixel
each of which
contains a single
color

each square is
called a pixel (for
picture element)

29
Digital Color Image
Color images have 3 values per
pixel; monochrome images have
1 value per pixel.

a grid of squares,
each of which
contains a single
color

each square is
called a pixel (for
picture element)

30
Resolution

 Lower vs
Higher RESOLUTION

5 x 5 = 25 Pixels vs.
8 x 8 = 64 Pixels

15 10 10 10 10 15 15 10
10 15 15 12 10

10 50 53 48 10

10 48 47 10 10

10 25 27 40 50

10 25 20 15 9
Example
640 x 480 8-bit image

DIP Lecs By Dr M.Almas Anjum College of


E&ME
 Image Size
 Number of bits (b) required to store an
image of dimensions MxN

bMN
k Digital Image
 Image having 2k intensity levels
Representation
 k bit image
 E.g. 256 intensity levels  8 bit image

35
Representing a Digital Image No of bits
required to
store a digital
image
Spatial & Gray Level
Resolution
Resolution
• 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/Graylevel Resolution
• Defined by the intensity quantization
• Number of gray levels is usually an integer power of 2
• E.g. an image whose intensity is quantized into 256 levels has 8 bits of intensity
resolution
Spatial Resolution
• Intensity resolution refers to the number of

Intensity intensity levels used to represent the


image

(Gray) Level
• The more intensity levels used, the

finer the level of detail in an image

Resolution Intensity level resolution is usually


given in terms of the number of bits


used to store each intensity level
Number of
Number Examples
Intensity
of Bits
Levels

Intensity
1 2 0, 1
2 4 00, 01, 10, 11

(Gray) Level
4 16 0000, 0101, 1111
8 256 00110011, 01010101
16 65,536 1010101010101010
Resolution
Intensity (Gray) Level Resolution

40
Intensity (Gray) Level Resolution
256 grey levels (8 bits per pixel) 128 grey levels (7 bpp) 64 grey levels (6 bpp) 32 grey levels (5 bpp)

16 grey levels (4 bpp) 8 grey levels (3 bpp) 4 grey levels (2 bpp) 2 grey levels (1 bpp)
41
Resolution: How much is enough?

• How many samples and gray levels are required for a good approximation?
• Quality of an image depends on number of pixels and gray- level

number
• The more these parameters are increased, the closer the digitized

array approximates the original image


• But: Storage & processing requirements increase rapidly as a function of

N, M, and k

42
Image Resolutions 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)
Resolution: How much is enough?

• Depends on what is in the image and what you would like to do with it

44
Relationships Between
Pixels
Neighborhood of a Pixel
• Co-located in space –Not necessarily in intensity value
• N4(p) or 4-neighbors
• Set of horizontal and vertical neighbors
• (x+1,y), (x-1,y), (x,y+1), (x,y-1)
• ND(p) or diagonal neighbors
• Set of 4 diagonal neighbors
• (x+1,y+1), (x+1,y-1), (x-1,y+1), (x-1,y-1)
• N8(p) or 8-neighbors
• Union of N4(p) & ND(p)
Readings from Book (3rd
Edn.)

• Chapter 2
Read topics 2.1 to 2.4 from
the book
Acknowledgements
 Statistical Pattern Recognition: A Review – A.K Jain et al., PAMI (22) 2000
 Pattern Recognition and Analysis Course – A.K. Jain, MSU
 Pattern Classification” by Duda et al., John Wiley & Sons.
 Digital Image Processing”, Rafael C. Gonzalez & Richard E. Woods, Addison-Wesley, 2002
Material in these slides has been taken from, the following

 Machine Vision: Automated Visual Inspection and Robot Vision”, David Vernon, Prentice Hall, 1991
 www.eu.aibo.com/
 Advances in Human Computer Interaction, Shane Pinder, InTech, Austria, October 2008
 Dr. Usman Akram (CEME-NUST)
 Dr. Sidra Minhas (FCC)
resources

56

You might also like