Lect1 DIP

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

Digital Image Processing

Lecture 1
Course Objectives
◦ Digital images are everywhere in almost every field
and its use is growing day by day
◦ Image processing is used in various ways in our daily
life. It has wide range of applications in various
fields like environment, agriculture, military, industry
and medical science etc
◦ Therefore, acquiring skill set of image signals
processing is an very important for engineering
students
◦ This course aims for developing aforesaid skill set
among students
Books
Rafael C. Gonzales & Richard E. Woods,
Digital Image Processing, 4th Edition,
Pearson Education
Handouts on Image Processing (Provided
by Instructor)
Course Grading (1/2)
Sessionals 20%
Mid-Semester Exam 20%
Course Project 20%
End-Semester Exam 40%
Course Grading (2/2)
Sessionals marks description
◦ Quizzes -> 10 marks
 4 Quizzes ( 2 pre-mid and 2 post-mid)
 5 Quizzes (for PhD)
◦ Assignments -> 10 marks
 Assignments and seminars (2 for MSc
& 3 for PhD)
Course Project -> 20 Marks
Tentative Lecture Plan
Week # Topics
1 Course Introduction & Grading Criteria, Basics
of Image Processing
2 Fundamentals of Image Processing – I
3 Fundamentals of Image Processing – II
4 Image Enhancement Methods, Quiz–1
5 Image Coding
6 Lossless Image Coding – II
7 Seminar –1
8 Lossless Image Coding-II, Quiz–2
Tentative Lecture Plan
Week # Topics
9 Lossy Image Coding – I
10 Lossy Image Coding – II
11 JPEG – Lossless Image Standard
12 Morphological Image Processing &
Segmentation
13 Color Image Processing, Video Processing –
Extension of Images
14 Seminar-II
15 Selected Topic in Image Processing (from
industry)
16 Course Project, Quiz-4 and Revision
Why Research Paper Presentation?
Fundamentals of Image Processing
What is Digital Image Processing?

 An image may be defined as a two-dimensional function, f (x, y)


◦ where x and y are spatial (plane) coordinates, and
◦ amplitude of f at any pair of coordinates (x, y) is called the
intensity or gray level of the image at that point
 Digital image
◦ when x, y, and the intensity values of f are all finite, discrete
quantities
 The field of digital image processing refers to
◦ Processing digital images by means of a digital computer
 Note that a digital image is composed of a finite number of
elements, each of which has a particular location and value
◦ These elements are called picture elements, image elements,
pels, and pixels
What is Digital Image Processing?
 Images play the single most important role in human
perception
 Imaging machines cover almost the entire electromagnetic
(EM) spectrum, ranging from gamma to radio waves
◦ These include ultrasound, electron microscopy, and computer-
generated images
 No general agreement among authors regarding
◦ where image processing stops and other related areas, such as
image analysis (also called image understanding) and computer
vision, start
◦ no clear-cut boundaries in the continuum from image processing
at one end to computer vision at the other
 Note that computer vision use computers to
◦ emulate human vision including learning and being able to make
Useful Paradigm – Image Processing
Model
 Considerthree types of computerized processes in this
continuum: low-, mid-, and high-level processes
 Low-level Processes
◦ Image pre-processing to reduce noise, contrast enhancement, & image
sharpening
◦ Can be characterized by the fact that both its inputs & outputs are
images
 Mid-level processes
◦ Involves segmentation, description of objects to reduce them to a form
suitable for computer processing, recognition of individual objects
◦ Generally inputs are images and outputs are attributes extracted from
those images. E.g., edges, contours, identity of individual objects
 High-level Processes
◦ Involves “making-sense” of a recognized objects, as an image analysis
◦ Performing the cognitive tasks associated with vision
Examples – Three types of Processes
Examples – Three types of Processes
Examples – Three types of Processes
Examples – Three types of Processes

Left: Image. Middle: Sub-image


Right: Correlation of coefficient of left & middle images
Note that the highest (brighter) point in right image occurs
when sub-image at middle is coincident with the letter D
Another Illustration for Concepts
Clarification
 Consider the area of automated analysis of text
 Scope of Digital Image Processing
◦ The processes of acquiring an image of the area
containing the text
◦ preprocessing that image
◦ extracting (segmenting) the individual characters
◦ describing the characters in a form suitable for computer
processing
◦ recognizing those individual characters
 Domain of image analysis and even computer vision
◦ Making sense of the content of the page depending on the
level of complexity implied
Fundamental Steps in Digital Image
Processing (1/3)
 Image acquisition
◦ acquisition could be as simple as being given an image that is
already in digital form
◦ generally image acquisition stage involves preprocessing, such as
scaling
 Image enhancement
