0% found this document useful (0 votes)
25 views

Module 1 -21EC732

Uploaded by

nikitatenjarla14
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)
25 views

Module 1 -21EC732

Uploaded by

nikitatenjarla14
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/ 119

Digital Image Processing:

Introduction

M.RAJESWARI
[email protected]
Introduction

“One picture is worth more than ten thousand words”


Anonymous

2 Digital Image Processing-21EC732 -ETE 10/28/2024


References
` “Digital Image Processing”,
Rafael C. Gonzalez & Richard E. Woods,
Addison-Wesley, 2010
Much of the material that follows is taken from this book

“Fundamentals of Digital Image Processing”


Anil K. Jain,Edn-2001

“Digital Image Processing, Second Edition S


Jayaraman, S Esakkirajan, T Veerakumar, Tata
McGraw Hill, 2014

3 Digital Image Processing-21EC732 -ETE 10/28/2024


Contents
This lecture will cover:
 What is a digital image?
 What is digital image processing?
 History of digital image processing
 State of the art examples of digital image processing
 Key stages in digital image processing

4 Digital Image Processing-21EC732 -ETE 10/28/2024


What is an image?
 Image can be considered as a function, f
 f( x, y ) gives the intensity at position ( x, y )

5 Digital Image Processing-21EC732 -ETE 10/28/2024


What is a Digital Image?
A digital image is a representation of a two-dimensional
image as a finite set of digital values, called picture elements or
pixels

6 Digital Image Processing-21EC732 -ETE 10/28/2024


What is a Digital Image? (cont…)
Pixel values typically represent gray levels, colours, heights,
opacities etc
Remember digitization implies that a digital image is an
approximation of a real scene

1 pixel

7 Digital Image Processing-21EC732 -ETE 10/28/2024


What is a Digital Image? (cont…)
Common image formats include:
 1 sample per point (B&W or Grayscale)
 3 samples per point (Red, Green, and Blue)
 4 samples per point (Red, Green, Blue, and “Alpha”, a.k.a. Opacity)

For most of this course we will focus on grey-scale images

8 Digital Image Processing-21EC732 -ETE 10/28/2024


What is Digital Image Processing?
Digital image processing focuses on two major tasks
 Improvement of pictorial information for human interpretation
 Processing of image data for storage, transmission and
representation for autonomous machine perception
Some argument about where image processing ends and fields
such as image analysis and computer vision start

9 Digital Image Processing-21EC732 -ETE 10/28/2024


What is DIP? (cont…)
The continuum from image processing to computer vision can
be broken up into low-, mid- and high-level processes

Low Level Process Mid Level Process High Level Process


Input: Image Input: Image Input: Attributes Output:
Output: Image Output: Attributes Understanding
Examples: Noise removal, Examples: Object Examples: Scene
image sharpening recognition, segmentation understanding, autonomous
navigation

10 Digital Image Processing-21EC732 -ETE 10/28/2024


History of Digital Image Processing
Early 1920s: One of the first applications of digital imaging
was in the news-
paper industry
 The Bartlane cable picture
transmission service
Early digital image

 Images were transferred by submarine cable between London


and New York
 Pictures were coded for cable transfer and reconstructed at the
receiving end on a telegraph printer

11 Digital Image Processing-21EC732 -ETE 10/28/2024


History of DIP (cont…)
Mid to late 1920s: Improvements to the Bartlane system
resulted in higher quality images
 New reproduction
processes based
on photographic
techniques
 Increased number
of tones in
reproduced images
Improved
digital image Early 15 tone digital
image

12 Digital Image Processing-21EC732 -ETE 10/28/2024


History of DIP (cont…)
1960s: Improvements in computing technology and the onset
of the space race led to a surge of work in digital image
processing
 1964: Computers used to
improve the quality of
images of the moon taken
by the Ranger 7 probe
 Such techniques were used
in other space missions
including the Apollo landings

A picture of the moon taken


by the Ranger 7 probe
13 Digital Image Processing-21EC732 -ETE minutes before10/28/2024
landing
History of DIP (cont…)
1970s: Digital image processing begins to be used in medical
applications
 1979: Sir Godfrey N.
Hounsfield & Prof. Allan M.
Cormack share the Nobel
Prize in medicine for the
invention of tomography,
the technology behind
Computerised Axial
Tomography (CAT) scans
Typical head slice CAT
image

14 Digital Image Processing-21EC732 -ETE 10/28/2024


History of DIP (cont…)
1980s - Today: The use of digital image processing techniques
has exploded and they are now used for all kinds of tasks in all
kinds of areas
 Image enhancement/restoration
 Artistic effects
 Medical visualisation
 Industrial inspection
 Law enforcement
 Human computer interfaces

15 Digital Image Processing-21EC732 -ETE 10/28/2024


Examples: Image Enhancement
One of the most common uses of DIP techniques: improve
quality, remove noise etc

16 Digital Image Processing-21EC732 -ETE 10/28/2024


Examples: The Hubble Telescope
Launched in 1990 the Hubble
telescope can take images of
very distant objects
However, an incorrect mirror
made many of Hubble’s
images useless
Image processing
techniques were
used to fix this

17 Digital Image Processing-21EC732 -ETE 10/28/2024


Examples: Artistic Effects
Artistic effects are used to
make images more visually
appealing, to add special
effects and to make composite
images

18 Digital Image Processing-21EC732 -ETE 10/28/2024


Examples: Medicine
Take slice from MRI scan of canine heart, and find boundaries
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

between types of tissue


 Image with gray levels representing tissue density
 Use a suitable filter to highlight edges

19 Digital Image Processing-21EC732 -ETE 10/28/2024


Original MRI Image of a Dog Heart Edge Detection Image
Examples: GIS
Geographic Information Systems
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

 Digital image processing techniques are used extensively to


manipulate satellite imagery
 Terrain classification
 Meteorology

20 Digital Image Processing-21EC732 -ETE 10/28/2024


Examples: GIS (cont…)
Night-Time Lights of the World data
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

set
 Global inventory of human
settlement
 Not hard to imagine the kind of
analysis that might be done using
this data

21 Digital Image Processing-21EC732 -ETE 10/28/2024


Examples: Industrial Inspection
Human operators are expensive,
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

slow and
unreliable
Make machines do the
job instead
Industrial vision systems
are used in all kinds of industries
Can we trust them?

22 Digital Image Processing-21EC732 -ETE 10/28/2024


Examples: PCB Inspection
Printed Circuit Board (PCB) inspection
 Machine inspection is used to determine that all components
are present and that all solder joints are acceptable
 Both conventional imaging and x-ray imaging are used

23 Digital Image Processing-21EC732 -ETE 10/28/2024


Examples: Law Enforcement
Image processing techniques are
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

used extensively by law enforcers


 Number plate recognition for
speed cameras/automated toll
systems
 Fingerprint recognition
 Enhancement of CCTV images

24 Digital Image Processing-21EC732 -ETE 10/28/2024


Examples: HCI
Try to make human computer interfaces
more natural
 Face recognition
 Gesture recognition
Does anyone remember the
user interface from “Minority Report”?
These tasks can be extremely difficult

25 Digital Image Processing-21EC732 -ETE 10/28/2024


Research
 Emerging Technology
 Digitization of documents
 Digitization of images/photographs
 Biometrics
 Management of images on computers
 Other: manufacturing, military, games, …
 Research in Image Processing and Computer Vision
 Automatically Finding Faces and Cars
 Content-based Image Retrieval

26 Digital Image Processing-21EC732 -ETE 10/28/2024


Key Stages in Digital Image Processing
Image Morphological
Restoration Processing

Image
Segmentation
Enhancement

Image Object
Acquisition Recognition

Representation
Problem Domain
& Description
Colour Image Image
27 Processing
Digital Image Processing-21EC732 -ETE Compression 10/28/2024
Key Stages in Digital Image Processing:
Image Aquisition
Image Morphological
Restoration Processing

Image
Segmentation
Enhancement

Image Object
Acquisition Recognition

Representation
Problem Domain
& Description
Colour Image Image
28 Processing
Digital Image Processing-21EC732 -ETE Compression 10/28/2024
Key Stages in Digital Image Processing:
Image Enhancement
Image Morphological
Restoration Processing

Image
Segmentation
Enhancement

Image Object
Acquisition Recognition

Representation
Problem Domain
& Description
Colour Image Image
29 Processing
Digital Image Processing-21EC732 -ETE Compression 10/28/2024
Key Stages in Digital Image Processing:
Image Restoration
Image Morphological
Restoration Processing

Image
Segmentation
Enhancement

Image Object
Acquisition Recognition

Representation
Problem Domain
& Description
Colour Image Image
30 Processing
Digital Image Processing-21EC732 -ETE Compression 10/28/2024
Key Stages in Digital Image Processing:
Morphological Processing
Image Morphological
Restoration Processing

Image
Segmentation
Enhancement

Image Object
Acquisition Recognition

Representation
Problem Domain
& Description
Colour Image Image
31 Processing
Digital Image Processing-21EC732 -ETE Compression 10/28/2024
Key Stages in Digital Image Processing:
Segmentation
Image Morphological
Restoration Processing

Image
Segmentation
Enhancement

Image Object
Acquisition Recognition

Representation
Problem Domain
& Description
Colour Image Image
32 Processing
Digital Image Processing-21EC732 -ETE Compression 10/28/2024
Key Stages in Digital Image Processing:
Object Recognition
Image Morphological
Restoration Processing

Image
Segmentation
Enhancement

Image Object
Acquisition Recognition

Representation
Problem Domain
& Description
Colour Image Image
33 Processing
Digital Image Processing-21EC732 -ETE Compression 10/28/2024
Key Stages in Digital Image Processing:
Representation & Description
Image Morphological
Restoration Processing

Image
Segmentation
Enhancement

Image Object
Acquisition Recognition

Representation
Problem Domain
& Description
Colour Image Image
34 Processing
Digital Image Processing-21EC732 -ETE Compression 10/28/2024
Key Stages in Digital Image Processing:
Image Compression
Image Morphological
Restoration Processing

Image
Segmentation
Enhancement

Image Object
Acquisition Recognition

Representation
Problem Domain
& Description
Colour Image Image
35 Processing
Digital Image Processing-21EC732 -ETE Compression 10/28/2024
Key Stages in Digital Image Processing:
Colour Image Processing
Image Morphological
Restoration Processing

Image
Segmentation
Enhancement

Image Object
Acquisition Recognition

Representation
Problem Domain
& Description
Colour Image Image
36 Processing
Digital Image Processing-21EC732 -ETE Compression 10/28/2024
How are images represented
in the computer?

37 Digital Image Processing-21EC732 -ETE 10/28/2024


Components of DIP
Components of DIP

39 Digital Image Processing-21EC732 -ETE 10/28/2024


Components of DIP

 Image sensing, two elements are required to acquire digital images. The first is a physical
device that is sensitive to the energy radiated by the object we wish to image. The
second, called a digitizer, is a device for converting the output of the physical sensing device
into digital form. For instance, in a digital video camera, the sensors produce an
electrical output proportional to light intensity. The digitizer converts these outputs to
digital data
 Specialized image processing hardware consists of the digitizer plus hardware that performs
other primitive operations, such as an arithmetic logic unit (ALU), which performs
arithmetic and logical operations in parallel on entire images. One example of how an
ALU is used is in averaging images as quickly as they are digitized, for the purpose of
noise reduction. This type of hardware sometimes is called a front-end subsystem, and its
most distinguishing characteristic is speed. In other words, this unit performs functions
that require fast data throughputs (e.g., digitizing and averaging video images at 30
framess) that the typical main computer cannot handle.

40 Digital Image Processing-21EC732 -ETE 10/28/2024


Components of DIP
 The computer in an image processing system is a general-purpose computer and can range
from a PC to a supercomputer. In dedicated applications, sometimes specially designed
computers are used to achieve a required level of performance.
 Software for image processing consists of specialized modules that perform specific tasks. A
well-designed package also includes the capability for the user to write code that, as a
minimum, utilizes the specialized modules. More sophisticated software packages allow
the integration of those modules and general-purpose software commands from at least
one computer language.
 Mass storage capability is a must in image processing applications. An imageof size
1024*1024 pixels, in which the intensity of each pixel is an 8-bit quantity, requires one
megabyte of storage space if the image is not compressed. When dealing with thousands,
or even millions, of images, providing adequate storage in an image processing system
can be a challenge.

41 Digital Image Processing-21EC732 -ETE 10/28/2024


Components of DIP
 Digital storage for image processing applications falls into three principal categories: (1) short
term storage for use during processing, (2) on-line storage for relatively fast recall, and (3)
archival storage, characterized by infrequent access.
 One method of providing short-term storage is computer memory. Another is by specialized
boards, called frame buffers, that store one or more images and can be accessed rapidly, usually at
video rates (e.g., at 30 complete images per second).The latter method allows virtually
instantaneous image zoom, as well as scroll (vertical shifts) and pan (horizontal shifts). Frame buffers
usually are present in the specialized image processing hardware units.
 The key factor characterizing on-line storage is frequent access to the stored data. Finally,
archival storage is characterized by massive storage requirements but infrequent need for
access. Magnetic tapes and optical disks housed in “jukeboxes” are the usual media for archival
applications.

42 Digital Image Processing-21EC732 -ETE 10/28/2024


Components of DIP
 Image displays in use today are mainly color (preferably flat screen) TV monitors. Monitors
are driven by the outputs of image and graphics display cards that are an integral part of
the computer system. Seldom are there requirements for image display applications that
cannot be met by display cards available commercially as part of the computer system.
 Hardcopy devices for recording images include laser printers, film cameras, inkjet units,
and digital units, such as optical and CD-ROM disks. Film provides the highest possible
resolution, but paper is the obvious medium of choice for written material. For
presentations, images are displayed in a digital medium using image projection equipment
 Networking is almost a default function in any computer system in use today. Because of
the large amount of data inherent in image processing applications, the key consideration
in image transmission is bandwidth. In dedicated networks, this typically is not a problem,
but communication with remote sites via the Internet are not always as efficient.
Fortunately, this situation is improving quickly as a result of optical fiber and other
broadband technologies.

43 Digital Image Processing-21EC732 -ETE 10/28/2024


Components of DIP
 Networking is almost a default function in any computer system in use today.
Because of the large amount of data inherent in image processing applications,
the key consideration in image transmission is bandwidth. In dedicated
networks, this typically is not a problem, but communication with remote sites
via the Internet are not always as efficient. Fortunately, this situation is
improving quickly as a result of optical fiber and other broadband technologies.

44 Digital Image Processing-21EC732 -ETE 10/28/2024


Elements of Visual Perception
 Although the digital image processing field is built on a foundation of mathematical and
probabilistic formulations, human intuition and analysis play a central role in the choice
of one technique versus another, and this choice often is made based on subjective, visual
judgments
 The interest lies in the mechanics and parameters related to how images are formed in
the eye. The physical limitations of human vision in terms of factors that also are used
with digital images and factors such as how human and electronic imaging compare in
terms of resolution and ability to adapt to changes in illumination are also important
from a practical point of view.

45 Digital Image Processing-21EC732 -ETE 10/28/2024


Elements of Visual Perception

Cornea
Sclera
Choroid
Retina
Iris
Lens
Macula lutea
Fovea:
Blind spot
Rod
Cone

46 Digital Image Processing-21EC732 -ETE 10/28/2024


Elements of Visual Perception
 The eye is nearly a sphere, with an average diameter of approximately 20 mm. Three
membranes enclose the eye: the cornea and sclera outer cover; the choroid; and the retina.
 The cornea is a tough, transparent tissue that covers the anterior surface of the eye.
 The sclera is an opaque membrane that encloses the remainder of the optic globe.
 The choroid lies directly below the sclera. This membrane contains a network of blood vessels
that serve as the major source of nutrition to the eye..At its anterior extreme, the choroid is
divided into the ciliary body and the iris diaphragm.
 The central opening of the iris (the pupil) varies in diameter from approximately 2 to 8 mm. The
front of the iris contains the visible pigment of the eye, whereas the back contains a black
pigment.
 The lens is made up of concentric layers of fibrous cells and is suspended by fibers that attach to the
ciliary body. It contains 60 to 70%water, about 6%fat,and more protein than any other tissue
 The innermost membrane of the eye is the retina, which lines the inside of the wall’s entire
posterior portion.There are two classes of receptors: cones and rods.
47 Digital Image Processing-21EC732 -ETE 10/28/2024
Structure of the Human Eye
 Pattern vision is afforded by the distribution of discrete light
receptors over the surface of the retina.
 There are two classes of receptors: cones and rods.
 The number of cones in each eye: 6 to 7 millions
 The number of rods in each eye: 75 to 150 millions
 The cones is concentrated in the central portion of the retina (fovea).
 The rods are distributed over the retinal surface.
 Photopic (bright-light) vision: vision with cones
 color receptors, high resolution in the fovea, less sensitive to light
 Scotopic (dim-light) vision: vision with rods
 color blind, much more sensitive to light (night vision), lower resolution

48 Digital Image Processing-21EC732 -ETE 10/28/2024


Structure of the Human Eye

49 Digital Image Processing-21EC732 -ETE 10/28/2024


Structure of the Human Eye
 Figure 2.2 shows the density of rods and cones for a cross section of the right eye passing
through the region of emergence of the optic nerve from the eye.
 The absence of receptors in this area results in the so-called blind spot (see Fig. 2.1). Except
for this region, the distribution of receptors is radially symmetric about the fovea.
Receptor density is measured in degrees from the fovea
 The cones are most dense in the center of the retina (in the center area of the fovea).
Rods increase in density from the center out to approximately 20° off axis and then
decrease in density out to the extreme periphery of the retina
 the fovea as a square sensor array of size 1.5 mm*1.5 mm. The density of cones in that
area of the retina is approximately 150,000 elements per mm2. Based on these
approximations, the number of cones in the region of highest acuity in the eye is about
337,000 elements.Just in terms of raw resolving power, a charge-coupled device (CCD)
imaging chip of medium resolution can have this number of elements in a receptor array
no larger than 5 mm*5 mm.

50 Digital Image Processing-21EC732 -ETE 10/28/2024


Image formation
 There are two parts to the image formation process:

 The geometry of image formation, which determines


where in the image plane the projection of a point in the scene
will be located.

 The physics of light, which determines the brightness of a


point in the image plane as a function of illumination and
surface properties.

51 Digital Image Processing-21EC732 -ETE 10/28/2024


Pinhole camera
 This is the simplest device to form an image of a 3D scene on a 2D
surface.
 Straight rays of light pass through a “pinhole” and form an inverted
image of the object on the image plane.

fX
x
Z

fY
y
Z

52 Digital Image Processing-21EC732 -ETE 10/28/2024


Camera optics
 In practice, the aperture must be larger to admit more light.
 Lenses are placed in the aperture to focus the bundle of rays from
each scene point onto the corresponding point in the image plane

53 Digital Image Processing-21EC732 -ETE 10/28/2024


Physics of Light
f(x,y)=i(x,y)r(x,y)

where
1) i(x,y) the amount of illumination
incident to the scene
0  i ( x, y )  
2) r(x,y) the reflectance from the object

0  r ( x, y )  1
54 Digital Image Processing-21EC732 -ETE 10/28/2024
Image Formation in the Eye

 Focal length of the eye: 17 to 14 mm


 Let h be the height in mm of that object in the retinal image, then
15/100 = h / 17 , h = 2.55mm
 The retinal image is reflected primarily in the area of the fovea.

55 Digital Image Processing-21EC732 -ETE 10/28/2024


 The principal difference between the lens of the eye and an ordinary optical lens is that the
former is flexible.
 The distance between the center of the lens and the retina (called the focal length) varies from
approximately 17 mm to about 14 mm, as the refractive power of the lens increases from its
minimum to its maximum.
 When the eye focuses on an object farther away than about 3 m, the lens exhibits its lowest
refractive power.When the eye focuses on a nearby object, the lens is most strongly
refractive.This information makes it easy to calculate the size of the retinal image of any
object.
 In Fig. 2.3, for example, the observer is looking at a tree 15 m high at a distance of 100 m. If
h is the height in mm of that object in the retinal image, the geometry of Fig. 2.3 yields
15/100=h/17 or h=2.55 mm.
 Perception then takes place by the relative excitation of light receptors,which transform
radiant energy into electrical impulses that are ultimately decoded by the brain.

56 Digital Image Processing-21EC732 -ETE 10/28/2024


Brightness Adaptation and Discrimination

•The range of brightness that the eye can adapt to is


enormous, roughly around 1010 to 1.
•Photopic vision alone has a range of around 106 to 1.
•Brightness adaptation: example “ Ba”
•mL: millilambert

57 Digital Image Processing-21EC732 -ETE 10/28/2024


Brightness Adaptation and Discrimination

Because digital images are displayed as a discrete set of intensities, the eye’s ability to discriminate
between different intensity levels is an important consideration in presenting image-processing results.
The range of light intensity levels to which the human visual system can adapt is enormous—on the order
of 1010 .
Figure 2.4, a plot of light intensity versus subjective brightness, illustrates this characteristic. The long
solid curve represents the range of intensities to which the visual system can adapt. In photopic vision
alone, the range is about 106. The transition from scotopic to photopic vision is gradual over the
approximate range from 0.001 to 0.1 millilambert (–3 to –1 mL in the log scale),
The essential point in interpreting the impressive dynamic range depicted in Fig. 2.4 is that the visual
system cannot operate over such a range simultaneously.Rather, it accomplishes this large variation by
changes in its overall sensitivity,a phenomenon known as brightness adaptation. The total range of distinct
intensity levels it can discriminate simultaneously is rather small when compared with the total adaptation
range. For any given set of conditions, the current sensitivity level of the visual system is called the
brightness adaptation level, which may correspond, for example, to brightness Ba in Fig. 2.4.The short intersecting
curve represents the range of subjective brightness that the eye can perceive when adapted to this level.
This range is rather restricted, having a level Bb at and below which all stimuli are perceived as indistinguishable
blacks.
58 Digital Image Processing-21EC732 -ETE 10/28/2024
Brightness Adaptation and Discrimination

59 Digital Image Processing-21EC732 -ETE 10/28/2024


Brightness Adaptation and Discrimination

The ability of the eye to discriminate between changes in light intensity at any specific adaptation
level is also of considerable interest. A classic experiment used to determine the capability of the
human visual system for brightness discrimination
consists of having a subject look at a flat, uniformly illuminated area large enough to occupy the
entire field of view. This area typically is a diffuser,such as opaque glass, that is illuminated from
behind by a light source whose intensity, I, can be varied. To this field is added an increment of
illumination,I, in the form of a short-duration flash that appears as a circle in the center of the
uniformly illuminated field, as Fig. 2.5 shows.
If I is not bright enough, the subject says “no,” indicating no perceivable change.As I gets
stronger, the subject may give a positive response of “yes,” indicating a perceived change. Finally,
when I is strong enough, the subject will give a response of “yes” all the time.The quantity
where is the increment of illumination discriminable 50% of the time with background
illumination I, is called the Weber ratio. A small value of means that a small percentage change in
intensity is discriminable. This represents “good” brightness discrimination. Conversely, a large
value of means that a large percentage
change inDigital
intensity is required. This
Image Processing-21EC732 represents “poor” brightness discrimination. 10/28/2024
-ETE
60
Brightness Adaptation and Discrimination

61 Digital Image Processing-21EC732 -ETE 10/28/2024


A plot of log ∆Ic/I, as a function of log I has the general shape shown in Fig. 2.6.This curve
shows that brightness discrimination is poor (the Weber ratio is large) at low levels of
illumination, and it improves significantly (the Weber ratio decreases) as background
illumination increases. The two branches in the curve reflect the fact that at low levels of
illumination vision is carried out by activity of the rods, whereas at high levels (showing better
discrimination) vision is the function of cones.

62 Digital Image Processing-21EC732 -ETE 10/28/2024


Brightness Adaptation and Discrimination
Example: Mach bands

63 Digital Image Processing-21EC732 -ETE 10/28/2024


Brightness Adaptation and Discrimination
Example: Simultaneous Contrast

64 Digital Image Processing-21EC732 -ETE 10/28/2024


Brightness Adaptation and Discrimination
Examples for Human Perception Phenomena

65 Digital Image Processing-21EC732 -ETE 10/28/2024


IMAGE SENSING AND ACQUISITION:
Physics of Light
f(x,y)=i(x,y)r(x,y)

where
1) i(x,y) the amount of illumination
incident to the scene
0  i ( x, y )  
2) r(x,y) the reflectance from the object

0  r ( x, y )  1
67 Digital Image Processing-21EC732 -ETE 10/28/2024
Image Sensing
• A sensor detects energy radiated by a band of the electro-magnetic spectrum and
converts it into electrical signal.
• Sensor has a material that is responsive to the particular type of energy being detected.

68 Digital Image Processing-21EC732 -ETE 10/28/2024


Image Sensing
Incoming energy lands on a sensor material responsive to that type of energy and
this generates a voltage
Collections of sensors are arranged to capture images

Imaging Sensor

69 Digital Image Processing-21EC732 -ETE 10/28/2024


Line of Image Sensors
Array of Image Sensors
Image Acquisition using a Single Sensor

70 Digital Image Processing-21EC732 -ETE 10/28/2024


Image Acquisition using Sensor Strips

Linear strip

Circular strip
Fixed sensor ring
Rotating X-ray source
Used in CAT, MRI, and PET

71 Digital Image Processing-21EC732 -ETE 10/28/2024


Using Sensor Strips and Rings
CCD (Charged-Coupled Device) cameras
 Tiny solid state cells convert light energy into electrical charge.
 The image plane acts as a digital memory that can be read row by row
by a computer.

72 Digital Image Processing-21EC732 -ETE 10/28/2024


Frame grabber
 Usually, a CCD camera plugs into a computer board (frame
grabber).
 The frame grabber digitizes the signal and stores it in its memory
(frame buffer).

73 Digital Image Processing-21EC732 -ETE 10/28/2024


Image Acquisition Using Sensor Arrays
Images are typically generated by illuminating a scene and absorbing
the energy reflected by the objects in that scene

– Typical notions of
illumination and scene can
be way off:
• X-rays of a skeleton
• Ultrasound of an
unborn baby
• Electro-microscopic
images of molecules
74 Digital Image Processing-21EC732 -ETE 10/28/2024
Simple image formation model

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

where
1) i(x,y) the amount of illumination
incident to the scene
0  i ( x, y )  
2) r(x,y) the reflectance from the object

0  r ( x, y )  1
75 Digital Image Processing-21EC732 -ETE 10/28/2024
Image sampling and quantization
 Convert the continuous sensed data to digital form
 Sampling
 Spatial transform: spatial coordinates(discrete locations)
 Quantization
 Amplitude transform: gray levels are converted to discrete values

 The quality of a digital image


is determined to a large degree
by the number of samples and
discrete gray levels

76 Digital Image Processing-21EC732 -ETE 10/28/2024


Image sampling and quantization

77 Digital Image Processing-21EC732 -ETE 10/28/2024


Quantization

78 Digital Image Processing-21EC732 -ETE 10/28/2024


Image sampling and quantization
 Sampling: digitizing the 2-dimensional spatial coordinate values
 Quantization: digitizing the amplitude values (brightness level)

79 Digital Image Processing-21EC732 -ETE 10/28/2024


Representing digital images
 The complete MN digital image in the matrix form: f(x,y)
 Pixel, picture element
 A digital image use a traditional matrix A
 The number of gray levels L= 2k
 The dynamic range of an image : the range of values spanned by the gray scale
 High contrast image : an image whose gray levels span a significant portion of the gray scale as having a
high dynamic range
 The number, b, of bits required to store a digitized image is
b=M N K

80 Digital Image Processing-21EC732 -ETE 10/28/2024


Representing Digital Images

81 Digital Image Processing-21EC732 -ETE 10/28/2024


Representing Digital Images

Each element of this matrix array is called an image element, picture element, pixel, or pel. it is
advantageous to use a more traditional matrix notation to denote a digital image and its
elements: aij=f(x=i, y=j)=f(i, j). Eqs. (2.4-1) and (2.4-2) are identical matrices.

82 Digital Image Processing-21EC732 -ETE 10/28/2024


Representing Digital Images
Let Z and R denote the set of real integers and the set of real numbers, respectively. The sampling
process may be viewed as partitioning the xy plane into a grid, with the coordinates of the center
of each grid being a pair of elements from the Cartesian product Z2, which is the set of all
ordered pairs of elements zi, zj with zi and zj being integers from Z. Hence, f(x, y) is a digital image
if (x, y) are integers from Z2 and f is a function that assigns a gray-level value (that is, a real
number from the set of real numbers, R) to each distinct pair of coordinates (x, y).If the gray levels
also are integers (as usually is the case in this and subsequent chapters), Z replaces R, and a digital
image then becomes a 2-D function whose coordinates and amplitude values are integers.

83 Digital Image Processing-21EC732 -ETE 10/28/2024


Representing Digital Images

84 Digital Image Processing-21EC732 -ETE 10/28/2024


Spatial and gray-level resolution
 Sampling is the principal factor determining the spatial resolution of an image
construct a chart with vertical lines of width W, with the space between the lines also
having width W.A line pair consists of one such line and its adjacent space. Thus, the width of a
line pair is 2W, and there are 1/2W line pairs per unit distance. A widely used definition
of resolution is simply the smallest number of discernible line pairs per unit distance
 Gray-level resolution: the smallest discernible change in gray level
 is the power of 2 due to hardware considerations
 The most common number: 8 bits
 When an actual measure of physical resolution relating pixels and the level of detail they
resolve in the original scene are not necessary, it is common to refer to an L-level digital
image of size M*N as having a spatial resolution of M*N pixels and a gray-level resolution
of L levels

85 Digital Image Processing-21EC732 -ETE 10/28/2024


Spatial and gray-level resolution
 Sub-sampling delete the appropriate number of rows and columns from the
original image.
 Re sampling Keep the number of samples constant and reduce the number of
gray levels
 Reduce the number of bits while keeping the spatial constant
 Vary N and k simultaneously
 ISO reference curves
 If the number of bit are fixed, how to adjust the trade-off between spatial and
gray-level resolution?

86 Digital Image Processing-21EC732 -ETE 10/28/2024


Spatial and Gray-Level Resolution

Spatial Resolution

87 Digital Image Processing-21EC732 -ETE 10/28/2024


Spatial and gray-level resolution

88 Digital Image Processing-21EC732 -ETE 10/28/2024


Spatial and gray-level resolution

256 128 16 8

64
Digital Image Processing-21EC732 -ETE 32 4 10/28/2024 2
89
Spatial and gray-level resolution

 Figure 2.22 (a): The woman’s face; Image with low level of detail.
 Figure 2.22 (b): The cameraman; Image with medium level of detail.
 Figure 2.22 (c): The crowd picture; Image with a relatively large amount of detail.

90 Digital Image Processing-21EC732 -ETE 10/28/2024


Spatial and gray-level resolution

91 Digital Image Processing-21EC732 -ETE 10/28/2024


Aliasing and Moire patterns
 All signals (functions) can be shown to be made up of a linear combination
sinusoidal signals (sines and cosines) of different frequencies.
 Band-limited functions
 the highest frequency is finite and that the function is of unlimited duration
 For physical reasons, there is a highest frequency component in all real world
signals.

92 Digital Image Processing-21EC732 -ETE 10/28/2024


Aliasing and Moire patterns

 Sampling rate is the number of samples taken per unit distance


 Theoretically,
 if a signal is sampled at more than twice its highest frequency component, then it
can be reconstructed exactly from its samples.
 The Shannon sampling theorem
 if the function is sampled at a rate equal to or greater than twice its samples
 But, if it is sampled at less than that frequency (called undersampling), then
aliasing will result.
 aliasing corrupts the sampled image
 Additional frequency component are introduced into the sampled function
(aliased frequencies)
 This causes frequencies to appear in the sampled signal that were not in the
original signal. The Moiré pattern shown in Figure 2.24 is an example. The
vertical low frequency pattern is a new frequency not in the original patterns.

93 Digital Image Processing-21EC732 -ETE 10/28/2024


Aliasing and Moiré Pattern
The effect of aliased frequencies

94 Digital Image Processing-21EC732 -ETE 10/28/2024


Aliasing and Moire patterns
 It is impossible to satisfy the sampling theorem
 Sol: work with sampled data that are finite in duration
 Gating function: convert a function of unlimited duration into a function of
finite duration by multiplying a “ gating function”
 Reducing the aliasing effect : reduce its high frequency by blurring the image
 Moirie patterns: a function of finite duration can be sampled over a finite
interval without violating the sampling theorem
 caused by a break up of the periodicity

96 Digital Image Processing-21EC732 -ETE 10/28/2024


Aliasing and Moire patterns
 http://knight.fcu.edu.tw/~physics/MOVE/moire.html
 http://knight.fcu.edu.tw/~physics/MOVE/moire1.html
 http://knight.fcu.edu.tw/~physics/MOVE/moire2.html

97 Digital Image Processing-21EC732 -ETE 10/28/2024


Zooming and Shrinking Digital Images
 Zooming: increasing the number of pixels in an image so that the image
appears larger
 Two steps for zooming
 (1) the creation of new pixel locations
 (2) the assignment of gray levels to those new locations
 neighbor interpolation: nearest neighborhood interpolation
 Nearest neighbor interpolation
 For example: pixel replication--to repeat rows and columns of an image
 Pixel replication
 Increase the size of an image an integer number of times
 a special case of nearest neighbor interpolation (Figs. 2.20(b)
 Defect: produces a checkerboard effect

98 Digital Image Processing-21EC732 -ETE 10/28/2024


Zooming and Shrinking Digital Images
 Bilinear interpolation
 Smoother
 Higher order interpolation v( x ' , y ' )  ax'  by '  cx' y '  d
 the four coefficients are determined from the four equations in four unknowns
 that can be written using the four nearest neighbors of point (x’, y’).
 Image shrinking: subsampling
 Equivalent process of pixel location is row-column deletion: shrink by a non-
integer factor
 Expand the grid to fit over the original image
 Do gray-level nearest neighbor or bilinear interpolation
 Shrink the grid to its original specified size
 Defect: Aliasing effect
 Sol: blur an image slightly

99 Digital Image Processing-21EC732 -ETE 10/28/2024


Zooming and Shrinking Digital Images

Nearest
neighbor
Interpolation
(Pixel
replication)

Bilinear
interpolation

100 Digital Image Processing-21EC732 -ETE 10/28/2024


Some Basic Relationships Between Pixels

 Neighbors of a pixel
 There are three kinds of neighbors of a pixel:
 N4(p) 4-neighbors: the set of horizontal and vertical neighbors
 ND(p) diagonal neighbors: the set of 4 diagonal neighbors
 N8(p) 8-neighbors: union of 4-neighbors and diagonal neighbors

O O O O O O
O X O X O X O
O O O O O O
Adjacency, connectivity,regions &boundaries
 Connectivity between pixels is a fundamental concept that simplifies the definition of
numerous digital image concepts, such as regions and boundaries.
 Connectivity of two pixels: if two pixels are connected, it must be determined
If they are neighbors &If their gray levels satisfy a specified criterion of similarity
 Adjacency:
 Two pixels that are neighbors and have the same grey-level (or some other specified
similarity criterion) are adjacent
 Pixels can be 4-adjacent, diagonally adjacent, 8-adjacent, or m-adjacent.
 4-adjacency.
Two pixels p and q with values from V are 4-adjacent if q is in the set N4(p).
 8-adjacency.
Two pixels p and q with values from V are 8-adjacent if q is in the set N8(p).
Adjacency,connectivity,regions & boundaries
 m-adjacency (mixed adjacency):
 Two pixels p and q of the same value (or specified similarity) are m-adjacent if
either
 (i) q and p are 4-adjacent, or (ii) p and q are diagonally adjacent and do not
have any common 4-adjacent neighbors. They cannot be both (i) and (ii).

An example of adjacency:
Adjacency,connectivity,regions
&boundaries

104 Digital Image Processing-21EC732 -ETE 10/28/2024


Adjacency,connectivity,regions &boundaries
 Path:
 The length of the path
 Closed path
 Connectivity in a subset S of an image
 Two pixels are connected if there is a path between them that lies completely within S.
 Two pixels are said to be connected in S if there exists a path between them consisting
entirely of pixels in S
 For any pixel p in S, the set of pixels that are connected to it in S is called a connected
component of S.
 If it only has one connected component, then set S is called a connected set.
Adjacency,connectivity,regions
&boundaries
 Region of an image
 Boundary, border or contour of a region
 Boundary
 A region of the image R: R is a connected set
 The boundary of a region R: the set of pixels in the region that have one or
more neighbors

 Edge: a path of one or more pixels that separate two regions of significantly
different gray levels.
 edges are intensity discontinuities and boundaries are closed paths.
Distance Measures
 Distance measures
 For pixels p, q, and z, with coordinates (x, y), (s, t), and (v, w), respectively,D is a
distance function or metric if IT satisfies three criteria
 Distance function: a function of two points, p and q, in space that satisfies
three criteria

( a ) D ( p, q )  0
(b) D( p, q)  D(q, p), and
(c ) D ( p , z )  D ( p , q )  D ( q , z )

107 Digital Image Processing-21EC732 -ETE 10/28/2024


Distance Measures

 The Euclidean distance between p and q


 D4 (city block) distance :
 D8 (chessboard block) distance
 Dm distance: the shortest m-path between the points

 The Euclidean distance De(p, q)

De ( p, q)  ( x  s ) 2  ( y  t ) 2
 For this distance measure, the pixels having a distance less than or equal to somevalue
r from (x, y) are the points contained in a disk of radius r centered at (x, y)
Distance Measures

 The city-block (Manhattan) distance D4(p, q)


D4 ( p, q) | x  s |  | y  t |

 the pixels having a D4 distance from (x, y) less than or equal to some value r form a diamond
centered at (x, y). For example, the pixels with D4 distance 2 from (x, y) (the center point)
form the following contours of constant distance:
 The pixels with D4=1 are the 4-neighbors of (x, y).
 The chessboard distance D8(p, q)

D8 ( p, q)  max(| x  s |, | y  t |)
Distance Measures

 the pixels withD8 distance from (x, y) less than or equal to some value r form a square centered
at (x, y). For example, the pixels with D8 distance 2 from (x, y) (the center point) form
the following contours of constant distance The pixels with D8=1 are the 8-neighbors of (x,
y).
Distance Measures

 P3 P4
 P1 P2
 P
0 1 0 1 1 1
0 1 1 1 1 1
1 1 1

111 Digital Image Processing-21EC732 -ETE 10/28/2024


A Simple Image Formation Model

 Binary images: images having only two possible brightness levels (black and white)
 Gray scale images : “black and white” images
 Color images: can be described mathematically as three gray scale images

 Let f(x,y) be an image function, then


f(x,y) = i(x,y) r(x,y),
where i(x,y): the illumination function
r(x,y): the reflection function
Note: 0 < i(x,y)< ∞ and 0 <r(x,y)< 1.

 For digital images the minimum gray level is usually 0, but the maximum depends on
number of quantization levels used to digitize an image. The most common is 256
levels, so that the maximum level is 255.

112 Digital Image Processing-21EC732 -ETE 10/28/2024


Adjacency,connectivity,regions &boundaries
 Digital path or curve`

 A (digital) path (or curve) from pixel p with coordinates (x, y) to pixel q
