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

Fundamentals of Image Processing

The document discusses the origins and fundamentals of digital image processing. It begins by explaining how one of the first applications of digital images was transmitting newspaper pictures via submarine cable in the 1920s. It then covers topics like the human visual system, image sensing and acquisition, what constitutes a digital image, and the concepts of sampling and quantization in converting analog images to digital form.

Uploaded by

Avadhraj Verma
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Fundamentals of Image Processing

The document discusses the origins and fundamentals of digital image processing. It begins by explaining how one of the first applications of digital images was transmitting newspaper pictures via submarine cable in the 1920s. It then covers topics like the human visual system, image sensing and acquisition, what constitutes a digital image, and the concepts of sampling and quantization in converting analog images to digital form.

Uploaded by

Avadhraj Verma
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 103

Fundamentals of Image

Processing
The 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.

• 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 and then reconstructed them at the receiving end.
• Initial problems in improving the visual quality of early digital
pictures were sometimes related to the selection of printing
procedures and the distribution of intensity levels.

A digital picture produced in 1921 from a


coded tape by a telegraph printer with
special type faces.
Human Visual System
• The function of a visual system is to detect electromagnetic radiation (EMR) emitted by objects.

• Humans can detect light wavelength between 400-700 nm.

• Perceived color (hue) is related to the wavelength of light.

• Brightness is related to the intensity of the radiation.

• Functions of vision
• Discriminate figure from background (food or rock?)
• Detect movement (predator / prey?)
• Detect color (adaptive value of color vision)
Image Sensing and Acquisition
• Most of the images in which we are interested are generated by the
combination of an "illumination" source and the reflection or absorption
of energy from that source by the elements of the "scene" being
imaged.

• The illumination may originate from a source of electromagnetic energy


such as radar, infrared, or X-ray system or ultrasound or even a
computer-generated illumination pattern.

• Depending on the nature of the source, illumination energy is reflected


from, or transmitted through objects.
EM Spectrum.

Bands of the EM spectrum are not distinct but rather transition smoothly from one to the other.
Cont.
• The visible spectrum can be divided into three bands:
• Light is a particular type of electromagnetic radiation that can be
sensed by the human eye.

• The colors that humans perceive in an object are determined by the


nature of the light reflected from the object.

• For example, green objects reflect light with wavelengths primarily in


the 500 to 570 nm range while absorbing most of the energy at other
wavelengths.

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


• In addition to frequency, three basic quantities are used to describe
the quality of a chromatic light source: radiance, luminance, and
brightness.

• Radiance is the total amount of energy that flows from the light
source, and it is usually measured in watts (W)
• Luminance, measured in lumens (Im), gives a measure of the
amount of energy an observer perceives from a light source.

• Brightness is a subjective descriptor of light perception that is


practically impossible to measure.

• The part of the infrared band close to the visible spectrum is called
the near-infrared region.

• The opposite end of this band is called the far-infrared region.


• In principle, if a sensor can be developed that is capable of detecting
energy radiated by a band of the electromagnetic spectrum, we can
image events of interest in that band.

• It is important to note, however, that the wavelength of an


electromagnetic wave required to "see" an object must be of the same
size as or smaller than the object.

• This limitation, along with the physical properties of the sensor


material, establishes the fundamental limits on the capability of
imaging sensors, such as visible, infrared, and other sensors in use
today.
Image Acquisition Using a Single Sensor
• Sensor of this type is the photodiode

• The use of a filter in front of a sensor


improves selectivity.

• In order to generate a 2-D image


using a single sensor, there has to be
relative displacements in both the x-
and y-directions between the sensor
and the area to be imaged.
Image Acquisition Using Sensor Arrays
• Figure shows individual
sensors arranged in the
form of a 2-D array.

• This is also the


predominant arrangement
found in digital cameras.

• A typical sensor for these


cameras is a CCD array.
A Simple Image Formation Model
• The function f(x,y) may be characterized by two components:

1. the amount of source illumination incident on the scene being


viewed, and
2. the amount of illumination reflected by the obiects in the scene.

• Appropriately, these are called the illumination and reflectance


components and are denoted by i(x,y) and r(x,y), respectively.
A Simple model of image formation
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
Cont.
• This figure shows the energy from an illumination source being
reflected from a scene element.

• The first function performed by the imaging system is to collect


the incoming energy and focus it onto an image plane.

• If the illumination is light, the front end of the imaging system is


an optical lens that projects the viewed scene onto the lens
focal plane.
Cont.
• The sensor array, which is coincident with the focal plane produces
outputs proportional to the integral of the light received at each sensor.

• Digital and analog circuitry sweep these outputs and convert them to
an analog signal, which is then digitized by another section of the
imaging system.

• The output 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
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


What is Digital Image?
• Image: A two-dimensional function, f(x,y), where x and y are spatial
coordinates, and 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 f are all finite, discrete quantities, image is a digital image.
Analog vs Digital
Advantages of Digital Image Processing
• Humans are limited to the visual band of the electromagnetic
(EM) spectrum.

• But imaging machines cover almost the entire EM spectrum, ranging from
gamma to radio waves.

• Thus operate on images generated by sources that humans are not


capable to sense.

• These include ultrasound, electron microscopy, and computer-generated


images.
Useful Paradigm in the World of Images
• Considering three types of computerized processes:

• Low-level processes,
• Mid-level processes
• High-level processes.

• First involves primitive operations such as image preprocessing to


reduce noise, contrast enhancement, and image sharpening.

• Thus, a low-level process is characterized by the fact that both its inputs
and outputs are images.
Cont.
• Second involves tasks such as segmentation, description of those
objects to reduce them to a form suitable for computer processing, and
classification of individual objects.

• Thus, a mid-level process is characterized by the fact that its inputs


generally are images, but its outputs are attributes extracted from those
images (e.g., edges, contours, and the identity of individual objects).

• Third involves "making sense" of an ensemble of recognized objects, as


in image analysis, and at the far end performing the functions normally
associated with vision.
Sampling and quantization

• The quality of a digital image is determined to a large degree by the


number of samples and discrete intensity levels used in sampling and
quantization.
• For numerous ways to acquire images, objective is same:

To generate digital images from sensed data.

• The output of most sensors is a continuous voltage waveform


whose amplitude and spatial behavior are related to the
physical phenomenon being sensed.

• To create a digital image, we need to convert the continuous


sensed data into digital form.

• This involves two processes: sampling and quantization.


Cont.
• Sampling the analog signal mean instantaneously measuring the
voltage of the signal at fixed interval in time.

• The value of the voltage at each instant is converted into a number


and stored.

• The number represents the brightness of the image at that point.


• The "grabbed" image is now a digital image and can be accessed as a
two dimensional array of data.

• Each data point is called a pixel (picture element).

• The notation used to express a digital image: I(r, c)

• I(r,c) = The brightness of the image at point (r,c)

• Where, r = row and c = column.


Basic Concepts in Sampling and Quantization
• Let a continuous image f is to be converted to digital form.

• An image may be continuous with respect to the × and y coordinates,


and also in amplitude.

• To convert it to digital form, we have to sample the function in both


coordinates and in amplitude.

• Digitizing the coordinate values is called sampling.


• Digitizing the amplitude values is called quantization.
• A plot of amplitude
(intensity level) values
of the continuous image
along the line segment
AB.

• To sample this function,


we take equally spaced
samples along line AB.
• The samples are shown
as small white squares
superimposed on the
function.

• The set of these discrete


locations gives the
sampled function.

• However, the values of


the samples still span
(vertically) a continuous
range of intensity values.
• The assignment is made
depending on the vertical
proximity of a sample to a
vertical tick mark.

