SlideShare une entreprise Scribd logo
1  sur  22
Welcome, students!
Let’s learn something cool!
Is this cool?

Meet Pranav Mistry
Father of Sixth Sense Technology
PhD, MIT Media Labs
M.Des, IIT Bombay
BE, Computer Science, Nirma Institute of Technology
Why Digital Image Processing?

Machine
Learning

Gesture
Control

Face
Recognition

Computer
Vision

Biomedical
Image Pro.
So, Let’s start: Lecture Overview
Lecture 1:
Monday, 28 Oct, 2013
Duration : 90 Mins

Lecture 2:
Tuesday, 29 Oct, 2013
Duration : 90 Mins

Topics:

Topics:

1. Basic Introduction and Matlab

5. Noise Filtering and Segmentation

2. Image Handling

6. Colour Image Analysis

3. Operations on Images

7. Gesture Recognition- Case Study

4. Sample Exercises

8. Textbook and beyond

Introduction To Digital Image Processing

10/25/2013

4
1.Basic Introduction and Matlab
Digital Image: The digital image is essentially a fixed number of rows and columns of

pixels. Pixels are the smallest individual element in an image, holding
quantized values that represent the brightness of a given color at any
specific point.
-Monochrome/Grayscale Image has 1 value per pixel,
while Colour Image has 3 values per pixel. (R, G, B)

monochrome image= f( x, y)
-where x and y are spatial coordinates
-f gives amplitude of intensity
-Colour image= 3 R,G,B monochrome images

Introduction To Digital Image Processing

10/25/2013

5
Notation to represent a pixel :

where,
Pixel Location: p = (r , c)
Pixel Intensity Value: I(p) = I(r , c)

[ p, I(p)]

Note: Origin in case of Matlab Image Processing Toolbox is not p=(0,0) but p=(1,1)
The MATrix LABoratory
MATLAB is a dynamically typed language
-Means that you do not have to declare any variables
-All you need to do is initialize them and they are created

MATLAB treats all variables as matrices
-Scalar – 1 x 1 matrix. Vector – 1 x N or N x 1 matrix
-Why? Makes calculations a lot faster
These MATRICES can be manipulated in two ways:
Cleve Moler
Stanford University
1970
Introduction To Digital Image Processing

-Matrix Manipulation (usual matrix operations)
-Array Manipulation (using dot (.) operator as prefix)
-Vector Manipulation
10/25/2013

7
Basics of MATrix LABoratory
What is the best way to learn Matlab?
- Using the ‘Help’ file (sufficient for 90% operations)
- Practicing along with it.
Common Errors:
1. Select ‘Image Processing
Toolbox’ before starting to use
various image functions.
(only available with 2008b or newer)

2. Always make sure whether
current folder is same as desired.
3. Forgetting to use help command
Introduction To Digital Image Processing

10/25/2013

8
2. Image Handling
Matlab Functions
-

function[output]=name(inputs)

Create and save new ‘.m’ file in the current directory

Some inbuilt functions (in Image Pro. Toolbox) to remember:
-

If a statement
doesn’t fit a
line, we use ‘…’
, to indicate it
continues
in
next line

help, clc, type
Imread(‘filename.ext’)
imwrite(g,‘filename.ext’,’compression’,’parameter’,’resolution’,[colores,rowres],‘quality’)
mat2gray(f,[fmin,fmax])
imshow(f(:,:,x))
figure
-for holding on to an image and displaying other (used as prefix with,)
whos
-for displaying size of all images currently being used in workspace

Question: How to find intensity of a given pixel?
Introduction To Digital Image Processing

9
Image Handling (Continued)
-Accessing subset of an image:
For monochromatic images: im2 = im(row1:row2,col1:col2);
For colour images:
im2 = im(row1:row2,col1:col2,:);

Methods to fill lacking data:

-Resizing an image:

1.’nearest’= as neighborhood
2.’bilinear’=linear interpolation
3.’bicubic’=cubic int. (*best)
out = imresize(im, scale, ‘method’); or
out = imresize(im, [r c], ‘method’);