with coordinates (s, t) is a sequence of distinct pixels with coordinates

 Closed path
 4-, 8-, or m-paths

113 Digital Image Processing-21EC732 -ETE 10/28/2024


Adjacency,connectivity,regions &boundaries
 Path:
 The length of the path
 Closed path
 Connectivity in a subset S of an image
 Two pixels are connected if there is a path between them that lies completely within S.
 Two pixels are said to be connected in S if there exists a path between them consisting
entirely of pixels in S
 For any pixel p in S, the set of pixels that are connected to it in S is called a connected
component of S.
 If it only has one connected component, then set S is called a connected set.
Adjacency, connectivity, regions &boundaries
 Region of an image
 Boundary, border or contour of a region
 Boundary
 A region of the image R: R is a connected set
 The boundary of a region R: the set of pixels in the region that have one or
more neighbors

 Edge: a path of one or more pixels that separate two regions of significantly
different gray levels.
 edges are intensity discontinuities and boundaries are closed paths.
Distance Measures
 Distance measures
 For pixels p, q, and z, with coordinates (x, y), (s, t), and (v, w), respectively,D is a
distance function or metric if IT satisfies three criteria
 Distance function: a function of two points, p and q, in space that satisfies
three criteria

( a ) D ( p, q )  0
(b) D( p, q)  D(q, p), and
(c ) D ( p , z )  D ( p , q )  D ( q , z )