• The digital samples resulting


from both sampling and
quantization are shown.

• Starting at the top of the


image and carrying out this
procedure line by line
produces a two dimensional
digital image.
• When a sensing strip is used for image acquisition, the number of
sensors in the strip establishes the sampling limitations in one
image direction.

• When a sensing array is used for image acquisition, there is no


motion and the number of sensors in the array establishes the
limits of sampling in both directions.
• The quality of a digital image is determined to a large degree
by the number of samples and discrete intensity levels used in
sampling and quantization.
Image sampling (example)
original image sampled by a factor of 2

sampled by a factor of 4 sampled by a factor of 8


Image quantization(example)
• 256 gray levels (8bits/pixel) 32 gray levels (5 bits/pixel) 16 gray levels (4 bits/pixel)

• 8 gray levels (3 bits/pixel) 4 gray levels (2 bits/pixel) 2 gray levels (1 bit/pixel)


How are images represented in the computer?
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.
Image digitization

• Sampling means measuring the value of an image at a finite number of points.


• Quantization is the representation of the measured value at the sampled point by
an integer.
Digital image
• An image is represented by a rectangular array of integers.
• An integer represents the brightness or darkness of the image at that point.
• N: # of rows, M: # of columns, Q: # of gray levels
• N= ,M= , Q = (q is the # of bits/pixel)
• Storage requirements: NxMxQ (e.g., N=M=1024, q=8, 1MB)
Image file formats
• Many image formats adhere to the simple model shown below (line by line, no breaks
between lines).
• The header contains at least the width and height of the image.
• Most headers begin with a signature or “magic number” - a short sequence of bytes for
identifying the file format.
Cont.
• The magic number bytes header is used to identify the type of file.
The image data is the actual image data, which is stored in a binary
format.

• The magic number bytes header is a sequence of bytes that is


unique to the file type. These bytes are used by software to identify
the file type and load the image data.
Cont.
• The image data is stored in a binary format, which means that it is
represented as a sequence of bits. The bits are stored in groups of 8,
which are called bytes. Each byte can represent a value from 0 to
255.

• The diagram shows that the magic number bytes header is followed
by the image data. The image data is then followed by a padding
byte, which is a byte that is used to pad the file to a certain size.
Common image file formats
• GIF (Graphic Interchange Format) -
• PNG (Portable Network Graphics)
• JPEG (Joint Photographic Experts Group)
• TIFF (Tagged Image File Format)
• PGM (Portable Gray Map)
• FITS (Flexible Image Transport System)
• GIF: A lossless image format that uses a color palette of up to 256 colors. GIF
files are often used for web graphics, as they can be relatively small in size.

• PNG: A lossless image format that supports up to 16 million colors. PNG files
are often used for images that require high color accuracy, such as logos and
illustrations.

• JPEG: A lossy image format that uses a compression algorithm to reduce the
file size of an image. JPEG files are often used for photographs, as they can be
compressed without significantly affecting the image quality.

• TIFF: A lossless image format that supports a wide range of color depths and
resolutions. TIFF files are often used for images that require high quality, such
as scanned documents and photographs.
Cont.
• PGM: The Portable Graymap (PGM) format is a simple, lossless image
format that stores grayscale images. Each pixel in a PGM image is
represented by a single byte, which can store a value from 0 to 255. This
means that PGM images can store a maximum of 256 different gray levels.

• FITS: The Flexible Image Transport System (FITS) format is a more complex,
lossless image format that can store grayscale, color, and spectral images.
FITS images are typically used in astronomy and other scientific
applications.
Comparison of image formats
• PGM: A binary image file format that stores grayscale images.

• GIF: A lossless image file format that stores images with a limited number of colors.

• TIF: A lossless image file format that stores images with a wide range of colors.

• PS: A vector image file format that stores images as a set of mathematical objects.

• HIPS: A lossless image file format that stores images with a high dynamic range.

• JPG (lossless): A lossless image file format that stores images using a compression algorithm
that preserves image quality.

• JPG (lossy): A lossy image file format that stores images using a compression algorithm that
reduces image quality to save space.
PGM format
• A popular format for grayscale images (8 bits/pixel)
• Closely-related formats are:
• PBM (Portable Bitmap), for binary images (1 bit/pixel)
• PPM (Portable Pixelmap), for color images (24 bits/pixel)

ASCII or binary (raw) storage


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.
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: Image Output: Attributes Output: Understanding
Examples: Noise Examples: Object Examples: Scene
removal, image recognition, understanding,
sharpening segmentation autonomous navigation

In this course we will


stop here
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
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
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
Key Stages in Digital Image Processing:
Colour Image Processing

Image Morphological
Restoration Processing

Image
Segmentation
Enhancement

Image Object
Acquisition Recognition

Representation
Problem Domain
Colour Image Image & Description
Processing Compression
Color Model
A color model is a system used to describe a color. Different types of
color models are used in multiple fields like in hardware, in multiple
applications of creating animation, etc.
• RGB
• CMYK
• HSI
• YIQ
Before discussing different color models let us discuss types of color model.

Types of color model:


1. Additive Color Model
2. Subtractive Color Model
Additive Color Model
• These type of models use light which is emitted directly from a source to
display colors.

• These models mixes different amount of RED, GREEN, and BLUE (primary
colors) light to produce rest of the colors.

• Adding these three primary colors results in WHITE image.

• Example: RGB model is used for digital displays such as laptops, TVs,
tablets, etc.
Subtractive Color Model
• These type of models use printing inks to display colors.

• Subtractive color starts with an object that reflects light and uses colorants to
subtract portions of the white light illuminating an object to produce other colors.

• If an object reflects all the white light back to the viewer, it appears white, and if it
absorbs all the light then it appears black.

• Example: Graphic designers used the CMYK model for printing purpose.
RGB Model:
• The RGB color model is an additive color model.

• The RGB color model is one of the most widely used color representation
method in computer graphics. It use a color coordinate system with three
primary colors:
R(red), G(green), B(blue)

• Each primary color can take an intensity value ranging from 0(lowest) to
1(highest). Mixing these three primary colors at different intensity levels
produces a variety of colors.
The primary colors are added to produce secondary colors.
Red + Blue = Magenta
Red + Green = Yellow
Blue + Green = Cyan
CMY and CMYK Models:
• cyan, magenta, and yellow are the secondary colors of light or, alternatively, they
are the primary colors of pigments.

• For example, when a surface coated with cyan pigment is illuminated with white
light, no red light is reflected from the surface.

• That is, cyan subtracts red light from reflected white light, which itself is composed
of equal amounts of red, green, and blue light.

• equal amounts of the pigment primaries, cyan, magenta, and yellow, should
produce black.
Cont.
• In practice, because C, M, and Y inks seldom are pure colors, combining
these colors for printing black produces instead a muddy-looking
brown.

• So, in order to produce true black (which is the predominant color in


printing), a fourth color, black, denoted by K, is added, giving rise to the
CMYK color model.

• The black is added in just the proportions needed to


produce true black.
C=1-R
M =1 - G
Y=1-B
HSI Model:
• The HSI color model represents every color with three components: hue (H),
saturation (S), intensity (I).

• The Hue component describes the color in the form of an angle between [0,360]
degrees.

• The Saturation component describes how much the color is diluted with white
light.

• The range of the S varies between [0,1]. The Intensity range is between [0,1] and 0
means black, 1 means white.
YIQ Model:

• YIQ is the most widely color model used in Television broadcasting.

• Y stands for luminance part and IQ stands for chrominance part. In the
black and white television, only the luminance part (Y) was broadcast.

• The y value is similar to the grayscale part. The color information is


represented by the IQ part.
Computer Vision and Nearby Fields
• Computer Graphics: Models to Images
• Comp. Photography: Images to Images
• Computer Vision: Images to Models
Computer Vision
Make computers understand images and
video.

What kind of scene?

Where are the cars?

How far is the


building?


Vision is really hard

• Vision is an amazing feat of natural intelligence

– More human brain devoted to vision than anything else

Is that a
queen or a
bishop?
Why computer vision matters

Safety Health Security

Comfort Fun
Ridiculously brief history of computer vision
• 1966: Minsky assigns computer vision
as an undergrad summer project
• 1960’s: interpretation of synthetic
worlds Guzman ‘68
• 1970’s: some progress on interpreting
selected images
• 1980’s: ANNs come and go; shift toward
geometry and increased mathematical
rigor
• 1990’s: face recognition; statistical Ohta Kanade ‘78
analysis in vogue
• 2000’s: broader recognition; large
annotated datasets available; video
processing starts

Turk and Pentland ‘91


How vision is used now
• Examples of state-of-the-art

Some of the following slides by Steve Seitz


Optical character recognition (OCR)
Technology to convert scanned docs to text
• If you have a scanner, it probably came with OCR software

Digit recognition, AT&T labs License plate readers


http://www.research.att.com/~yann/ http://en.wikipedia.org/wiki/Automatic_number_plate_recognition
Face detection

• Many new digital cameras now detect faces


– Canon, Sony, Fuji, …
Smile detection

Sony Cyber-shot® T70 Digital Still Camera


3D from thousands of images

Building Rome in a Day: Agarwal et al. 2009


Object recognition (in supermarkets)

LaneHawk by EvolutionRobotics
“A smart camera is flush-mounted in the checkout lane, continuously
watching for items. When an item is detected and recognized, the
cashier verifies the quantity of items that were found under the basket,
and continues to close the transaction. The item can remain under the
basket, and with LaneHawk,you are assured to get paid for it… “
Vision-based biometrics

“How the Afghan Girl was Identified by Her Iris Patterns” Read the story
wikipedia
Login without a password…

Face recognition systems now


Fingerprint scanners on
beginning to appear more widely
many new laptops, http://www.sensiblevision.com/
other devices
Object recognition (in mobile phones)

Point & Find, Nokia


Google Goggles
Special effects: shape capture

The Matrix movies, ESC Entertainment, XYZRGB, NRC


Special effects: motion capture

Pirates of the Carribean, Industrial Light and Magic


Sports

Sportvision first down line


Nice explanation on www.howstuffworks.com

http://www.sportvision.com/video.html
Smart cars Slide content courtesy of Amnon Shashua

• Mobileye
– Vision systems currently in high-end BMW, GM,
Volvo models
– By 2010: 70% of car manufacturers.
Google cars

http://www.nytimes.com/2010/10/10/science/10google.html?ref=artificialintelligence
Interactive Games: Kinect
• Object Recognition:
http://www.youtube.com/watch?feature=iv&v=fQ59dXOo63o
• Mario: http://www.youtube.com/watch?v=8CTJL5lUjHg
• 3D: http://www.youtube.com/watch?v=7QrnwoO1-8A
• Robot: http://www.youtube.com/watch?v=w8BmgtMKFbY
Vision in space

NASA'S Mars Exploration Rover Spirit captured this westward view from atop
a low plateau where Spirit spent the closing months of 2007.

Vision systems (JPL) used for several tasks


• Panorama stitching
• 3D terrain modeling
• Obstacle detection, position tracking
• For more, read “Computer Vision on Mars” by Matthies et al.
Industrial robots

Vision-guided robots position nut runners on wheels


Mobile robots

NASA’s Mars Spirit Rover


http://en.wikipedia.org/wiki/Spirit_rover http://www.robocup.org/

Saxena et al. 2008


STAIR at Stanford
Medical imaging

Image guided surgery


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

You might also like