◦ process of manipulating an image so the result is more suitable
than the original for a specific application
◦ when an image is processed for visual interpretation, the viewer is
the ultimate judge of how well a particular method works
 Image restoration
◦ deals with improving the appearance of an image
◦ restoration techniques tend to be based on mathematical or
probabilistic models of image degradation
Fundamental Steps in Digital Image
Processing (2/3)
 Color image processing
◦ gaining in importance due to significant increase in the use of digital images
over the internet
◦ color is also used as the basis for extracting features of interest in an image
 Wavelets used
◦ to represent images in various degrees of resolution & employed in image data
compression
◦ for pyramidal representation in which images are subdivided successively into
smaller regions
 Compression deals with techniques
◦ for reducing the storage required to save an image, or the bandwidth required to
transmit it
◦ although storage technology has improved significantly over the past decade, the
same cannot be said for transmission capacity
 Morphological processing deals with
◦ tools for extracting image components that are useful in the representation and
description of shape
Fundamental Steps in Digital Image Processing (3/3)

 Segmentation partitions
◦ image into its constituent parts or objects
◦ more accurate the segmentation, the more likely automated object
classification to succeed
 Feature extraction consists of feature detection and feature
description
◦ Feature detection refers to finding the features in an image, region,
or boundary
◦ Feature description assigns quantitative attributes to the detected
features
◦ For example, we might detect corners in a region, and describe
those corners by their orientation and location; both of these
descriptors are quantitative attributes
 Image pattern classification
◦ process that assigns a label (e.g., “vehicle”) to an object based on
Digital Video Processing
 Main application of digital video processing
◦ Provide high-quality visible-light videos for human consumption
 Digital video processing encompasses many approaches
that derive from
◦ Principles of digital image processing.
 Bestto become conversant in the techniques of digital
image processing before
◦ embarking on the study of digital video processing
 One aspect of video processing that distinguishes it from
still image processing. It is Motion
◦ It is handled with motion estimation algorithms
◦ First step in video processing algorithms in which movement of
intensities is estimated
Elements of Visual Perception
Digital image processing is built on foundation
of mathematics however
◦ Human intuition* and analysis often play a role in
the choice of one technique over another &
◦ This choice of often made on subjective, visual
judgments
Therefore, understanding of basic
characteristics of human visual perception is
necessary

*the ability to understand something instinctively, without the need for


conscious reasoning
Cross Section of Human Eye
• Eye: Sphere, diameter of 20
mm
• Consists of 3 membranes:
1. Cornea and sclera
2. Choroid
3. Retina
• Cornea: transparent
• Sclera: opaque, connected to
cornea
• Choroid: network of blood
vessels In front choroid is connected to iris
diaphragm
• Iris: contracts or expands to control
amount of light
• Pupil: central opening of iris, 2 to 8
mm in diameter
Human Eye Structure(1/3)
Lens
◦ Focuses light on retina
◦ Contains 60% to 70% water
◦ Absorbs 8% of visible light
◦ High absorption in infrared and ultraviolet (can cause
damage to eye)
Retina
◦ The inner most layer, covers the posteriori portion of
eye
◦ When eye is properly focused, light from an object is
imaged on the retina
◦ Light receptors are distributed over the surface of
Human Eye Structure(2/3)
Retina contains light receptors: Cones &
Rods
Cones
◦ 6 to 7 million
◦ located mainly in central part of retina (fovea)
◦ Sensitive to color
◦ Can resolve fine details because each one is
connected to its nerve
◦ Cone vision: photopic or bright-light
 Rods
◦ 75 to 150 million
◦ No color vision, responsible for lowlight vision
◦ Distributed a wide region on the retina
Distribution of Rods & Cones in Retina

Distribution of rods and cones in retina


Human Eye Structure(3/3)
Blind spot
◦ A region of retina without receptors, optic nerves go
through this part
Fovea
◦ A circular area of about 1.5 mm in diameter
A comparison between eye (fovea) and a CCD
camera:
◦ Fovea – region of highest acuity has about 265,000
elements
◦ A medium resolution CCD chip has the same
number of elements in a 7mm x 7mm area.
Image Formation in the Eye
In Eye, Lens is flexible
◦ Refraction of lens is controlled by its
thickness
◦ Thickness is controlled by the tension of
muscles connected to the lens
Focus on distant objects
◦ Lens is relatively flattened, refractive power
is minimum
Focus on near objects
◦ Lens is thicker, refractive power is maximum
Eye looking at a Palm Tree:
Point C is optical center of the lens

- Height of object in retinal image (mm)