-Rotating an image:
out = imrotate(im, angle_in_deg, ‘method’);

Introduction To Digital Image Processing

10/25/2013

10
3. Operation on Images : Transformations
G( x, y) = T [f ( x, y)]
where, G= Processed Image
T= Operator
f=input image
-Brightness/Intensity Transformation: im2=c*im;
im2=im+c;

-Contrast Transformation:

If c > 1, c>0 increasing brightness
If c < 1, c<0 decreasing brightness

out = imadjust(im, [], [], gamma);

Contrast represents how the intensity changes from min to max value.
Introduction To Digital Image Processing

10/25/2013

11
Operations on Images: Spatial Filtering

a.k.a. neighborhood
processing

1. First we need to create an N x N matrix
called a mask, kernel, filter (or neighborhood).
2. The numbers inside the mask will help us
control the kind of operation we’re doing.
3. Different numbers allow us to
blur, sharpen, find edges, etc.
4. We need to master convolution first, and the
rest is easy!

G=

[

abc
def
ghi

]

Introduction To Digital Image Processing

H=

[

z yx
wvu
tsr

]

Mask
out = a*z + b*y + c*x + d*w + e*v + f*u + g*t + h*s + i*r,

10/25/2013

12
Application:
Before

After

What do we observe?
Introduction To Digital Image Processing

10/25/2013

13
Application: Blurring
Blurring:
-

Reduces noise (high frequency)
Reduces edges (high frequency)
Is essentially a low pass filter (eliminates high f)
Can be done through averaging filter
For colour images, we can blur each
layer independently
mask = fspecial(‘average’, N);
out = imfilter(im, mask,’conv’);

More the
Mask size,
More blur in
Result
Introduction To Digital Image Processing

10/25/2013

14
Application: Edge Detection
What is an edge? – ‘A place of change’.
f’( x, y)= f( x-1, y) – f( x+1,y)
This is a Horizontal filter.
(puts more weight on central pixel)

EXERCISE: Use following masks in fspecial function
and find out what they do- Gaussian, Laplacian,
Laplacian of Gaussian (LoG)

Alternate way: Canny Edge Detector
(most powerful edge detector)

[ g, t]= edge (f, ‘canny’, T , sigma)
Introduction To Digital Image Processing

How do we do this in MATLAB?
1) Create our Prewitt or Sobel Horizontal Masks:
mask = fspecial(‘prewitt’); or mask = fspecial(‘sobel’);
2) Convolve with each mask separately
dX = imfilter(im, mask); dY = imfilter(im, mask2);
3)Find the overall magnitude
mag = sqrt(double(dX).^(2) + double(dY).^(2));
10/25/2013

15
4. Noise Filtering
▪ In reality, pixel corruption takes place during
process of acquisition or transmission. There
is a need to remove(okay, ‘try to’) this noise.
▪ As an exercise, let’s add up artificial
noise in an image using function:
Gaussian

n = imnoise ( im, ‘salt & pepper’, density);
Use blurring filter against ‘Gaussian’ noise.
Use median filter against ‘salt & pepper noise’.

out = medfilt2( n , [M N]);
Salt & Pepper
Introduction To Digital Image Processing

Poisson
10/25/2013

16
Segmentation

division of an image into segments or parts (region of interests)

▪ This division is done mainly on the basis of :
(a) grey level

(b) texture

(d) depth
(c) motion
(e) colour

Can you think of ways in which this will prove useful?
Introduction To Digital Image Processing

10/25/2013

17
Segmentation Techniques
One way is already covered. Can you name that?
Thresholding : Simplest Segmentation Technique
Pixels are grouped into “Object” and “Background”
– Input: Gray scale image
– Output: Binary image

Implementing in Matlab:

output = im2bw(Image, k)
where, K=T/largest pixel size

Introduction To Digital Image Processing

