Basics of Image Processing: Dr. Vijaylakshmi Jigajinni

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

Basics of Image Processing

Dr. Vijaylakshmi Jigajinni


Assistant Professor
Electronics & Communication Engineering

1
What is Image ?
 An image is a spatial representation of a
two- dimensional or three-dimensional scene.
 An image is an array, or a matrix pixels
(picture elements) arranged in columns and rows.

2
First Digital Photograph

© 2002 R. C. Gonzalez & R. E. Woods


PIXEL
 It is the smallest
controllable element of an
image.
 More pixels then more
clearer the image
 Pixels have different
intensity values
Pixel intensity value
Consider the following
image (2724x2336 pixels)
f(1,1) = 103 to be 2D function or a
matrix with rows and
Pixel location columns

In 8-bit representation
Pixel intensity values
rows columns change between 0 (Black)
and 255 (White)
f(645:650,1323:1328) =
83 82 82 82 82 82
82 82 82 81 81 81
82 82 81 81 80 80
82 82 81 80 80 79
80 79 78 77 77 77
80 79 78 78 77 77

f(2724,2336) = 88
Remember digitization implies that a digital image is an
approximation of a real scene

One pixel
Digital Image Processing
 Common image Color-type include:

1 sample per point (B&W or Grayscale)


3 samples per point (Red, Green, and Blue)
For most of this presentation we will focus on greyscale
images.
What is Image Processing

9
What is Image Processing

1
0
What is Image Processing

1
1
What is Image Processing

6 One picture is worth more than thousands of words.


WHY…..digital image processing…???
 Interest in digital image processing methods stems
from two principal application areas:

1. Improvement of pictorial information for


human interpretation

2. Processing of image data for storage, transmission, and


representation for autonomous machine perception

1
3
WHAT IS DIGITAL IMAGE PROCESSING?
DIP Definition:
A Discipline in which Both the Input and Output of
a Process are Images.

Image Process Image

14
What Is Digital Image ?
 An image may be defined as a two-dimensional function, f(x, y),
where x and y are spatial (plane) coordinates, and the
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, we call the image a digital image.
 Color Image:
 r ( x, y)
f ( x , y )   g ( x , 
y)   b ( x , y ) 

The field of digital image processing refers to processing digital


9 images by means of a digital computer.
What Is Digital Image ?
An Image:

g(x , y)
Discretization