= (height of object (m) / distance of object from eye (m)) * focal length (mm)
- Perception takes place by the relative excitation of light receptors,
which transform radiant energy into electrical impulses that are
ultimately decoded by the brain
Review Question –
Image Formation in Eye
Suppose that a person is looking at a tree of 15
m high at a distance of 100 m as shown on
figure in previous slide.
(a) Find the height of object in retinal image?
(b) Change the height from 15 m to 30 m and find
height of object in retinal image?
(c) Change distance from 100 m to 200 m by
keeping height same as of (a) and find height of
object in retinal image?
(d) Discuss the impact on retinal image by
changing height and distance.
Brightness Adaptation and Discrimination
 The dynamic range* of light intensity to which eye can adapt
is enormous – (on the order of 1010)- from the scotopic
threshold to the glare limit
 HVS can not operate over the entire range simultaneously
◦ It accomplishes large variations by changing its overall sensitivity, a
phenomenon known as brightness adaptation
◦ Ability of the eye to discriminate between changes in brightness at
any specific adaptation level
 Brightness (light perceived by visual system) is a logarithmic
function of light intensity

*Dynamic Range: ratio between the largest and smallest values that a certain quantity
can assume. It is often used in context of signals like light and sound
Example: Perceived brightness is not a simple
function of intensity

• Humans perceive brightness patterns strongly scalloped near


boundaries
• These perceived scalloped bands are called Mach bands
Example: Simultaneous Contrast

Which inner square has more intensity?

All the inner squares have same intensity, but they appear
progressively darker as the background becomes lighter
Optical Illusion- Eye fills in non-existing details or
wrongly perceives geometrical properties of objects

Comment
on
each
figure that
what did
you
perceive?
Light & Electromagnetic Spectrum
 Achromatic or monochromatic light
◦ light that is void of color
◦ The only attribute for such light is intensity or amount
 Grey level
◦ Used to describe monochromatic intensity as it ranges
from black to grays & finally to white
◦ Chromatic light spans the electromagnetic spectrum
from 0.43μm ~ 0.79μm (approx)
 Three basic quantities are used to describe quality of
chromatic light source
◦ Radiance: Total amount of energy that flows from a
light source, measured in watts
◦ Luminance: measures amount of energy an observer
perceives from a light source, measured in lumens
◦ Brightness: subjective descriptor of light perception. It
embodies achromatic notion of intensity
Sensors and Electromagnetic Spectrum

To image events of interest in certain band


◦ Need to develop a sensor that is capable of
detecting energy radiated in that band
◦ However, wavelength of an electromagnetic wave
required to “see” an object must be of same size,
or smaller than the object
For example: a water molecule has a diameter
of the order 10-10m
Practice Question
When you enter a dark theater in a bright
day, it takes an appreciable interval of time
before you can see well enough to find an
empty seat. Which of the visual processes
explained in section (you learned in today's
lecture) is at play in this situation?

 Brightness adaptation
Image Sensing & Acquisition
Digital Image formation
 sensors are used to transform illumination energy
into digital images
 Incoming energy is transformed into voltage by the
combination of electrical power & sensor material
that is responsive to particular energy being
detected
 The output voltage waveform is the response of
sensor (s)
 Digital quantity is obtained from each sensor by
digitizing its response
Image Acquisition using Single Sensing Element

 Figure shows components of a sensor


◦ Most familiar example is of photodiode,
whose output voltage waveform is
proportional to light
◦ Use of filter in front of sensor improves
selectivity.
◦ For example: an optical green-transmission
filter favors light in green band of spectrum
 2-Dimage generation using a single
sensor
◦ There must be relative displacement in both x-
and y-directions between the sensor & area to
be imaged
◦ Figure below shows an arrangement used in
high-precision area to be imaged
◦ Here, film negative is mounted onto drum
whose mechanical rotation provides
displacement in one direction
Image Acquisition using Linear Sensor
Strip
 Motion perpendicular to
strip provide imaging on
other direction as shown in
figure
 Sensing devices with 4000
or more in-line sensors are
possible
 Imaging strip gives one line
of an image at a time
 Motion of strip completes
other dimension of a 2-D
image
 Lenses can be used to
project the area to be
scanned onto the sensors
 E.g., used in most flat bed
scanners & airborne imaging
system
Image Acquisition using Circular Sensor
Strip
 Used to obtain cross-
sectional (“slice”) images of
3-D objects as shown in
figure
 A rotating X-ray source
provides illumination &
portion of sensors opposite
to source collect the X-ray
energy that pass through
the object
 Basis for medical &
industrial computerized
axial tomography (CAT)
 Output of sensors must be
processed by reconstruction
algorithms to transform the
data into meaningful cross-
sectional images
 Applications are CAT, MRI
Image Acquisition using Sensor Arrays
Numerous electromagnetic & ultrasonic
sensing devices are arranged in an array format
◦ Predominant arrangement found in digital cameras
Response of each sensor is proportional to
integral of light energy projected onto the
surface of sensor
Complete image can be obtain by focusing the
energy pattern onto the surface of the array
Example: Digital Image
Acquisition

 Energy from illumination source is reflected from scene


 Incoming energy is collected & focused on image plane: Front end
