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

Lecture 08 - Introduction To Machine Vision

Uploaded by

Dasun Induwara
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Lecture 08 - Introduction To Machine Vision

Uploaded by

Dasun Induwara
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 44

Digital Signal Processing

and Machine Vision


Lecture 08

Introduction to Machine Vision

R. A. Prabhath Buddhika
B.Sc. Eng. (Hons), M.Sc.
Department of Electrical Electronic and Systems Engineering
Faculty of Engineering
NSBM Green University
What is an 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.

When x, y, and the intensity values of f are all finite, discrete quantities, we
call the image a digital image.

2
Digital Image Processing

The field of digital image processing refers to processing digital images by


means of digital computers.

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.
Pixel is the term used most widely to denote the elements of a digital image.

3
Computer Vision

Computer Vision is the branch of Computer Science that attempts to emulate


human vision, including learning and being able to make inferences and take actions
based on visual inputs.

It is essentially a branch of Artificial Intelligence as well.

However, the boundary between Image Processing and Computer Vision is not
quite clear.

Some say: Image processing is a process where input and output both are images
and Computer Vision is a process where input is an image and output is a decision.

There are disagreements to this as well.

4
Machine Vision

Machine vision is using image based methods to automate a certain process


carried out by a machine.

It does not aim at emulating human vision.

There are plenty of applications for machine vision.

By processing some images, machine vision makes certain decisions like to


adjust the speed, start or stop something and so on.

5
The Origins Of Digital Image Processing

One of the earliest applications of digital images was in the newspaper


industry, when pictures were first sent by a 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.

Specialized printing equipment coded pictures for cable transmission, then


reconstructed them at the receiving end. Figure on next slide was
transmitted in this way and reproduced on a telegraph printer fitted with
typefaces simulating a halftone pattern.
6
A digital picture produced in 1921 from a coded
tape by a telegraph printer with special
typefaces. (McFarlane.)

7
A digital picture made in 1922 from a tape
punched after the signals had crossed the
Atlantic twice. (McFarlane.)

8
Initial Issues on Quality

Some of the initial problems in improving the visual quality of these early digital
pictures were related to the selection of printing procedures and the distribution
of intensity levels.

The printing method used to obtain Figure on slide 07 was abandoned toward the
end of 1921 in favor of a technique based on photographic reproduction made
from tapes perforated at the telegraph receiving terminal.

Figure on slide 08 shows an image obtained using this method. The improvements
over previous figure are evident, both in tonal quality and in resolution.

9
Impact Of Computers For Digital Image
Processing

The concept of a computer dates back to the invention of the abacus in Asia
Minor, more than 5000 years ago. More recently, there have been
developments in the past two centuries that are the foundation of what we
call a computer today.

However, the basis for what we call a modern digital computer dates back to
only the 1940s, with the introduction by John von Neumann of two key
concepts:

1. A memory to hold a stored program and data,.


2. Conditional branching.

10
Impact Of Computers For Digital Image
Processing

These two ideas are the foundation of a central processing unit (CPU), which
is at the heart of computers today. Starting with von Neumann, there were a
series of key advances that led to computers powerful enough to be used
for digital image processing.

Briefly, these advances may be summarized as follows:

11
Impact Of Computers For Digital Image
Processing

1. Invention of the transistor at Bell Laboratories in 1948.


2. Development in the 1950s and 1960s of the high-level programming languages
COBOL (Common Business-Oriented Language) and FORTRAN (Formula
Translator).
3. Invention of the integrated circuit (IC) at Texas Instruments in 1958.
4. Development of operating systems in the early 1960s.
5. Development of the microprocessor (a single chip consisting of a CPU, memory,
and input and output controls) by Intel in the early 1970s.
6. Introduction by IBM of the personal computer in 1981.
7. Progressive miniaturization of components, starting with large-scale integration
(LI) in the late 1970s, then very-large-scale integration (VLSI) in the 1980s, to the
present use of ultra-large-scale integration (ULSI) and experimental
nanotechnologies.
12
Impact Of Computers For Digital Image
Processing

Concurrent with these advances were developments in the areas of mass


storage and display systems, both of which are fundamental requirements
for digital image processing.
The first computers powerful enough to carry out meaningful image
processing tasks appeared in the early 1960s. The birth of what we call
digital image processing today can be traced to the availability of those
machines, and to the onset of the space program during that period.
In parallel with space applications, digital image processing techniques
began in the late 1960s and early 1970s to be used in medical imaging,
remote Earth resources observations, and astronomy.

13
Examples Of Fields That Use Digital Image
Processing

Gamma-Ray Imaging

X-Ray Imaging

Imaging In The Ultraviolet Band