Other Methods:
1. Region Growing: A method that
clubs similar property pixels. (Satellites)
2. Watershed Transform: grayscale
intensity is interpreted as distance.
(topographical use)
10/25/2013

18
Colour Image Analysis
Trichromacy theory :All colors found
in nature can naturally be decomposed
into Red, Green and Blue.

RGB Cube

Other models: CMY, NTSC, YCbCr,
HSI, CMYK, HSV
Introduction To Digital Image Processing

10/25/2013

19
Colour Image Analysis
▪ Basic Conversions:

Loss of information due
to size of palette

What is an indexed image?
An image having two components:
1. Data Matrix
2. Colour Map (a.k.a. ‘palette’)
What is its use?
1.To make display process fast
2.To reduce size of image
Introduction To Digital Image Processing

10/25/2013

20
Gesture Recognition- Case Study

Introduction To Digital Image Processing

10/25/2013

21
Introductory Digital Image Processing using Matlab, IIT Roorkee

Contenu connexe

Tendances

Digital image processing
Digital image processingDigital image processing
Digital image processingAvni Bindal
 
Histogram based enhancement
Histogram based enhancementHistogram based enhancement
Histogram based enhancementliba manopriya.J
 
Introduction of image processing
Introduction of image processingIntroduction of image processing
Introduction of image processingAvani Shah
 
DCT image compression
DCT image compressionDCT image compression
DCT image compressionyoussef ramzy
 
Advance image processing
Advance image processingAdvance image processing
Advance image processingAAKANKSHA JAIN
 
Digitized images and
Digitized images andDigitized images and
Digitized images andAshish Kumar
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image ProcessingSamir Sabry
 
Image processing fundamentals
Image processing fundamentalsImage processing fundamentals
Image processing fundamentalsA B Shinde
 
COM2304: Introduction to Computer Vision & Image Processing
COM2304: Introduction to Computer Vision & Image Processing COM2304: Introduction to Computer Vision & Image Processing
COM2304: Introduction to Computer Vision & Image Processing Hemantha Kulathilake
 
morphological image processing
morphological image processingmorphological image processing
morphological image processingJohn Williams
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image ProcessingShaleen Saini
 
Spatial filtering using image processing
Spatial filtering using image processingSpatial filtering using image processing
Spatial filtering using image processingAnuj Arora
 
Active contour segmentation
Active contour segmentationActive contour segmentation
Active contour segmentationNishant Jain
 
Digital Image Processing: Image Enhancement in the Spatial Domain
Digital Image Processing: Image Enhancement in the Spatial DomainDigital Image Processing: Image Enhancement in the Spatial Domain
Digital Image Processing: Image Enhancement in the Spatial DomainMostafa G. M. Mostafa
 
Digital image processing ppt
Digital image processing pptDigital image processing ppt
Digital image processing pptkhanam22
 
Computer graphics.
Computer graphics.Computer graphics.
Computer graphics.ALIHAMID71
 
Morphological Image Processing
Morphological Image ProcessingMorphological Image Processing
Morphological Image Processingkumari36
 

Tendances (20)

Digital image processing
Digital image processingDigital image processing
Digital image processing
 
Histogram based enhancement
Histogram based enhancementHistogram based enhancement
Histogram based enhancement
 
Multimedia:Multimedia compression
Multimedia:Multimedia compression Multimedia:Multimedia compression
Multimedia:Multimedia compression
 
Image Processing Using MATLAB
Image Processing Using MATLABImage Processing Using MATLAB
Image Processing Using MATLAB
 
Introduction of image processing
Introduction of image processingIntroduction of image processing
Introduction of image processing
 
DCT image compression
DCT image compressionDCT image compression
DCT image compression
 
Advance image processing
Advance image processingAdvance image processing
Advance image processing
 
Digitized images and
Digitized images andDigitized images and
Digitized images and
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
 
Image processing fundamentals
Image processing fundamentalsImage processing fundamentals
Image processing fundamentals
 