116 Digital Image Processing-21EC732 -ETE 10/28/2024


Distance Measures

 The Euclidean distance between p and q


 D4 (city block) distance :
 D8 (chessboard block) distance
 Dm distance: the shortest m-path between the points

 The Euclidean distance De(p, q)

De ( p, q)  ( x  s ) 2  ( y  t ) 2
 For this distance measure, the pixels having a distance less than or equal to somevalue
r from (x, y) are the points contained in a disk of radius r centered at (x, y)
Distance Measures

 The city-block (Manhattan) distance D4(p, q)


D4 ( p, q) | x  s |  | y  t |

 the pixels having a D4 distance from (x, y) less than or equal to some value r form a diamond
centered at (x, y). For example, the pixels with D4 distance 2 from (x, y) (the center point)
form the following contours of constant distance:
 The pixels with D4=1 are the 4-neighbors of (x, y).
 The chessboard distance D8(p, q)

D8 ( p, q)  max(| x  s |, | y  t |)
Distance Measures

 the pixels withD8 distance from (x, y) less than or equal to some value r form a square centered
at (x, y). For example, the pixels with D8 distance 2 from (x, y) (the center point) form
the following contours of constant distance The pixels with D8=1 are the 8-neighbors of (x,
y).
Image operation on a pixel basis
 Operation is carried out between corresponding pixels
linear and nonlinear operations
H(af+bg)= aH(f) + b H(g)

You might also like