Imaging In The Visible And Infrared Bands

Imaging In The Microwave Band

Imaging In The Radio Band

Other Imaging Modalities

14
Examples Of Fields That Use Digital Image
Processing

GAMMA-RAY IMAGING

Major uses of imaging based on gamma rays include nuclear medicine and
astronomical observations. In nuclear medicine, the approach is to inject a
patient with a radioactive isotope that emits gamma rays as it decays.
Images are produced from the emissions collected by gamma-ray detectors.

15
Examples Of Fields That Use Digital Image
Processing

X-RAY IMAGING

X-rays are among the oldest sources of EM radiation used for imaging. The
best known use of X-rays is medical diagnostics, but they are also used
extensively in industry and other areas, such as astronomy.

16
Examples Of Fields That Use Digital Image
Processing

IMAGING IN THE ULTRAVIOLET BAND

Applications of ultraviolet “light” are varied. They include lithography,


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

17
Examples Of Fields That Use Digital Image
Processing

IMAGING IN THE VISIBLE AND INFRARED BANDS

It is not surprising that imaging in this band outweighs by far all the others in
terms of breadth of application. The infrared band often is used in
conjunction with visual imaging.

Remote sensing, Weather observation and prediction, automated visual


inspection of manufactured goods, fingerprints scanning are just a few
examples of applications in this category.

18
Examples Of Fields That Use Digital Image
Processing

IMAGING IN THE MICROWAVE BAND


The principal application of imaging in the microwave band is radar. The
unique feature of imaging radar is its ability to collect data over virtually any
region at any time, regardless of weather or ambient lighting conditions.
Some radar waves can penetrate clouds, and under certain conditions, can
also see through vegetation, ice, and dry sand.
Instead of a camera lens, a radar uses an antenna and digital computer
processing to record its images. In a radar image, one can see only the
microwave energy that was reflected back toward the radar antenna.

19
Examples Of Fields That Use Digital Image
Processing

IMAGING IN THE RADIO BAND

In medicine, radio waves are used in magnetic resonance imaging (MRI). This
technique places a patient in a powerful magnet and passes radio waves
through the individual’s body in short pulses. Each pulse causes a responding
pulse of radio waves to be emitted by the patient’s tissues. The location
from which these signals originate and their strength are determined by a
computer, which produces a two-dimensional image of a section of the
patient.

20
Examples Of Fields That Use Digital Image
Processing

OTHER IMAGING MODALITIES


Although imaging in the electromagnetic spectrum is dominant by far, there
are a number of other imaging modalities that are also important.
Imaging using “sound” finds application in geological exploration, industry,
and medicine.
Electron microscopes function as their optical counterparts, except that they
use a focused beam of electrons instead of light to image a specimen.
In addition images can be generated by computers as well.

21
Components of a general-purpose image
processing system

22
Electromagnetic Spectrum

23
Electromagnetic Spectrum

The electromagnetic spectrum can be expressed in terms of wavelength,


frequency, or energy. Wavelength (𝜆) and frequency (𝜈) are related by the
equation below.

where c is the speed of light (2.998 * 108 m/s).


The energy of the various components of the electromagnetic spectrum is given
by the equation below.

where h is Planck’s constant.

24
Electromagnetic Spectrum

Electromagnetic waves can be visualized as propagating sinusoidal waves


with wavelength or they can be thought of as a stream of massless
particles,each traveling in a wavelike pattern and moving at the speed of
light.

Each massless particle contains a certain amount (or bundle) of energy,


called a photon.

We see from equation in the previous slide that energy is proportional to


frequency, so the higher-frequency (shorter wavelength) electromagnetic
phenomena carry more energy per photon.

25
Electromagnetic Spectrum

Thus, radio waves have photons with low energies, microwaves have more
energy than radio waves, infrared still more, then visible, ultraviolet, X-rays,
and finally gamma rays, the most energetic of all.

High-energy electromagnetic radiation, especially in the X-ray and gamma


ray bands, is particularly harmful to living organisms.

26
Visible light

Light is a type of electromagnetic radiation that can be sensed by the eye.


The visible (color) spectrum is shown expanded in the figure on slide 23 for
the purpose of discussion.

The visible band of the electromagnetic spectrum spans the range from
approximately 430 nm (violet) to about 790 nm (red).

For convenience, the color spectrum is divided into six broad regions: violet,
blue, green, yellow, orange, and red.

No color ends abruptly; rather, each range blends smoothly into the next, as
the figure on slide 23 shows.
27
Color objects