COM2304: Introduction to Computer Vision & Image Processing
COM2304: Introduction to Computer Vision & Image Processing COM2304: Introduction to Computer Vision & Image Processing
COM2304: Introduction to Computer Vision & Image Processing
 
morphological image processing
morphological image processingmorphological image processing
morphological image processing
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
 
Spatial filtering using image processing
Spatial filtering using image processingSpatial filtering using image processing
Spatial filtering using image processing
 
Active contour segmentation
Active contour segmentationActive contour segmentation
Active contour segmentation
 
Digital Image Processing: Image Enhancement in the Spatial Domain
Digital Image Processing: Image Enhancement in the Spatial DomainDigital Image Processing: Image Enhancement in the Spatial Domain
Digital Image Processing: Image Enhancement in the Spatial Domain
 
Digital image processing ppt
Digital image processing pptDigital image processing ppt
Digital image processing ppt
 
Computer graphics.
Computer graphics.Computer graphics.
Computer graphics.
 
Morphological Image Processing
Morphological Image ProcessingMorphological Image Processing
Morphological Image Processing
 
Video processing on dsp
Video processing on dspVideo processing on dsp
Video processing on dsp
 

En vedette

Snapshots Taken At Iit Roorkee
Snapshots Taken At Iit RoorkeeSnapshots Taken At Iit Roorkee
Snapshots Taken At Iit RoorkeeMani Kumar
 
Sattviko idea cafe- The free coworking space at IIT Roorkee
Sattviko idea cafe- The free coworking space at IIT RoorkeeSattviko idea cafe- The free coworking space at IIT Roorkee
Sattviko idea cafe- The free coworking space at IIT RoorkeePrasoon Gupta
 
Acoustics case study IIT Roorkee Church
Acoustics case study IIT Roorkee ChurchAcoustics case study IIT Roorkee Church
Acoustics case study IIT Roorkee ChurchAniruddh Jain
 
Department ppt_IIT Roorkee
Department ppt_IIT RoorkeeDepartment ppt_IIT Roorkee
Department ppt_IIT RoorkeeArvind Kumar
 
IIT Desk top study (Roorkee)
IIT Desk top study (Roorkee)IIT Desk top study (Roorkee)
IIT Desk top study (Roorkee)parvathiharini
 
Streetscape of IIT Roorkee
Streetscape of IIT RoorkeeStreetscape of IIT Roorkee
Streetscape of IIT RoorkeeAniruddh Jain
 
AI and Machine Learning Demystified by Carol Smith at Midwest UX 2017
AI and Machine Learning Demystified by Carol Smith at Midwest UX 2017AI and Machine Learning Demystified by Carol Smith at Midwest UX 2017
AI and Machine Learning Demystified by Carol Smith at Midwest UX 2017Carol Smith
 

En vedette (8)

Snapshots Taken At Iit Roorkee
Snapshots Taken At Iit RoorkeeSnapshots Taken At Iit Roorkee
Snapshots Taken At Iit Roorkee
 
Sattviko idea cafe- The free coworking space at IIT Roorkee
Sattviko idea cafe- The free coworking space at IIT RoorkeeSattviko idea cafe- The free coworking space at IIT Roorkee
Sattviko idea cafe- The free coworking space at IIT Roorkee
 
Acoustics case study IIT Roorkee Church
Acoustics case study IIT Roorkee ChurchAcoustics case study IIT Roorkee Church
Acoustics case study IIT Roorkee Church
 
Department ppt_IIT Roorkee
Department ppt_IIT RoorkeeDepartment ppt_IIT Roorkee
Department ppt_IIT Roorkee
 
IIT Desk top study (Roorkee)
IIT Desk top study (Roorkee)IIT Desk top study (Roorkee)
IIT Desk top study (Roorkee)
 
Solar pannels 2
Solar pannels 2Solar pannels 2
Solar pannels 2
 
Streetscape of IIT Roorkee
Streetscape of IIT RoorkeeStreetscape of IIT Roorkee
Streetscape of IIT Roorkee
 