g
(
Quantization
i f(i , j) Digital Image
,
10
f(i0 , j0) : Picture Element,
j Image Element, Pel, Pixel
WHAT IS DIGITAL IMAGE PROCESSING?

Image
Processing Image Analysis Vision

Low-Level High-Level
Process Mid-Level Process
Process
• Reduce Noise Making Sense of an
• Segmentation Ensemble of
• Contrast Enhancement
• Classification Recognized Objects
• Image Sharpening

11
The origins of digital image processing

 Reproduced by a telegraph printer with a


special typeface
 This printing method was abandoned
toward the end of 1921
Origins of Digital Image Processing
 One of the first applications of digital images was in the newspaper
industry, when pictures were first sent by submarine cable between
London and New York.

 Introduction of the Bartlane cable picture transmission system in the


early 1920s reduced the time required to transport a picture across the
Atlantic from more than a week to less than three hours.

A digital picture produced


in 1921 from a coded tape
12
by a
telegraph printer with
special type faces.
1929
Reproduced with 15 levels of gray

No image processing introduced


The origins of digital image processing

Computer Advances
the invention of the transistor by Bell Labs. in 1948
the development of the high-level programming languages
the invention of the IC at Texas Instruments in 1958
the development of operation systems in the early 1960s
the development of microprocessor by Intel in the early 1970s
introduction by IBM of the personal computer in 1981
Large Scale IC in the late 1970s
VLSI in the 1980s, ULSI present
IC Technology, Mass storage and display systems
Computers have powerful processing capability to process images
The origins of digital image processing

The first computers powerful enough to carry out


meaningful image processing tasks appeared in the
early 1960s
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
What is a Digital Image? (cont…)

Pixel values typically represent gray levels, colours,


heights, opacities etc
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

Remember digitization implies that a digital image is an


approximation of a real scene

1 pixel
Applications and Research Topics

25
Applications and Research Topics
Document Handling

26
Applications and Research Topics
 Signature Verification

27
Applications and Research Topics
 Biometrics

28
Applications and Research Topics
 Fingerprint Verification / Identification

29
Applications and Research Topics
Object Recognition

30
Applications and Research Topics
 Target Recognition
Department of Defense (Army, Air force, Navy)

31
Applications and Research Topics
 Interpretation of Aerial Photography
Interpretation of aerial photography is a problem domain in both
computer vision and registration.

32
Applications and Research Topics
 Autonomous Vehicles
Land, Underwater, Space

33
Applications and Research Topics
Traffic Monitoring

34
Applications and Research Topics
Traffic Monitoring

35
Applications and Research Topics
Face Detection

36
Applications and Research Topics
Face Recognition

37
Applications and Research Topics
 Face Detection/Recognition Research

38
Applications and Research Topics
 Facial Expression Recognition

39
Applications and Research Topics
 Hand Gesture Recognition
Smart Human-Computer User
Interfaces Sign Language Recognition

40
Applications and Research Topics
 Human Activity Recognition

41
Applications and Research Topics
Medical Applications

Skin cancer Lung cancer

42
Applications and Research Topics
 Morphing

43
Applications and Research Topics
 Inserting Artificial Objects into a Scene

44
Agriculture:
Automobiles
Industrial Inspection

Human operators are expensive, slow


and
unreliable
 Make machines do thej instead

Industrial vision systems


are used in all kinds of industries
Can we trust them?
Need:
 Improvement of pictorial information for human
interpretation and analysis.

Typical applications:

 Noise filtering
 Content Enhancement
 Contrast enhancement
 Deblurring
 Remote sensing
Filtering
Image Enhancement
Image Deblurring
Electro-Magnetic Spectrum
Imaging types
• Gamma ray Imaging(Nuclear Medicine)
• X-ray imaging(Diagnosis)
• Imaging in Ultrviolet band(industrial inspection,
astronomical observation)
• Imaging in visible & Infra Red band
• Imaging in MicroWave band
• The unique feature of imaging radar is its ability to collect
data over virtually any region at anytime, regardless of
weather or ambient lighting condition
• Imaging in Radio band
• Imaging Modeleties using non EM Spectrum band
IR Imaging (Performance)

Thermal / IR view of a Chip


IR Imaging (Night Vision)

Night vision system used by soldiers


IR Imaging (Weather)

Fig. IR Satellite Imagery


IR Imaging (Astronomy)

Fig. Nebula NGC 1514 01 in Visible (left) and Infrared (right)


Ultrasound imaging
(Medical)

Fig. Foetus & Thyroid using ultrasound


UV imaging (Ozone)

Fig. Detect ozone layer damage


UV imaging (Sun spots)

Fig. Identify sun spots


Examples: Image
E n h a n ce m e n t
 O ne of th e m o st com m on uses of DIP
techniques: improve quality, remove noise etc
X-Ray imaging (Medical)

Fig. X ray of neck


X-Ray imaging (Medical)

Fig. X ray of head


X-Ray imaging (Circuits)

Fig. X ray of a Glucose meter circuit


Gamma-Ray imaging:

Fig. Gamma ray exposed images


Gamma-Ray imaging
(Astronomy)

Fig. Gamma ray bursts in space


Remote Sensing

Fig. Satellite images of Mumbai suburban(Left) and Gateway of India (Right)


Remote Sensing

Satellite images of Taj Mahal


Fundamental Steps in Digital Image Processing

72
Fundamental Steps in Digital Image Processing

73
Fundamental Steps in Digital Image Processing
Essential steps when processing digital
images:
Acquisition
Enhancement
Outputs are
Restoration
digital
images
Color image restoration
Wavelets
Morphological processing
Outputs are
Segmentation attributes of the
image
Representation
38
Recognition
Key Stages in Digital Image Processing

Image Morphological
Restoration Processing

Image
Segmentation
Enhancement

Image Object
Acquisition Recognition

Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Key Stages in Digital Image Processing:
Image Acquisition

Image Morphological
Restoration Processing

Image
Segmentation
Enhancement

Image Object
Acquisition Recognition

Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
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
Processing Compression
Fundamental Steps in Digital Image Processing
 Image enhancement is the process of manipulating an
image so that the result is more suitable than the original
for a specific application.
There is no general “theory” of image enhancement.
When an image is processed for visual interpretation,
the viewer is the ultimate judge of how well a particular
method works.

78
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
Processing Compression
Fundamental Steps in Digital Image Processing

 Image Restoration is an area that also deals with


improving the appearance of an image.
However, unlike enhancement, which is subjective,
image restoration is objective, in the sense that restoration
techniques tend to be based on mathematical or
probabilistic models of image degradation.

80
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
Processing Compression
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
Processing Compression
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
Processing Compression
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
Processing Compression
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
Processing Compression
Summary

We have looked at:


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
Next time we will start to see how it
all works…
References
Text Book
“Digital Image Processing”, Rafael C.
Gonzalez & Richard E. Woods,
Addison-Wesley, 2002
Much of the material that follows is taken from this
book
Reference
“Fundamentals of Digital Image
Processing” by Anil K Jain
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
Processing Compression
Image Processing Basics

90
General Purpose Image Processing System

91
Image Acquisition
The image is captured by a sensor
(e.g. Camera), and digitized if the
output of the camera or sensor is not
already in digital form, using
analogue-to-digital convertor

92
Image Sensors
Two elements are required to acquire digital
images.
First: is the physical device that is sensitive to the
energy radiated by the object we wish to image
(Sensor).
Second: called a digitizer, is a device for converting
the output of the physical sensing device into digital
form.

93
An image sensor is a device that converts an optical
image into an electronic signal. It is used mostly in
digital cameras, camera modules and other imaging
devices. Early analog sensors were video camera tube;
most currently used are digital charge coupled device
(CCD) or complementary metal–oxide–semiconductor
(CMOS) active pixel sensors.

A CCD image sensor on a flexible circuit board CMOS image sensor

94
• Today, most digital still cameras use either a
CCD image sensor or a CMOS sensor.
• Each cell of a CCD image sensor is an analog
device.
• When light strikes the chip it is held as a small
electrical charge in each photo sensor.
• The charges are converted to voltage one
pixel at a time as they are read from the chip.
• Additional circuitry in the camera converts the
voltage into digital information.

95
General Purpose Image Processing System

Specialized image processing hardware usually


consists of the digitizer, plus hardware that performs
other primitive operations, such as an arithmetic logic
unit (ALU), that performs arithmetic and logical
operations in parallel on entire images.

This type of hardware sometimes is called a front-end


subsystem, and its most distinguishing characteristic
is speed.

96
General Purpose Image Processing System

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 custom


computers are used to achieve a required level of
performance, but our interest here is on general-
purpose image processing systems.

In these systems, almost any well-equipped PC-type


machine is suitable for off-line image processing
tasks.
97
General Purpose Image Processing System

Software for image processing consists of specialized


modules that perform specific tasks.

More software packages allow the


sophisticatedof those
integration and general-
software modules purpose least
commands from at one computer
language.

98
General Purpose Image Processing System

 Mass storage capability is a must in image processing


applications.
 An image of 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.
 Digital storage for image processing applications falls into
three principal categories:
 Short-term storage for use during processing,
 On-line storage for relatively fast recall, and
 Archival storage, characterized by infrequent access.
 Storage is measured in:
 bytes,
 Kbytes,
 Mbytes,
50
 Gbytes, and
• 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.

• The on-line storage method, allows virtually instantaneous


image zoom, as well as scroll (vertical shifts) and pan
(horizontal shifts). On-line storage generally takes the form
of magnetic disks and optical-media storage. 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.
10
0
10
1
General Purpose Image Processing System

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.

In some cases, it is necessary to have stereo displays,


and these are implemented in the form of headgear
containing two small displays embedded in goggles
worn by the user.

10
2
General Purpose Image Processing System

Hardcopy devices for recording images include laser


printers, film cameras, heat-sensitive devices, inkjet
units, and digital units, such as optical and CDROM
disks.

Networking is almost a default function in any


computer system in use today.
In dedicated networks, this typically is not a
problem, but communications with remote sites via the
Internet are not always as efficient.

10
3
Elements of Visual Perception

Structure of the
human eye
Image formation in the eye
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

Line of Image Sensors

58
Array of Image Sensors
0 0 0 75 75 75 128 128 128 128

0 75 75 75 128 128 128 255 255 255

75 75 75 200 200 200 255 255 255 200

128 128 128 200 200 255 255 200 200 200

128 128 128 255 255 200 200 200 75 75

175 175 175 225 225 225 75 75 75 100

175 175 100 100 100 225 225 75 75 100

75 75 75 35 35 35 0 0 0 35

35 35 35 0 0 0 35 35 35 75

75 75 75 100 100 100 200 200 200 200


key stages in digital image processing

Sampling : related to coordinates values


(Nyquist frequency)

Quantization : related to intensity values


Sampling

32
64

128

256

512

1024
Sampling

1024 512 256

128 64 32
Quantization

8-bit 7-bit 6-bit 5-bit

4-bit 3-bit 2-bit 1-bit


Matlab commands

imread() – reading an image with different


postfixes

imresize() – resizing an image to any given size

figure – opening a new graphical window

subplot(#of row, # of col, location) – showing


different plots/images in one graphical window

imshow() – displaying an image

Over to Matlab program……….


Image Representation

13
7
Spatial Resolution
 The spatial resolution of an image is determined
by how sampling was carried out
 Spatial resolution simply refers to the
smallest discernable detail in an image
 Vision specialists will often talk about pixel size
 Graphic designers will talk about dots per inch (DPI)

14
3
Spatial Resolution

62 Vision specialists will often talk about pixel


size
Spatial Resolution
1024 * 1024 512 * 512 256 * 256

128 * 128 64 * 64 32 * 32
63 Graphic designers will talk about dots per inch
Intensity Level Resolution
 Intensity level resolution refers to the number
of intensity levels used to represent the image
 The more intensity levels used, the finer the
level of detail discernable in an image
 Intensity level resolution is usually given in terms of the
number of bits used to store each intensity level

Number of
Number of Bits Examples
Intensity Levels
1 2 0, 1
2 4 00, 01, 10, 11
4 16 0000, 0101, 1111
8 256 00110011,
16 65,536 1010011001100110011010
64
1
Intensity Level Resolution
256 grey levels (8 bits per pixe1l)28 grey levels (7 64 grey levels (6 bpp) 32 grey levels (5 bpp)
bpp)

65 16 grey levels (4 bpp) 8 grey levels (3 bpp) 4 grey levels (2 bpp) 2 grey levels (1
bpp)
Resolution: How Much Is Enough?
 The big question with resolution is always how much
is enough?
 This all depends on what is in the image and what you
would like to do with it
 Key questions include
 Does the image look aesthetically pleasing?
 Can you see what you need to see within the image?

 The picture on the right is fine for counting the


66 number of cars, but not for reading the number plate
Image Interpolation
• Image Interpolation (Tool)
– Zooming
– Shrinking
– Rotating
– Geometric Correction
• Zooming & Shrinking
– Re-sampling
Interpolation — Process of using known data to
estimate unknown values
e.g., zooming, shrinking, rotating, and geometric correction

Interpolation (sometimes called resampling) — an


imaging method to increase (or decrease) the number of pixels
in a digital image.
Some digital cameras use interpolation to produce a larger image than
the sensor captured or to create digital zoom

156
Image Interpolation:
Nearest Neighbor Interpolation

f1(x2,y2) = f(x1,y1)
f(round(x2), round(y2))
=f(x1,y1)

f1(x3,y3) =
f(round(x3), round(y3))
=f(x1,y1)
158
Image Interpolation:
Bilinear Interpolation

(x,y)

159
Image Interpolation:
Bicubic Interpolation
The intensity value assigned to point (x,y) is obtained by the
following equation

The sixteen coefficients are determined by using the sixteen


nearest neighbors.

161
Examples: Interpolation

162
Examples: Interpolation

163
Examples: Interpolation

164
Examples: Interpolation

165
Examples: Interpolation

166
Examples: Interpolation

167
Examples: Interpolation

168
Examples: Interpolation

169
Basic Relationships Between Pixels

Neighborhood

Adjacency

Connectivity

Paths

Regions and boundaries

170
Any Questions?

67

You might also like