You are on page 1of 42

DIGITAL IMAGE PROCESSING

Digital Image Processing 1


Why do we need to study DIP?

Interest in digital image processing methods


stems from two aspects:
1) Improve images for human interpretation;
2) Process images, include storage,
transmission.

20/9/23 Digital Image Processing 2


1.1 What is a digital image ?
. An image may be defined a two-dimension function f(x,y)
(x,y) ---- coordinate for a point in a plane.
f ---- intensity or gray or color in the position (x,y)
. Digital image
digitize to the function f and coordinates (x,y) let them
become discrete values.
Usually f,x and y are all finite values.
. Pixel
a point in a digital image is called pixel.
. Digital Image Processing
regarded as a discipline from an image to another.

20/9/23 Digital Image Processing 3


1.2 The Origins of Digital image Processing
. The first application was in newspaper industry in 1920s

20/9/23 Digital Image Processing 4


Digital
Digital Image Processing,
Processing, 2nd
2nd ed.
ed. www.imageprocessingbook.com

Chapter 1: Introduction

They were not real image processing, only image encoding and printing
and some improvements.
© 2002 R. C. Gonzalez & R. E. Woods

In 1960s, computer and its programming were brought into, the true
image processing began.

Two important events push forward digital image processing.


1) Space Program --- First Moon Probe ( America, in 1964);
2) In medicine --- CAT or CT (Computer Axial Tomography early 1970s)
Using X-rays generates image.

20/9/23 Digital Image Processing 5


1.3 Objectives of digital image processing

1.Improve qualities of images so that human can interpret


them better.
Such as enhancement, restoration and so on.
2.Process pictures and extract some information from them
for machine perception.
Such as image analysis, image recognition and so on.

20/9/23 Digital Image Processing 6


1.4 Three level-processes for a digital image

.Low-level processes: reduce noises, contrast enhancement and


so on, from an image to another, improve the image quality;
.Mid-level processes: extract some attributes from an image,
segment an image, extract object contour in an image
.High-level processes: recognize objects in an image for analysis

There is no obvious boundary between digital image processing


and computer vision.
Computer vision: Machine perception based on vision or to use
computers to emulate human vision. Image recognition is a little
like this.

20/9/23 Digital Image Processing 7


1.5 What can digital image processing do?

. Digitizing an image ( convert an continuous image to


a digital one)
. Enhancing an image ( Let an image better suit for a specific
application)
. Restoring an image ( Recover a damaged image)
. Compressing an image ( Store it with less bytes )
. Segmenting an image ( Partition objects in an image from
background )
. Recognizing an image ( Tell what the objects are in an image )

20/9/23 Digital Image Processing 8


1.5.1 Digitizing an image

It is the first step of digital image processing


Y
. Sample ( like these grids)

. quantization

F(x,y)
X
x

20/9/23 Digital Image Processing 9


1.5.2 Enhancing an image

Original Image

Enhanced Image

20/9/23 Digital Image Processing 10


1.5.3 Restoring an image

When an image damaged, we can recover it torn

Cracked parts

20/9/23 Digital Image Processing 11


1.5.4 Compressing an image

Original image 257kb Compressed image 147kb

Redundant Info.
20/9/23 Digital Image Processing 12
Segmenting an
image

Original image Segmented image

20/9/23 Digital Image Processing 13


1.5.6 Recognizing an image

Take car license plate recognition as an example.

20/9/23 Digital Image Processing 14


1.6 Digital image processing and computer graphics.

. The differences between them can be shown as follows.

Image1 Image2
image processing

Data Image3
Computer Graphics

Image1 and Image2 are different: Image2 is gotten by processing image1;


Image3 is produced or generated by converting data, which maybe a
virtual image; Some examples are as follows.

20/9/23 Digital Image Processing 15


Some examples about their differences.

A simple example for computer graphics is that when we input the


center coordinates (x,y) and a radius R, a circle ( image) can be
produced by computer graphics system.

(x,y)

20/9/23 Digital Image Processing 16


1.7 The flow of a typical digital image processing system

Original image Processed image

Camera or Pre- An interpretation


Processing
Scanner processing

Control
Signals

Digitization Enhancement Restoration Controlled Devices


Compression
Recognition
Analysis

20/9/23 Digital Image Processing 17


1.8 The elements of a digital image processing system

Image acquisition: Digital camera or scanner or video camera;


Image storage: all kinds of digital memory, such as hard disk,
tape, optical disk and so on;
Image processing: Computers with software;
Image display: Displayer or all kinds of hardcopy devices.

20/9/23 Digital Image Processing 18


1.9 Some Applications of digital image processing

It is widely used in industry,medical image, commerce,


entertainment and so on.
(1) Industry monitoring system
e.g. Temperature control ,
automatically adjust
temperature based on
the color in the flame image.

20/9/23 Digital Image Processing 19


(3) Traffic Management

The key is car license plate recognition based on image


--- Acquiring the image of a car license plate
Using camera or video camera
--- Enhancement processing
Adjusting the distribution of the gray level in an image
--- Segmentation
Segmenting letters or digitals in the plate
--- Recognition
Telling what the letters or digitals are