The colors perceived in an object are determined by the nature of the light
reflected by the object.
A body that reflects light relatively balanced in all visible wavelengths
appears white to the observer.
However, a body that favors reflectance in a limited range of the visible
spectrum exhibits some shades of color.
For example, green objects reflect light with wavelengths primarily in the
500 to 570nm range, while absorbing most of the energy at other
wavelengths.

28
monochromatic (or achromatic) light

Light that is void of color is called monochromatic (or achromatic) light.

The only attribute of monochromatic light is its intensity. Because the


intensity of monochromatic light is perceived to vary from black to grays
and finally to white, the term gray level is used commonly to denote
monochromatic intensity (we use the terms intensity and gray level
interchangeably in subsequent discussions).

The range of values of monochromatic light from black to white is usually


called the gray scale, and monochromatic images are frequently referred to
as grayscale images.

29
Chromatic (color) light

Chromatic (color) light spans the electromagnetic energy spectrum from


approximately 430 to 790nm, as noted previously.

In addition to frequency, three other quantities are used to describe a


chromatic light source: radiance, luminance, and brightness.

30
Radiance

Radiance is the total amount of energy that flows from the light source, and
it is usually measured in Watts (W).

31
Luminance

Luminance, measured in lumens (lm), gives a measure of the amount of


energy an observer perceives from a light source.

For example, light emitted from a source operating in the far infrared region
of the spectrum could have significant energy (radiance), but an observer
would hardly perceive it; its luminance would be almost zero.

32
Brightness

Brightness is a subjective descriptor of light perception that is practically


impossible to measure.

It embodies the achromatic notion of intensity and is one of the key factors
in describing color sensation.

33
Basic Mathematical tools used in image
processing

ELEMENTWISE VERSUS MATRIX OPERATIONS

Images can be viewed equivalently as matrices.

An elementwise operation involving one or more images is carried out on a


pixel-by pixel basis.

For example, consider the following 2 × 2 images (matrices).

34
Basic Mathematical tools used in image
processing

The elementwise product (often denoted using the symbol ⊙ or ⊗) of these


two images is:

35
Basic Mathematical tools used in image
processing

On the other hand, the matrix product of the images is formed using the rules of matrix
multiplication:

36
Basic Mathematical tools used in image
processing

ARITHMETIC OPERATIONS

Arithmetic operations between two images f (x, y) and g(x, y) are denoted as:

37
Basic Mathematical tools used in image
processing

These are elementwise operations which means that they are performed
between corresponding pixel pairs in f and g for x = 0, 1, 2,…,M − 1 and y =
0, 1, 2,…, N − 1.

M and N are the row and column sizes of the images. Clearly, s, d, p, and v
are images of size M × N also.

Note that image arithmetic in the manner just defined involves images of the
same size.

38
Basic Mathematical tools used in image
processing

SET AND LOGICAL OPERATIONS

A set is a collection of distinct objects. If a is an element of set A, then we


write a ∈ A.

Similarly, if a is not an element of A we write a ∉ A.

The set with no elements is called the null or empty set, and is denoted by ∅.

A set is denoted by the contents of two braces: { ⋅ }.

Example: C = {c | c = -d, d ∈ D}

39
Basic Mathematical tools used in image
processing

SET AND LOGICAL OPERATIONS

If every element of a set A is also an element of a set B, then A is said to be


a

subset of B, denoted as A ⊆ B.

The union of two sets A and B, denoted as C = A ⋃ B.

Similarly, the intersection of two sets A and B, denoted by D = A ⋂ B.

Sets A and B are said to be disjoint or mutually exclusive if they have no


elements in common, in which case, A ⋂ B = ∅.
40
Basic Mathematical tools used in image
processing

SET AND LOGICAL OPERATIONS

The sample space, 𝛺, (also called the set universe) is the set of all possible
set elements in a given application.

By definition, these set elements are members of the sample space for that
application.

The complement of a set A is the set of elements that are not in A:

Ac = {w | w ∉ A}

41
Basic Mathematical tools used in image
processing

SET AND LOGICAL OPERATIONS

The difference of two sets A and B, denoted A − B, is defined as A − B = {w| w ∈ A, w ∉ B} = A


⋂ Bc.
The Cartesian product of two sets X and Y, denoted X × Y, is the set of all possible ordered pairs
whose first component is a member of X and whose second component is a member of Y.

X × Y = {(x, y) | x ∈ X and y ∈ Y}

42
Basic Mathematical tools used in image
processing

LOGICAL OPERATIONS

Logical operations deal with TRUE (typically denoted by 1) and FALSE (typically
denoted by 0) variables and expressions.

For our purposes, this means binary images composed of foreground (1-valued)
pixels, and a background composed of 0-valued pixels.

43
Reference

Gonzalez et al. 2018. Digital Image Processing. 4th Ed. Pearson.

44

You might also like