AI and Machine Learning Demystified by Carol Smith at Midwest UX 2017
AI and Machine Learning Demystified by Carol Smith at Midwest UX 2017AI and Machine Learning Demystified by Carol Smith at Midwest UX 2017
AI and Machine Learning Demystified by Carol Smith at Midwest UX 2017
 

Similaire à Introductory Digital Image Processing using Matlab, IIT Roorkee

Introduction to Machine Vision
Introduction to Machine VisionIntroduction to Machine Vision
Introduction to Machine VisionNasir Jumani
 
BMVA summer school MATLAB programming tutorial
BMVA summer school MATLAB programming tutorialBMVA summer school MATLAB programming tutorial
BMVA summer school MATLAB programming tutorialpotaters
 
الوسائط المتعددة Multimedia تاج
الوسائط المتعددة  Multimedia تاجالوسائط المتعددة  Multimedia تاج
الوسائط المتعددة Multimedia تاجmaaz hamed
 
Laureate Online Education Internet and Multimedia Technolog.docx
Laureate Online Education    Internet and Multimedia Technolog.docxLaureate Online Education    Internet and Multimedia Technolog.docx
Laureate Online Education Internet and Multimedia Technolog.docxDIPESH30
 
Image De-Noising Using Deep Neural Network
Image De-Noising Using Deep Neural NetworkImage De-Noising Using Deep Neural Network
Image De-Noising Using Deep Neural Networkaciijournal
 
IMAGE DE-NOISING USING DEEP NEURAL NETWORK
IMAGE DE-NOISING USING DEEP NEURAL NETWORKIMAGE DE-NOISING USING DEEP NEURAL NETWORK
IMAGE DE-NOISING USING DEEP NEURAL NETWORKaciijournal
 
Introduction in Image Processing Matlab Toolbox
Introduction in Image Processing Matlab ToolboxIntroduction in Image Processing Matlab Toolbox
Introduction in Image Processing Matlab ToolboxShahriar Yazdipour
 
Image De-Noising Using Deep Neural Network
Image De-Noising Using Deep Neural NetworkImage De-Noising Using Deep Neural Network
Image De-Noising Using Deep Neural Networkaciijournal
 
AN EMERGING TREND OF FEATURE EXTRACTION METHOD IN VIDEO PROCESSING
AN EMERGING TREND OF FEATURE EXTRACTION METHOD IN VIDEO PROCESSINGAN EMERGING TREND OF FEATURE EXTRACTION METHOD IN VIDEO PROCESSING
AN EMERGING TREND OF FEATURE EXTRACTION METHOD IN VIDEO PROCESSINGcscpconf
 
ImageProcessingWithMatlab(HasithaEdiriweera)
ImageProcessingWithMatlab(HasithaEdiriweera)ImageProcessingWithMatlab(HasithaEdiriweera)
ImageProcessingWithMatlab(HasithaEdiriweera)Hasitha Ediriweera
 
Fundamentals of image processing
Fundamentals of image processingFundamentals of image processing
Fundamentals of image processingRoufulAlamBhat1
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image ProcessingAnkur Nanda
 
Designed by Identity MLP
Designed by Identity MLP Designed by Identity MLP
Designed by Identity MLP butest
 
computervision1.pdf it is about computer vision
computervision1.pdf it is about computer visioncomputervision1.pdf it is about computer vision
computervision1.pdf it is about computer visionshesnasuneer
 
Removal of Gaussian noise on the image edges using the Prewitt operator and t...
Removal of Gaussian noise on the image edges using the Prewitt operator and t...Removal of Gaussian noise on the image edges using the Prewitt operator and t...
Removal of Gaussian noise on the image edges using the Prewitt operator and t...IOSR Journals
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image ProcessingReshma KC
 

Similaire à Introductory Digital Image Processing using Matlab, IIT Roorkee (20)

Introduction to Machine Vision
Introduction to Machine VisionIntroduction to Machine Vision
Introduction to Machine Vision
 
