You are on page 1of 69

Chapter 1:

Introduction to Computer Vision and Image


Processing

By Samson A.
Outline
• What is Computer Vision/Image Processing?
• Computer Vision Vs image processing
• Application of CV and IP
• Different Image processing examples
• Fundamental steps in image processing
What is Computer Vision/Image Processing

• image processing and computer vision have


become one of the most widespread
application areas of computer science.
• In mathematical terms, continuous 2D f(x,y),
where x and y represent spatial coordinates
and the value of f at any given values of x and
y represents the intensity, or grey level, of the
image
Continued…
• The field of digital image processing refers to
processing digital images by means of a digital
computer.
• A digital image is composed of a finite number
of elements, each of which has a particular
location and value.
• These elements are referred to as picture
elements, image elements, pels, and pixels.
Continued…
• Vision is the most advanced of our senses, so
it is not surprising that images play the single
most important role in human perception.
• Unlike humans, who are limited to the visual
band of the electromagnetic (EM) spectrum,
imaging machines cover almost the entire EM
spectrum, ranging from gamma to radio
waves.
Continued…
• A number of terms are used to describe
computer processing of such images
• You may hear it referred to as image
processing, image analysis or computer
vision
Continued…
• Image processing generally refers to low-level
algorithms and processing that take an image as their
input and produce another, modified, image as their
output.
• Examples reduce noise or enhance certain features
• Image analysis techniques take an image as their
input, but their output is typically some higher-level
feature or attribute of the image.
• Example extraction and segmenting the image into
individual objects.
Continued…
• Computer vision involves making sense of the
recognized objects in the image, often using
three-dimensional analysis of the viewed
scene.
Applications of Image Processing
• Today, there is almost no area of technical
endeavor that is not impacted in some way by
digital image processing.
• Image processing applications is to
categorize images according to their source
(e.g., X-ray, visual, infrared, and so on).
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.
Continued…
• In positron emission tomography (PET), the
patient is injected with a radioactive isotope
that emits positrons. The positrons collide
with electrons and produce gamma rays that
can be detected to form images.
Continued…
X-Ray Imaging
• Probably the oldest and most widely known
form of medical image is the x-ray
• The best known use of X-rays is medical
diagnostics,
• but they are also used extensively in industry
and other areas, such as astronomy.
• generated using an X-ray tube, which is a
vacuum tube with a cathode and anode.
Continued…
• The cathode is heated, causing free electrons
to be released.
• These electrons flow at high speed to the
positively charged anode. When the electrons
strike a nucleus, energy is released in the form
of X-ray radiation.
Angiography is another major
application in an area called contrast
enhancement radiography.
Ultraviolet Imaging
• Ultraviolet imaging has a wide range of applications,
including medicine, microscopy, industry and
astronomy.
• Ultraviolet light is used in fluorescence microscopy,
one of the fastest growing areas of microscopy
• The Next Figure shows an example from agriculture,
in which diseased corn can be easily identified from
an image acquired in the ultraviolet band.
Continued…

Visible and Infrared Imaging
• the visual band of the electromagnetic
spectrum is the most familiar in all our
activities
The infrared band often is used in conjunction
with visual imaging,
• so we have grouped the visible and infrared
bands
Continued…
• (a) microscope image of the surface of an audio CD; (b) satellite image of
Hurricane Andrew, imaged in the visible and infrared bands; (c) a picture
of the moon.
Microwave Imaging
• The main application of imaging in the
microwave band is radar.
• Radar has the potential to “see through”
clouds, vegetation and ice.
• Radar is an active imaging system, in that it
produces its own microwave pulses, and then
uses an antenna to receive the reflected
waves.
Continued…

Microwave imaging: a radar image of the


mountains of Tibet.
Radio Imaging
• The main application of radio imaging is in medicine.
Magnetic Resonance Imaging (MRI) has revolutionised
the field of medical diagnosis.
• Whereas some other forms of medical imaging (e.g. x-
ray, CT) can have harmful side effects if high doses are
received,
• MRI offers a completely non-invasive, non-harmful way
of imaging the insides of peoples’ bodies.
• These radio waves are detected and used to construct
a three-dimensional image of the patient’s body
Continued…

(a) a magnetic resonance imaging (MRI) image of a human


knee; (b) a MRI image of a human spine.
Other Modalities
• Although EM spectrum imaging is the most
common, there are a number of other imaging
modalities that we will consider in this section.
• Acoustic Imaging
• It may sound strange to talk about images of
sound, but acoustic waves are signals just like
EM waves, and so reflected sound can be
formed into an image with intensities too.
• Acoustic imaging is very common in medicine.
In ultrasound (US) systems, a linear array of
emitters directs a plane of acoustic waves into
the patient’s body.

• Acoustic imaging: an ultrasound (US) image of a baby in a womb.