of imaging system is lens that projects the viewed scene on focal
plane of lens
 Sensor array produces output proportional to integral of light
received at each sensor
 Digital & analog circuitry sweeps these outputs & convert them to
analog signal which is then digitized
A Simple Image Formation Model
Image - two dimensional light intensity function, denoted by
f(x,y) , where the value or amplitude of f at spatial coordinates
(x,y) gives the intensity (brightness) of the image at that point.

Perception of an object : Light reflected from that object

f(x,y) can be characterized by two components


1. The amount of source light incident on the scene being
viewed - Illumination component - i(x,y)
2. Amount of light reflected by the objects in the scene -
Reflectance component - r(x,y)
f ( x, y )  i ( x, y ) r ( x, y )
0  i ( x, y )  
0  r ( x, y )  1
A Simple Image Formation Model
Reflectance is bounded by 0 (total absorption) and 1 (total
reflectance)

The nature of i(x,y) is determined by the light source and r(x,y)


is determined by the characteristics of the objects in a scene.

i(x,y): Typical values of r(x,y)


Clear Day – 90,000 lm/m2 Black Velvet - 0. 1
Cloudy day – 10,000 lm/m2 Stainless Steel - 0.65
Full moon - 0.1 lm/m2 Flat-White wall paint - 0.80
commercial office - 1000 lm/m2 Silver plated metal - 0.90
Snow - 0.93

Grey Level (l) at point (x,y)


- Intensity of monochrome image f at coordinates (x,y)
A Simple Image Formation Model
 Let the intensity (gray level) of monochrome image
any coordinates (x,y) be denoted by l = f(x,y)
 From previous equations (of image formation model),
it is evident that l lies in the range
Lmin ≤ l ≤ Lmax
 In theory: Lmin is be non-negative & Lmax to be finite.
Practically, Lmin = iminrmin and Lmax = imaxrmax
 For example: using typical indoor office illumination
and reflectance values, Lmin = 10 and Lmax = 1000
 Interval [Lmin, Lmax] is called intensity (gray) scale.
Summary – Image Formation
Physical processes involved in image
formation
◦ Light emitted from a source
◦ Interaction of light and a surface
◦ Incidence of light on the sensor
◦ Conversion of sensor output to discrete
representation: the image
Summary – Representing Digital Images
 Digital images are record of energy (light) emitted from a
particular scene in the world stored in computer memory

World Optics Sensor Signal

Digitizer Digital Representation


 World: reality
 Optics: focus light from world onto sensor
 Sensor: convert light to electrical energy
 Signal: representation of incident light as continuous electrical
energy
 Digitizer: converts continuous signal to discrete signal
 Digital Rep.: final representation of reality in computer memory
Image Formation
Practice Question
A CCD camera chip of dimensions 7 x 7 mm,
and having 1024 x 1024 elements is focused
on a square, flat area, located 0.5m away.
How many line pairs per mm will this camera
will be able to resolve? The camera is
equipped with a 35-mm lens. (Hint: Model the
image process (as you studied in eye image
formation*) with focal length of camera lens
substituting for the focal length of eye.)
*Height of object in retinal image / focal length = height of
object / distance of object from eye
Solution – Practice Question
Using formula :
◦ 7mm / 35mm = h/500mm => h = 100 mm
◦ Therefore, target size is 100 mm on the side
As we have 1024 elements per line, so
resolution of 1 line is
◦ 1024 / 100 = 10 elements/mm
For line pairs (lp), we divide it by 2, giving
answer
◦ 5 lp/mm
0.5m = 500mm
Practice Question
 An automobile manufacturer is automating the
placement of certain components on the bumpers of
limited-edition line of sports cars. The components are
color coordinated, so robots need to know the color of
each car in order to select the appropriate bumper
component. Models only come in four colors: blue,
green , red and white. You are hired to propose a
solution based on imaging. How would you solve the
problem of automatically determining the color of each
car, keeping in mind that cost is the most important
consideration in your choice of components?
Answer – Practice Question
Equip monochrome camera with
mechanical device that places red, green
and blue pass filter in front of lens.
The strongest camera response determines
color
◦ If all three responses are approximately equal,
the color is white
Class Task
When was first camera invented?
What was the name of that camera?
Discuss working principal of that camera?
Cameras
 First camera was invented in 16th century.
 It used a pinhole to focus light rays onto a wall or
translucent plate.
 Pinholes were replaced by lenses as early as 1550.
 Light collected over the imaging surface produces a
photograph.
END
OF
LECTURE

You might also like