BMVA summer school MATLAB programming tutorial
BMVA summer school MATLAB programming tutorialBMVA summer school MATLAB programming tutorial
BMVA summer school MATLAB programming tutorial
 
الوسائط المتعددة Multimedia تاج
الوسائط المتعددة  Multimedia تاجالوسائط المتعددة  Multimedia تاج
الوسائط المتعددة Multimedia تاج
 
Image_processing
Image_processingImage_processing
Image_processing
 
Log polar coordinates
Log polar coordinatesLog polar coordinates
Log polar coordinates
 
Laureate Online Education Internet and Multimedia Technolog.docx
Laureate Online Education    Internet and Multimedia Technolog.docxLaureate Online Education    Internet and Multimedia Technolog.docx
Laureate Online Education Internet and Multimedia Technolog.docx
 
Image De-Noising Using Deep Neural Network
Image De-Noising Using Deep Neural NetworkImage De-Noising Using Deep Neural Network
Image De-Noising Using Deep Neural Network
 
IMAGE DE-NOISING USING DEEP NEURAL NETWORK
IMAGE DE-NOISING USING DEEP NEURAL NETWORKIMAGE DE-NOISING USING DEEP NEURAL NETWORK
IMAGE DE-NOISING USING DEEP NEURAL NETWORK
 
Introduction in Image Processing Matlab Toolbox
Introduction in Image Processing Matlab ToolboxIntroduction in Image Processing Matlab Toolbox
Introduction in Image Processing Matlab Toolbox
 
Image De-Noising Using Deep Neural Network
Image De-Noising Using Deep Neural NetworkImage De-Noising Using Deep Neural Network
Image De-Noising Using Deep Neural Network
 
AN EMERGING TREND OF FEATURE EXTRACTION METHOD IN VIDEO PROCESSING
AN EMERGING TREND OF FEATURE EXTRACTION METHOD IN VIDEO PROCESSINGAN EMERGING TREND OF FEATURE EXTRACTION METHOD IN VIDEO PROCESSING
AN EMERGING TREND OF FEATURE EXTRACTION METHOD IN VIDEO PROCESSING
 
ImageProcessingWithMatlab(HasithaEdiriweera)
ImageProcessingWithMatlab(HasithaEdiriweera)ImageProcessingWithMatlab(HasithaEdiriweera)
ImageProcessingWithMatlab(HasithaEdiriweera)
 
Fundamentals of image processing
Fundamentals of image processingFundamentals of image processing
Fundamentals of image processing
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
 
IMAGE SEGMENTATION.
IMAGE SEGMENTATION.IMAGE SEGMENTATION.
IMAGE SEGMENTATION.
 
Ch1.pptx
Ch1.pptxCh1.pptx
Ch1.pptx
 
Designed by Identity MLP
Designed by Identity MLP Designed by Identity MLP
Designed by Identity MLP
 
computervision1.pdf it is about computer vision
computervision1.pdf it is about computer visioncomputervision1.pdf it is about computer vision
computervision1.pdf it is about computer vision
 
Removal of Gaussian noise on the image edges using the Prewitt operator and t...
Removal of Gaussian noise on the image edges using the Prewitt operator and t...Removal of Gaussian noise on the image edges using the Prewitt operator and t...
Removal of Gaussian noise on the image edges using the Prewitt operator and t...
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
 

Dernier

WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 

Dernier (20)

WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 