Electron Microscopes
• Electron microscopes work by directing a beam
of electrons through a specimen, and detecting
the strength of the received beam on the other
side.
• A scanning electron microscope scans this beam
across the whole specimen to build up an
image.
• Electron microscopes are capable of extremely
high magnification (10,000 times or more)
a) a damaged integrated circuit.
Fundamental Steps in Digital Image
Processing
• The fields of image processing and computer
vision include a wide range of different areas.
• Image acquisition is the process of acquiring
the original image. The details of this process
are obviously dependent on the image modality
being used.
• Generally, the image acquisition stage also
involves some pre-processing of the acquired
image, for example scaling.
Continued…
• Image enhancement involves processing the image with the
aim of emphasising or highlighting certain features of interest.
• Image restoration has a degree of overlap with image
enhancement.
• The aim of image restoration is also to improve the
appearance of an image.
• Restoration techniques are typically employed when the image
has been degraded by some noise or interference, and the
measures used to assess the performance of image restoration
are objective,
• whereas image enhancement is a more subjective process,
with the aim being to make it look better for human viewers.
Continued…
• Colour image processing deals with ways of
representing and processing colour images.
• Image compression deals with techniques for
reducing the amount of storage required to save an
image. With the increase in popularity of the
Internet and communication in general this has
become an active area of research.
• Image feature extraction, also known as
morphological processing, deals with developing
tools for extracting image features.
• Examples of image features include boundaries,
regions, and corners. Image features are typically
selected because they are useful in representing and
describing particular shapes or objects.
• Image segmentation deals with dividing up the image
into a number of different regions, each of which
contains a different object.
• Finally, the term recognition refers to the process of
identifying the segmented objects.
• For example, in face recognition program the
segmentation process would identify what areas of the
image contained faces, whilst the recognition stage
would decide what faces they were.
Continued…
• Of these techniques, image acquisition involves capturing
the original image. Its input will be analogue information
and its output will be a digital image.
• The next four areas (image enhancement, image
restoration, colour image processing and image
compression) have images as their input, and images as
their output. Therefore they can be considered to be image
processing techniques.
• The final three areas (image feature extraction,
segmentation and recognition) have images as their input,
but produce some higher-level information as their output.
They can therefore be considered to be image analysis
techniques.
Image Representation
• Digital image I(r, c) is represented as a two-
dimensional array of data.
• Each pixel value corresponds to the brightness
of the image at point (r, c).
• This image model is for monochrome (one
color, or black and white) image data.
Image Representation
• Multiband images (color, multispectral) can be
modeled by a different I(r, c) function for each
separate band of brightness information.
• Types of images that will discuss:
– Binary
– Gray-scale
– Color
– Multispectral
Binary Images
• Takes only two values:
– Black and white (0 and 1)
– Requires 1 bit/pixel
• Used when the only information required is
shape or outline info. For example:
– To position a robotic gripper to grasp an object.
– To check a manufactured object for deformations.
– For facsimile (FAX) images.
Binary Images
Binary Images

• Binary images are often


created from gray-scale
images via a threshold
operation.
– White (‘1’) if pixel value is
larger than threshold.
– Black (‘0’) if it is less.
Gray-Scale Images
• Also referred to as monochrome or one-color
images.
• Contain only brightness information. No color
information.
• Typically contain 8 bits/pixel data, which
corresponds to 256 (0 to 255) different
brightness (gray) levels.
Gray-Scale Images
• Why 8 bits/pixel?
– Provides more than adequate brightness
resolution.
– Provides a “noise margin” by allowing
approximately twice gray levels as required.
– Byte (8-bits) is the standard small unit in
computers.
Gray-Scale Images
• However, there are applications such as
medical imaging or astronomy that requires
12 or 16 bits/pixel.
– Useful when a small section of the image is
enlarged.
– Allows the user to repeatedly zoom a specific area
in the image.
Color Images
• Modeled as three band monochrome image
data.
• The values correspond to the brightness in
each spectral band.
• Typical color images are represented as red,
green and blue (RGB) images.
Color Images

• Using the 8-bit standard model, a color image


would have 24 bits/pixel.
– 8-bits for each of the three color bands (red, green and
blue).
Color Images
• For many applications, RGB is transformed to a mathematical
space that decouples (separates) the brightness information
from color information.
• The transformed images would have a:
– 1-D brightness or luminance.
– 2-D color space or chrominance.
• This creates a more people-oriented way of describing colors.
Color Images
• One example is the hue/saturation/lightness
(HSL) color transform.
– Hue: Color (green, blue, orange, etc).
– Saturation: How much white is in the color (pink is
red with more white, so it is less saturated than
pure red).
– Lightness: The brightness of the color.
Color Images
• Most people can relate to this method of
describing color.
– “A deep, bright orange” would have a large
intensity (bright), a hue of orange and a high value
of saturation (deep).
– It is easier to picture this color in mind.
– If we define this color in terms of RGB component,
R = 245, G = 110, B = 20, we have no idea how this
color looks like.
Color Images