20/9/23 Digital Image Processing 20


(4) Traffic Control

. It can be widely used to the following aspects

.. Charge automatically on freeway


--- Auto-record the car license plate
--- Distinguish the type of car
--- Recognize the plate
--- Connecting the credit card system automatically

20/9/23 Digital Image Processing 21


(5) Traffic Control

.. Park management
Automatically record the car license plate and recognize it
and control passing-bar to switch on or off.

.. Monitor the driver with over-speed on freeway


automatically record the car license plate with over-speed
and recognize it.

20/9/23 Digital Image Processing 22


(6) Entertainment

An example --- Human face beautifying

20/9/23 Digital Image Processing 23


1.10 Some examples of Using DIP Based on EM spectrum

(1) The electromagnetic spectrum arranged according to energy per photon.

(2) X-ray and Visual bands of spectrum are the most familiar images in
actual application, such as X-ray in medical inspection and so on.

20/9/23 Digital Image Processing 24


(3) Gamma-Ray Imaging

Nuclear medicine: Inject a patient with a radioactive isotope that can emit
gamma-ray. It is used in locating sites of bone pathology,such as infection
or tumors.
PET --- Positron Emission Tomograph

20/9/23 Digital Image Processing 25


20/9/23 Digital Image Processing 26
(4) X-ray Imaging

Be widely used in Medical diagnostics, Industry, Astronomy and so on.


When X-rays penetrate an objects, there is a different amount of absorption
for different parts in the object , so an image is generated in the film to be
sensitive to X-ray energy.

20/9/23 Digital Image Processing 27


20/9/23 Digital Image Processing 28
(5) Imaging in the Ultraviolet Band

Applications of ultraviolet “light” include lithography,industrial


inspection, microscopy,lasers,biological imaging,and astronomical
observations.

i) Ultraviolet light is used in fluorescence


microscopy.
ii) Fluorescence microscopy is an
excellent method for studying
material that can be made to
fluorescene.

20/9/23 Digital Image Processing 29


(6) Imaging in the Visible and Infrared Bands

The visual band of the electromagnetic spectrum is the most


familiar in our activities. So their applications are also the widest
compared with other bands. And infrared band is often viewed
visual light.

Here we show some applications of the visual light in light


Microscopy,astronomy,remote sensing,industry,and law enforcement.

i) Some examples of images obtained with a light microscope.

20/9/23 Digital Image Processing 30


These examples range from
pharmaceuticals and micro-
inspection to materials
characterization.

20/9/23 Digital Image Processing 31


iii) Weather observation and prediction also are major
applications of multi-spectral imaging from satellites.

20/9/23 Digital Image Processing 32


(7) Imaging in the Microwave Band

A typical application in the microwave band is radar.

20/9/23 Digital Image Processing 33


(8) Imaging in the Radio Band

The major applications in the radio band are in medicine and


astronomy. In medicine radio waves are used in magnetic
resonance imaging (MRI).

20/9/23 Digital Image Processing 34


Comparison with other bands

20/9/23 Digital Image Processing 35


1.11 How to digitize an image

For an image we must digitize it so that it can be


processed by computers.

For an image, we usually use the intensity function


f(x,y) to represent it.

(x,y) --- the location of a point in the image;


f (x,y) --- the intensity of the point (x,y);

It is obvious that 0< f(x,y) < 

20/9/23 Digital Image Processing 36


A simple model is f(x,y)= i(x,y)r(x,y)

i(x,y) --- intensity of the incident light

0 < i (x,y) < 


r(x,y) --- the coefficient of the reflection,
depend on the object light casts

0 < r(x,y) < 1

20/9/23 Digital Image Processing 37


Take a picture as an example.

f (x,y)

20/9/23 Digital Image Processing 38


Sampling --- Digitize the spatial coordinates ( pixel )

Quantizing --- Digitize the intensity function f (x,y)

An image processed by sampling and quantizing is called


the digital image.

It is also the procedure from a continuous image to


a discrete one.

Uniform sampling --- If all sampled points are equal spaces


Uniform quantizing --- If all gray-level intervals are the same
( From the darkest to the brightest )

20/9/23 Digital Image Processing 39


Suppose there are N pixels along horizontal direction X and
M pixels along vertical direction Y.
and there are L gray levels, a digital image can be represented
by the following matrix.

 f (0,0) f (0,1) .... .... f (0, M  1) 


 f (1,0) f (1,1) .... .... f (1, M  1) 

f ( x, y )   .... .... .... .... .... 
 
 .... .... .... .... .... 
 f ( N  1,0) f ( N  1,1) f ( N  1, M  1)

20/9/23 Digital Image Processing 40


For any point (x,y) in the digital image

x   0,1,......N  1 y   0,1,......M  1

f ( x, y )   0,1,......L  1
n m k
Usually, N 2 and M  2 L 2
So the number, b, of bits required to store a digital image:

b  M Nk

20/9/23 Digital Image Processing 41


As for the quality of a digital image, the larger are M, N
and L, the better is the image. 2
For a square image, we have M=N, so b  N m

U
s
u
a
l
l
y
20/9/23 Digital Image Processing 42

You might also like