Introductory Digital Image Processing using Matlab, IIT Roorkee

  • 2. Is this cool? Meet Pranav Mistry Father of Sixth Sense Technology PhD, MIT Media Labs M.Des, IIT Bombay BE, Computer Science, Nirma Institute of Technology
  • 3. Why Digital Image Processing? Machine Learning Gesture Control Face Recognition Computer Vision Biomedical Image Pro.
  • 4. So, Let’s start: Lecture Overview Lecture 1: Monday, 28 Oct, 2013 Duration : 90 Mins Lecture 2: Tuesday, 29 Oct, 2013 Duration : 90 Mins Topics: Topics: 1. Basic Introduction and Matlab 5. Noise Filtering and Segmentation 2. Image Handling 6. Colour Image Analysis 3. Operations on Images 7. Gesture Recognition- Case Study 4. Sample Exercises 8. Textbook and beyond Introduction To Digital Image Processing 10/25/2013 4
  • 5. 1.Basic Introduction and Matlab Digital Image: The digital image is essentially a fixed number of rows and columns of pixels. Pixels are the smallest individual element in an image, holding quantized values that represent the brightness of a given color at any specific point. -Monochrome/Grayscale Image has 1 value per pixel, while Colour Image has 3 values per pixel. (R, G, B) monochrome image= f( x, y) -where x and y are spatial coordinates -f gives amplitude of intensity -Colour image= 3 R,G,B monochrome images Introduction To Digital Image Processing 10/25/2013 5
  • 6. Notation to represent a pixel : where, Pixel Location: p = (r , c) Pixel Intensity Value: I(p) = I(r , c) [ p, I(p)] Note: Origin in case of Matlab Image Processing Toolbox is not p=(0,0) but p=(1,1)
  • 7. The MATrix LABoratory MATLAB is a dynamically typed language -Means that you do not have to declare any variables -All you need to do is initialize them and they are created MATLAB treats all variables as matrices -Scalar – 1 x 1 matrix. Vector – 1 x N or N x 1 matrix -Why? Makes calculations a lot faster These MATRICES can be manipulated in two ways: Cleve Moler Stanford University 1970 Introduction To Digital Image Processing -Matrix Manipulation (usual matrix operations) -Array Manipulation (using dot (.) operator as prefix) -Vector Manipulation 10/25/2013 7
  • 8. Basics of MATrix LABoratory What is the best way to learn Matlab? - Using the ‘Help’ file (sufficient for 90% operations) - Practicing along with it. Common Errors: 1. Select ‘Image Processing Toolbox’ before starting to use various image functions. (only available with 2008b or newer) 2. Always make sure whether current folder is same as desired. 3. Forgetting to use help command Introduction To Digital Image Processing 10/25/2013 8
  • 9. 2. Image Handling Matlab Functions - function[output]=name(inputs) Create and save new ‘.m’ file in the current directory Some inbuilt functions (in Image Pro. Toolbox) to remember: - If a statement doesn’t fit a line, we use ‘…’ , to indicate it continues in next line help, clc, type Imread(‘filename.ext’) imwrite(g,‘filename.ext’,’compression’,’parameter’,’resolution’,[colores,rowres],‘quality’) mat2gray(f,[fmin,fmax]) imshow(f(:,:,x)) figure -for holding on to an image and displaying other (used as prefix with,) whos -for displaying size of all images currently being used in workspace Question: How to find intensity of a given pixel? Introduction To Digital Image Processing 9
  • 10. Image Handling (Continued) -Accessing subset of an image: For monochromatic images: im2 = im(row1:row2,col1:col2); For colour images: im2 = im(row1:row2,col1:col2,:); Methods to fill lacking data: -Resizing an image: 1.’nearest’= as neighborhood 2.’bilinear’=linear interpolation 3.’bicubic’=cubic int. (*best) out = imresize(im, scale, ‘method’); or out = imresize(im, [r c], ‘method’); -Rotating an image: out = imrotate(im, angle_in_deg, ‘method’); Introduction To Digital Image Processing 10/25/2013 10
  • 11. 3. Operation on Images : Transformations G( x, y) = T [f ( x, y)] where, G= Processed Image T= Operator f=input image -Brightness/Intensity Transformation: im2=c*im; im2=im+c; -Contrast Transformation: If c > 1, c>0 increasing brightness If c < 1, c<0 decreasing brightness out = imadjust(im, [], [], gamma); Contrast represents how the intensity changes from min to max value. Introduction To Digital Image Processing 10/25/2013 11
  • 12. Operations on Images: Spatial Filtering a.k.a. neighborhood processing 1. First we need to create an N x N matrix called a mask, kernel, filter (or neighborhood). 2. The numbers inside the mask will help us control the kind of operation we’re doing. 3. Different numbers allow us to blur, sharpen, find edges, etc. 4. We need to master convolution first, and the rest is easy! G= [ abc def ghi ] Introduction To Digital Image Processing H= [ z yx wvu tsr ] Mask out = a*z + b*y + c*x + d*w + e*v + f*u + g*t + h*s + i*r, 10/25/2013 12
  • 13. Application: Before After What do we observe? Introduction To Digital Image Processing 10/25/2013 13
  • 14. Application: Blurring Blurring: - Reduces noise (high frequency) Reduces edges (high frequency) Is essentially a low pass filter (eliminates high f) Can be done through averaging filter For colour images, we can blur each layer independently mask = fspecial(‘average’, N); out = imfilter(im, mask,’conv’); More the Mask size, More blur in Result Introduction To Digital Image Processing 10/25/2013 14
  • 15. Application: Edge Detection What is an edge? – ‘A place of change’. f’( x, y)= f( x-1, y) – f( x+1,y) This is a Horizontal filter. (puts more weight on central pixel) EXERCISE: Use following masks in fspecial function and find out what they do- Gaussian, Laplacian, Laplacian of Gaussian (LoG) Alternate way: Canny Edge Detector (most powerful edge detector) [ g, t]= edge (f, ‘canny’, T , sigma) Introduction To Digital Image Processing How do we do this in MATLAB? 1) Create our Prewitt or Sobel Horizontal Masks: mask = fspecial(‘prewitt’); or mask = fspecial(‘sobel’); 2) Convolve with each mask separately dX = imfilter(im, mask); dY = imfilter(im, mask2); 3)Find the overall magnitude mag = sqrt(double(dX).^(2) + double(dY).^(2)); 10/25/2013 15
  • 16. 4. Noise Filtering ▪ In reality, pixel corruption takes place during process of acquisition or transmission. There is a need to remove(okay, ‘try to’) this noise. ▪ As an exercise, let’s add up artificial noise in an image using function: Gaussian n = imnoise ( im, ‘salt & pepper’, density); Use blurring filter against ‘Gaussian’ noise. Use median filter against ‘salt & pepper noise’. out = medfilt2( n , [M N]); Salt & Pepper Introduction To Digital Image Processing Poisson 10/25/2013 16
  • 17. Segmentation division of an image into segments or parts (region of interests) ▪ This division is done mainly on the basis of : (a) grey level (b) texture (d) depth (c) motion (e) colour Can you think of ways in which this will prove useful? Introduction To Digital Image Processing 10/25/2013 17
  • 18. Segmentation Techniques One way is already covered. Can you name that? Thresholding : Simplest Segmentation Technique Pixels are grouped into “Object” and “Background” – Input: Gray scale image – Output: Binary image Implementing in Matlab: output = im2bw(Image, k) where, K=T/largest pixel size Introduction To Digital Image Processing Other Methods: 1. Region Growing: A method that clubs similar property pixels. (Satellites) 2. Watershed Transform: grayscale intensity is interpreted as distance. (topographical use) 10/25/2013 18
  • 19. Colour Image Analysis Trichromacy theory :All colors found in nature can naturally be decomposed into Red, Green and Blue. RGB Cube Other models: CMY, NTSC, YCbCr, HSI, CMYK, HSV Introduction To Digital Image Processing 10/25/2013 19
  • 20. Colour Image Analysis ▪ Basic Conversions: Loss of information due to size of palette What is an indexed image? An image having two components: 1. Data Matrix 2. Colour Map (a.k.a. ‘palette’) What is its use? 1.To make display process fast 2.To reduce size of image Introduction To Digital Image Processing 10/25/2013 20
  • 21. Gesture Recognition- Case Study Introduction To Digital Image Processing 10/25/2013 21