• One color space can be converted to another


color space by using equations.
• Example: Converting RGB color space to YCrCb
color space.
Multispectral Images
• Typically contain information outside normal
human perceptual range.
– Infrared, ultraviolet, X-ray, acoustic or radar data.
• They are not really images in usual sense (not
representing scene of physical world, but
rather information such as depth).
• Values are represented in visual form by
mapping the different spectral bands to RGB.
Multispectral Images
• Sources include satellite system, underwater
sonar system, airborne radar, infrared imaging
systems, and medical diagnostic imaging
systems.
• The number of bands into which the data are
divided depends on the sensitivity of the
imaging sensory.
Multispectral Images
• Most satellite images contain two to seven
spectral bands.
– One to three in the visible spectrum.
– One or more in the infrared region.
• Newest satellites have sensors that collect
image information in 30 or more bands.
• Due to the large amount of data involved,
compression is essential.
Digital Image File Formats
• There are many different types of image file
formats. This is because:
– There are many different types of images and
applications with varying requirements.
– Lack of coordination within imaging industry.
• Images can be converted from one format to
another using image conversion software.
Digital Image File Formats
• Types of image data are divided into two
categories:
– Bitmap (raster) images: where we have pixel data
and the corresponding brightness values stored in
some file format.
– Vector images: methods of representing lines,
curves and shapes by storing only the key points.
The process of turning the key points into an
image is called rendering.
Digital Image File Formats
• Most of the file formats to be discussed fall
under the category of bitmap images.
• Some of the formats are compressed.
– The I(r, c) values are not available until the file is
decompressed.
• Bitmap image files must contain both header
information and the raw pixel data.
Digital Image File Formats
• The header contain information regarding:
– The number of rows (height)
– The number of columns (width)
– The number of bands
– The number of bits per pixel
– The file type
– Type of compression used (if applicable)
Digital Image File Formats
• BIN format:
– Only contain the raw data I(r, c) and no header.
– Users must know the necessary parameters
beforehand.
• PPM format(portable pix map):
– Contain raw image data with a simple header.
– PBM (binary), PGM (gray-scale), PPM (color) and
PNM (handles any of the other types).
Digital Image File Formats
• GIF (Graphics Interchange Format):
– Commonly used in WWW.
– Limited to a maximum of 8 bits/pixel (256 colors).
– The bits are used as an input to a lookup table.
– Allow for a type of compression called
LZW(Lempel–Ziv–Welch).
– Image header is 13 bytes long.
Digital Image File Formats
• TIFF (Tagged Image File Format):
– Allows a maximum of 24 bits/pixel.
– Support several types of compression: RLE(Run-
length encoding), LZW, and JPEG(Joint
Photographic Experts Group).
– Header is of variable size and is arranged in a
hierarchical manner.
– Designed to allow user to customize it for specific
applications.
Digital Image File Formats
• JFIF (JPEG File Interchange Format):
– Allows images compressed with JPEG algorithm to
be used in many different computer platforms.
– Contains a Start of Image (SOI) and an application
marker that serves as a file header.
– Being used extensively in WWW.
Digital Image File Formats
• Sun Raster file format:
– Defined to allow for any number of bits per pixel.
– Supports RLE compression and color lookup
tables.
– Contains 32-byte header, followed by the image
data.
Digital Image File Formats
• SGI file format ( silicon graphic image):
– Handles up to 16 million colors.
– Supports RLE compression.
– Contains 512-byte header, followed the image
data.
– Majority of the bytes in header are not used,
presumably for future extension.
Digital Image File Formats
• EPS (Encapsulated PostScript):
– Not a bitmap image. The file contains text.
– It is a language that supports more than just
images. Commonly used in desktop publishing.
– Directly supported by many printers (in the
hardware itself).
– Commonly used for data interchange across
hardware and software platforms.
– The files are very big.
Computer Vision Applications
– Industrial inspection/quality control
– Surveillance and security
– Face recognition
– Gesture recognition
– Space applications
– Medical image analysis
– Autonomous vehicles
– Virtual reality and much more …...
62
Face Detection Face Blurring

63
Medical image analysis

Image guided surgery


3D imaging: MRI, CT Grimson et al., MIT

64
Surveillance and tracking

65
Surveillance and tracking

66
Vehicle and pedestrian protection

Lane departure warning, collision warning, traffic sign recognition,


pedestrian recognition, blind spot warning
67
Optical character recognition

Digit recognition, AT&T labs License place recognition


http://www.research.att.com/~yann

68
Sports video analysis

Tennis review system


69

You might also like