By,
Prof (Dr.) P P Ghadekar
Outline
❖ Basic Concepts of Image Processing
❖ Key Stages of Image Processing
❖ Image Formation
❖ Image Processing Applications & Research Areas etc.
Prof P P Ghadekar, VIT Pune 2
Why Image Processing
➢ To Extract useful information/intelligence from the image.
➢ To study nature and characteristics of an image.
➢ To analyze the image.
➢ To study various attributes of the image.
➢ To improve quality of an image for human interpretation.
➢ To process an image data for storage, transmission and
representation for autonomous machine perception.
Prof P P Ghadekar, VIT Pune 3
IT-Image Processing & CV
❖ Prerequisite:
➢ Knowledge of Different types of Signals, Linear Algebra, Probability
and Statistics
❖ Course Outcomes:
➢ The student will be able to
1. Apply lossless and Lossy compression techniques for image
compression.
2. Explore pre-processing algorithms to acquire images
3. Use Wavelet transforms to analyze and modify image
4. Extract features from Images and do analysis of Images
5. Apply Supervised and Unsupervised Machine Learning for Image
Classification
6. Make use of Computer Vision algorithms to solve real-world
problems.
Prof P P Ghadekar, VIT Pune 4
Image Processing & Computer Vision-Syllabus
❖ Section-I
➢ Introduction to Image Processing
➢ Image Enhancement
➢ Image compression and its need
❖ Section-II
➢ Shape Representation and Segmentation
➢ Object recognition
➢ Machine Learning for Image classification
Image Processing & Computer Vision Syllabus
Prof P P Ghadekar, VIT Pune 5
IP & CV-Books
❖ Text Books
➢ Rafael Gonzalez & Richard Woods, “Digital Image Processing,” 3rd
Edition, Pearson publications, ISBN 0132345633.
➢ S. Jayaraman, S Esakkirajan, & T Veerakumar, “Digital Image Processing,”
Tata McGraw Hill Education, ISBN(13) 9780070144798.
➢ Anil K. Jain, “Fundamentals of Digital Image Processing,” 5th Edition, PHI
publication, ISBN 13: 9780133361650.
➢ Richard Szeliski, “Computer Vision: Algorithms and Applications
(CVAA)”, Springer, 2010.
➢ E. R. Davies, “Computer & Machine Vision,” 4th Edition, Academic Press,
2012.
➢ Simon J. D. Prince, “Computer Vision: Models, Learning, and Inference”,
Cambridge University Press, 2012.
Prof P P Ghadekar, VIT Pune 6
Background
❖ What is a Signal?
o A function of one or more independent variables such as time,
frequency, distance, position, temperature, pressure, etc.
o A signal carries information.
o Examples: speech, music, image and video.
o A signal can be a function of one, two or N independent variables.
➢ Speech is a 1-D signal as a function of time.
➢ An image is a 2-D signal as a function of space.
➢ Video is a 3-D signal as a function of space and time.
Prof P P Ghadekar, VIT Pune 7
More Examples
1-D Signal
Speech Signal
2-D Signal
Image Signal
3-D Signal
Video Signal
time
8
Prof P P Ghadekar, VIT Pune
Types of Signals
❖ Analog Signal
Signals that are continuous in both the dependent and independent variable
(e.g., amplitude and time). Most environmental signals are continuous-time
signals.
❖ Discrete Sequences (Discrete-Time Signals)
Signals that are continuous in the dependent variable (e.g., amplitude) but
discrete in the independent variable (e.g., time). They are typically associated
with sampling of continuous-time signals.
Prof P P Ghadekar, VIT Pune 9
Types of Signals (cont.)
Digital Signal
Signals that are discrete in both the dependent and independent variable (e.g.,
amplitude and time) are digital signals. These are created by quantizing and
sampling continuous-time signals or as data signals (e.g., stock market price
fluctuations).
Prof P P Ghadekar, VIT Pune 10
Introduction to Image Processing
“One picture is worth more than ten thousand words”
Prof P P Ghadekar, VIT Pune 11
Image
❑ 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 magnitude of f at any pair of
coordinates (x,y) is called the intensity or gray level of the image at that
point.
➢ An image is a 2-d rectilinear array of pixels
Prof P P Ghadekar, VIT Pune 12
How are Images represented in the Computer
Prof P P Ghadekar, VIT Pune 13
Color Images
Prof P P Ghadekar, VIT Pune 14
Digital Color Image
Prof P P Ghadekar, VIT Pune 15
What is Image Processing?
Analog Image
CAMERA x(n1,n2)
DIGITIZER STORAGE PROCESS
Sampling +
Quantization
x(t1,t2)
• Display
Sensor with RGB color filters
• Perform analysis
• Reconstruct x(t1,t2)
• x(t1,t2) : ANALOG SIGNAL
x : real value
(t1,t2) : pair of real continuous space (time) variables
• x(n1,n2) : DISCRETE SIGNAL (DIGITAL)
x : discrete (quantized) real or integer value
(n1,n2) : pair of integer indices
Prof P P Ghadekar, VIT Pune 17
Examples
• Sampled Black & White Photograph: x(n1,n2)
x (n1,n2) scalar indicating pixel intensity at location (n1,n2)
For example: x = 0 Black
x=1 White
• Sampled color video/TV signal
xR(n1, n2, n3)
xG(n1, n2, n3)
xB(n1, n2, n3)
Prof P P Ghadekar, VIT Pune 18
Examples
Gray Scale Image Colour Image
Prof P P Ghadekar, VIT Pune 19
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, pel, or pixels
Prof P P Ghadekar, VIT Pune 20
What is a Digital Image? (cont…)
•Pixel values typically represent gray levels, colours, heights,
opacities etc
•Digitization implies that a digital image is an approximation of a
real scene
1 pixel
Prof P P Ghadekar, VIT Pune 21
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.
Prof P P Ghadekar, VIT Pune 22
Digital Image Processing System
Prof P P Ghadekar, VIT Pune 23
Digital Image Processing
❖The range 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, Contrast segmentation, edges etc. autonomous navigation
enhancement etc.
Etc.
Analogy-Character Recognition System
Prof P P Ghadekar, VIT Pune 24
Four Areas
Prof P P Ghadekar, VIT Pune 25
History of Digital Image Processing
❖Early 1920s: One of the first applications of
digital imaging was in the news- paper
industry
The Bartlane cable picture transmission service.
➢ Images were transferred by Submarine cable Early digital image
between London and New York.
➢ Pictures were coded for cable transfer and
reconstructed at the receiving end on a telegraph
printer
Prof P P Ghadekar, VIT Pune 26
History of Digital Image Processing
Prof P P Ghadekar, VIT Pune 27
History of DIP (cont…)
•1921: Improvements to the Bartlane system resulted in higher
quality images
➢ New reproduction
processes based
on photographic
techniques
➢ Increased number
of tones in
reproduced images Improved digital image
Early 15 tone digital
image
Prof P P Ghadekar, VIT Pune 28
History of DIP (cont…)
❖1960s: Improvements in Computing Technology and the onset of the space
race led to a surge of work in Digital Image Processing
➢ 1964: Computers were used to
improve the quality of
images of the moon taken
by the Ranger 7 probe
➢ Such techniques were used
in other space missions
including the Apollo Landings
A picture of the moon taken by
the Ranger 7 probe minutes
before landing
Prof P P Ghadekar, VIT Pune 29
History of DIP (cont…)
❖1970s: Digital Image Processing begins to be used in medical
applications.
➢1979: Sir Godfrey N.
Hounsfield & Prof. Allan M.
Cormack share the Nobel
Prize in medicine for the
invention of tomography,
the technology behind
Computerised Axial
Tomography (CAT) scans.
➢They can show the soft tissues,
Typical head slice CAT image
blood vessels, and bones in various
parts of the body
Prof P P Ghadekar, VIT Pune 30
History of DIP (cont…)
❖1980s - Today: The use of digital image processing techniques
has exploded, and they are now used for all kinds of tasks in all
kinds of areas
➢ Image enhancement/restoration
➢ Artistic effects
➢ Medical visualisation
➢ Industrial inspection
➢ Law enforcement
➢ Human computer interfaces
➢ Data Science
➢ IoT etc.
Prof P P Ghadekar, VIT Pune 31
A Simple model of Image formation
➢ The scene is illuminated by a single source.
➢ The scene reflects radiation towards the camera.
➢ The camera senses it via chemicals on film.
Prof P P Ghadekar, VIT Pune 32
Pinhole Camera
➢ This is the simplest device to form an image of a 3D scene on a
2D surface.
➢ Straight rays of light pass through a “pinhole” and form an
inverted image of the object on the image plane.
Prof P P Ghadekar, VIT Pune 33
Pinhole Camera
❖ Why is the image inverted in a pinhole camera
➢ Light does not usually bend but travels in a straight line so the light
from the top of a scene passes through the pinhole, continues in a
straight line, and ends up at the bottom.
Prof P P Ghadekar, VIT Pune 34
Camera Optics
➢ In practice, the aperture must be larger to admit more light.
➢ Lenses are placed to in the aperture to focus the bundle of rays
from each scene point onto the corresponding point in the image
plane
Prof P P Ghadekar, VIT Pune 35
Image Formation
Image Formation
Prof P P Ghadekar, VIT Pune 36
Image Formation
Image Formation
Prof P P Ghadekar, VIT Pune 37
Image Formation
Image Formation
Projection
through lens
Image of object
Prof P P Ghadekar, VIT Pune 38
Image Formation
Image Formation
Projection onto
discrete sensor array. Digital camera
Prof P P Ghadekar, VIT Pune 39
Image Formation
Image Formation
sensors register
average color.
Sampled image
Prof P P Ghadekar, VIT Pune 40
Image Formation
Image Formation
continuous colors,
discrete locations.
discrete real-
valued image
Prof P P Ghadekar, VIT Pune 41
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
Prof P P Ghadekar, VIT Pune 42
Key Stages: Image Acquisition
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Prof P P Ghadekar, VIT Pune 43
Key Stages :Image Enhancement
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Prof P P Ghadekar, VIT Pune 44
Key Stages :Image Restoration
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Prof P P Ghadekar, VIT Pune 45
Key Stages :Morphological Processing
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Prof P P Ghadekar, VIT Pune 46
Key Stages :Segmentation
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Prof P P Ghadekar, VIT Pune 47
Key Stages :Object Recognition
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
48
Prof P P Ghadekar, VIT Pune
Key Stages :Representation & Description
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Prof P P Ghadekar, VIT Pune 49
Key Stages :Image Compression
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Prof P P Ghadekar, VIT Pune 50
Key Stages :Colour Image Processing
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Prof P P Ghadekar, VIT Pune 51
Image Representation
F(x,y)=r(x,y)*i(x,y)
Where r(x,y)-reflectivity of surface and i(x,y) –amount of intensity of
the light incident on the object.
Prof P P Ghadekar, VIT Pune 52
Image Representation
f(0,0) f(0,1) ………..f(0,N-1)
f(1,0) f(1,1)…………f(1,N-1)
f(2,0) f(2,1)………....f(2,N-1)
I= .
.
.
.
f(M-1,0) f(M-1,1) …..f(M-1,N-1)
Prof P P Ghadekar, VIT Pune 53
Image Processing Applications
➢ Human Perception
➢ Medical Applications
➢ Weather Forecasting
➢ Human Computer Interface
➢ Industrial Applications
➢ Military Applications
➢ Law Enforcement and Security
➢ Consumer Electronics
➢ The Internet, Particularly the World Wide Web
Prof P P Ghadekar, VIT Pune 54
Human Perception
❖ Typical Application
➢ Noise Filtering
• Content Enhancement
• Contrast Enhancement
➢ Deblurring
➢ Remote sensing
Prof P P Ghadekar, VIT Pune 55
Filtering
Noisy Image Filtered Image
Prof P P Ghadekar, VIT Pune 56
Image Enhancement
Low Contrast Image Enhanced Image
Prof P P Ghadekar, VIT Pune 57
Image Enhancement
Low Contrast Image Enhanced Image
Prof P P Ghadekar, VIT Pune 58
Deblurring
Blurred Image DeBlurred Image
Prof P P Ghadekar, VIT Pune 59
Remote Sensing
Satellite Image Kolkata
Prof P P Ghadekar, VIT Pune 60
Remote Sensing
Terrain Mapping of Hilly region
Prof P P Ghadekar, VIT Pune 61
Remote Sensing
Borneo Fire
Prof P P Ghadekar, VIT Pune 62
Medical Imaging
One Slice of CT scan Image- Brain Tumour
Prof P P Ghadekar, VIT Pune 63
Medical Imaging
Prof P P Ghadekar, VIT Pune 64
Medical Imaging
Ultra Sonogram
Prof P P Ghadekar, VIT Pune 65
What is light?
➢ The visible portion of the electromagnetic (EM) spectrum.
➢ It occurs between wavelengths of approximately 400 and 700
nanometers.
Prof P P Ghadekar, VIT Pune 66
Short Wavelengths
➢ Different wavelengths of radiation have different
properties.
➢ The x-ray region of the spectrum, it carries sufficient
energy to penetrate a significant volume or material.
Prof P P Ghadekar, VIT Pune 67
Long Wavelengths
➢ Many quantities of infrared (IR) radiation are emitted from
warm objects (e.g., locate people in total darkness).
Prof P P Ghadekar, VIT Pune 68
Long Wavelengths (cont’d)
➢ “Synthetic aperture radar” (SAR) imaging techniques use an
artificially generated source of microwaves to probe a scene.
➢ SAR is unaffected by weather conditions and clouds (e.g., has
provided us images of the surface of Venus).
Prof P P Ghadekar, VIT Pune 69
Atmospheric Study
Ozone Hole
Prof P P Ghadekar, VIT Pune 71
Human Computer Interface
❖Try to make human computer interfaces
more natural
➢ Face recognition
➢ Gesture recognition
❖Does anyone remember the
user interface from “Minority Report”?
•These tasks can be extremely difficult
Prof P P Ghadekar, VIT Pune 72
Examples: Artistic Effects
❖Artistic effects are used to
make images more visually
appealing, to add special effects
and to make composite images.
Prof P P Ghadekar, VIT Pune 73
Examples: Industrial Inspection
❖Human operators are expensive,
slow and unreliable
❖Make machines do the job instead
❖Industrial vision systems
are used in all kinds of industries
Prof P P Ghadekar, VIT Pune 74
Examples: PCB Inspection
➢ Machine inspection is used to determine that all components
are present and that all solder joints are acceptable
Prof P P Ghadekar, VIT Pune 75
The Internet, Particularly the World Wide Web
➢ There is a huge amount of visual information available on the
Web.
➢ Collaborative image and video uploading, sharing, and
annotation (tagging) have become increasingly popular.
➢ Finding and retrieving images and videos on the Web based on
their contents.
Prof P P Ghadekar, VIT Pune 77
Astronomy
Galaxy
Prof P P Ghadekar, VIT Pune 79
Boundary Information
Importance of Boundary Information
Prof P P Ghadekar, VIT Pune 80
Morphing
Prof P P Ghadekar, VIT Pune 81
Inserting Artificial Objects into a Scene
82
Prof P P Ghadekar, VIT Pune
Image Addition
+ =
Image-1 Image-2 Output Image
Prof P P Ghadekar, VIT Pune 83
Background Subtraction
Image-1 Image-2 Absolute Difference
Prof P P Ghadekar, VIT Pune 85
Image and Video Compression
Image and video data compression refers to a process in which the
amount of data used to represent image and video is reduced to meet a
bit rate requirement.
Prof P P Ghadekar, VIT Pune 87
Functionality in Visual Transmission and Storage
Image and video compression for visual transmission and storage
Prof P P Ghadekar, VIT Pune 88
Feasibility of Image and Video Compression
➢ Interpixel Redundancy /Spatial Redundancy
Statistical correlation among pixels within an image frame: intraframe
redundancy.
A picture: “Boy and Girl”
Prof P P Ghadekar, VIT Pune 89
Interpixel Redundancy /Spatial Redundancy
❖ Not necessary to represent each pixel in an image frame
independently. Instead, one can predict a pixel from its neighbors.
❖ Removing a large amount of the redundancy within an image
frame, we may save a lot of data in representing the frame, thus
achieving data compression.
Prof P P Ghadekar, VIT Pune 90
Temporal Redundancy
❖ Statistical correlation between pixels from successive frames:
Interframe Redundancy.
(a) 21st and (b) 22nd frames of Ms. America Sequence
Prof P P Ghadekar, VIT Pune 91
Temporal Redundancy
❖ For a videophone-like signal with moderate motion in the scene, on
average, less than 10% of pixels change their gray values between
two consecutive frames by an amount of 1% of the peak signal.
❖ Removing a large amount of temporal redundancy leads to a great
deal of data compression.
Prof P P Ghadekar, VIT Pune 92
Psychovisual Redundancy
➢ Originates from the characteristics of the human visual system
(HVS).
➢ Visual information not perceived equally by HVS.
➢ If apply less data to represent less important visual information,
perception will not be affected.
➢ In this sense, Some Visual Information is Psychovisually
redundant.
➢ Eliminating psychovisual redundancy leads to data compression.
Prof P P Ghadekar, VIT Pune 93
Wonders in Image Processing with ML, DL
❖ Google Lens an app launched by Google, which uses Image
processing techniques along with AI technologies and Deep
Machine Learning
❖ Healthcare Industry-
➢ Image analysis can be of great use in the healthcare industry.
o Medical X-ray
o Patients
❖ Defence
❖ Automobile Industry
❖ Agriculture
Prof P P Ghadekar, VIT Pune 94
Image Processing in Health Analytics
❖ CT-Scan ❖ MRI-Scan
Prof P P Ghadekar, VIT Pune
Image Processing in Health Analytics
CT Scan MRI
Uses Multiple X-rays Uses Magnets and Radio Waves
Doesn’t show Tendons and Ligaments Show Tendons and Ligaments
Not as good as MRI Better for examining Spinal Cord
Better suited to cancer, pneumonia, Better suited for nerve injuries, tumours,
abnormal chest x-rays, bleeding in the brain injuries, stroke, etc.
brain, especially after an injury.
Here brain tumour is visible but not as Here brain tumour is more clearly
clear as in MRI visible
CT scans provide a better image of the Not good for Lungs as they are filled
Lungs and organs in the Chest cavity with air and there is a low density of the
between the lungs. hydrogen atoms required to create MR
images
Image Processing in IoT
❖ Smart Agriculture
❖ Smart Home
❖ Drone Based Surveillance
❖ Smart City etc.
Prof P P Ghadekar, VIT Pune
Smart Agriculture
● IoT sensors and IP algorithms to improve quality of products
using accurate measurements
● Failure rate can be decreased
● Alert system for farmers in case of any disastrous situation
Prof P P Ghadekar, VIT Pune
Methodology
● IoT Sensors will continuously
monitor different
environmental factors
○ Temperature
○ Humidity
○ Soil moisture
○ Light intensity
● A JPEG camera will capture
images of crops after certain
interval
Fig. Block Diagram.
Prof P P Ghadekar, VIT Pune
Smart Agriculture-Robotic Pickers
Weed Detection
100
Weed Detection
❖ Weed detection techniques used algorithms based on edge
detection, color detection, classification based on wavelets.
❖ Real time weed recognition system for identifying outdoor plant
using machine vision uses edge based classifier to identify
broad and narrow weeds.
❖ Images acquired in RGB were converted to gray scales and
used to process as binary image.
❖ Bright pixels in dark background were identified as weed
and classified as in broad and narrow using threshold
values.
Prof P P Ghadekar, VIT Pune 101
September 4, 2022 Prof P P Ghadekar, VIT Pune 102