SlideShare a Scribd company logo
Workshop on “Image processing
using MATLAB”
Presented by
Amarjeetsingh Thakur
Asst. Professor
Dept. of Electronics & Communication Engg.
S.G.B.I.T. Belgaum
Outline
 What is MATLAB?
 Image Processing tool box
 Image formats
 How to read an image?
 Image conversion
 Arithmetic operations on images
 Conversion of an image into different formats
 Image rotation
 Image blurring and deblurring
 Fill in ROI in grayscale image
 References
What is MATLAB?
• MATLAB = MATrix LABoratory
• “MATLAB is a high-level language and
interactive environment that enables us to
perform computationally intensive tasks faster
than with traditional programming languages
such as C, C++ and Fortran.”
• MATLAB is an interactive, interpreted language
that is designed for fast numerical matrix
calculations.
Who uses MATLAB?
Key Industries
 Aerospace and defense
 Automotive
 Biotech and pharmaceutical
 Communications
 Computers
 Education
 Electronics and semiconductors
 Energy production
 Industrial automation and machinery
 Medical devices
The MATLAB Environment
MATLAB window
components:
Workspace
> Displays all the defined
variables
Command Window
> To execute commands
in the MATLAB
environment
Command History
> Displays record of the
commands used
File Editor Window
> Define functions
MATLAB Help
• MATLAB Help is an
extremely powerful
assistance to learning
MATLAB
• Help not only contains the
theoretical background,
but also shows demos for
implementation
• MATLAB Help can be
opened by using the
HELP pull-down menu
MATLAB Help (cont.)
• Any command description
can be found by typing
the command in the
search field
• As shown above, the
command to take square
root (sqrt) is searched
• We can also utilize
MATLAB Help from the
command window as
shown
What is the Image Processing
Toolbox?
• The Image Processing Toolbox is a collection of
functions that extend the capabilities of the
MATLAB’s numeric computing environment. The
toolbox supports a wide range of image
processing operations, including:
– Geometric operations
– Linear filtering and filter design
– Transforms
– Image analysis and enhancement
– Binary image operations
– Region of interest operations
Images in MATLAB
• MATLAB can import/export
several image formats:
– BMP (Microsoft Windows
Bitmap)
– GIF (Graphics
Interchange Files)
– HDF (Hierarchical Data
Format)
– JPEG (Joint Photographic
Experts Group)
– PCX (Paintbrush)
– PNG (Portable Network
Graphics)
– TIFF (Tagged Image File
Format)
• Data types in MATLAB
– Double (64-bit double-
precision floating point)
– Single (32-bit single-
precision floating point)
– Int32 (32-bit signed
integer)
– Int16 (16-bit signed
integer)
– Int8 (8-bit signed integer)
– Uint32 (32-bit unsigned
integer)
– Uint16 (16-bit unsigned
integer)
– Uint8 (8-bit unsigned
Images in MATLAB
• Binary images : {0,1}
• Intensity images : [0,1] or uint8, double etc.
• RGB images : m × n × 3
• Multidimensional images: m × n × p (p is the number of layers)
Binary Images
 They are also called “ Black & White ” images ,
containing ‘1’ for white and ‘0’(zero) for black
 MATLAB code
Intensity Images
 They are also called ‘ Gray Scale images ’ ,
containging numbers in the range of 0 to 255
Indexed Images
 These are the color images and also represented
as ‘RGB image’.
 In RGB Images there exist three indexed images.
 First image contains all the red portion of the
image, second green and third contains the blue
portion.
How to read an image??
I=imread(‘steve.jpg’)
figure
Imshow(I)
size(I) % 295 171 3
Images and Matrices
Column 1 to 256
Row1to256
o
[0, 0]
o
[256, 256]
How to build a matrix
(or image)?
Intensity Image:
row = 256;
col = 256;
img = zeros(row, col);
img(100:105, :) = 0.5;
img(:, 100:105) = 1;
figure;
imshow(img);
Image Conversion
• gray2ind - intensity image to index image
• im2bw - image to binary
• im2double - image to double precision
• im2uint8 - image to 8-bit unsigned integers
• im2uint16 - image to 16-bit unsigned integers
• ind2gray - indexed image to intensity image
• mat2gray - matrix to intensity image
• rgb2gray - RGB image to grayscale
• rgb2ind - RGB image to indexed image
Arithmetic operations on
images
1. Imadd
Syntax : Z = imadd(X,Y)
Description: Z = imadd(X,Y) adds
each element in array X with the
corresponding element in array Y and
returns the sum in the corresponding
element of the output array Z.
Figure window shows addition of
two different images
Contd..
2. imsubtract
Syntax : Z = imsubtract(X,Y)
Description: Z = imsubtract(X,Y) subtracts
each element in array Y from the
corresponding element in array X and
returns the difference in the corresponding
element of the output array Z
Figure window shows
Subtraction of two different
images
Contd..
3. immultiply
Syntax : Z = immultiply(X,Y)
Description: Z = immultiply(X,Y)
multiplies each element in array X by the
corresponding element in array Y and
returns the product in the corresponding
element of the output array Z.
Figure window shows
Multiplication of two different
images
Contd..
4. imdivide
Syntax : Z = immultiply(X,Y)
Description: Z = imdivide(X,Y) divides
each element in the array X by the
corresponding element in array Y and
returns the result in the corresponding
element of the output array Z.
Figure window shows Division of
two different images
Converting RGB image to
gray format
I=imread(‘Sachin.jpg'); % Read an
image
I=rgb2gray(I); % RGB to gray
conversion
figure % Figure window
imshow(I) % Display figure on
figure window
Figure window displaying
Gray image
RGB to BW image conversion
commands
 i=imread('Sachin.jpg');
 I=im2bw(I);
 imshow(I)
Figure window shows BW
image
Image rotation by some angle
 I=imread('steve.jpg');
 J=imrotate(I,45); % Rotate image
anticlockwise by
an angle 45
 K=imrotate(I,-45); % Rotate image
clockwise by
an angle 45
 imshow(J)
 Imshow(K)
Deblurring operation on an
blurred image using wiener filter
 I=imread(‘Sachin.jpg');
 figure
 imshow(I)
Commands for blurring the
image
 PSF=fspecial('motion');
 Blurred=imfilter(I,PSF,'circular','con
v');
 figure, imshow(Blurred)
Blurred image
Commands for deblurring the
image
 wnr1=deconvwnr(Blurred,PSF);
 figure, imshow(wnr1);
 title('Restored image');
Recovered image
Fill in specified region of interest
(ROI) polygon in grayscale
image
I = imread('eight.tif');
J = roifill(I);
figure, imshow(J)
ROI fill
I=imread('C:Documents and
SettingsAll
Users.WINDOWSDocumentsMy
PicturesSample
Picturesavataar.jpg');
figure
imshow(I)
J=rgb2gray(I);
figure
imshow(J)
ROI fill (contd..)
 K = roifill(J);
 figure
 imshow(K)
ROI fill (contd..)
ROI fill (contd..)
Applications of image
processing
 BIOLOGICAL: automated systems for analysis of
samples.
 DEFENSE/INTELLIGENCE: enhancement and
interpretation of images to find and track targets.
 DOCUMENT PROCESSING: scanning, archiving,
transmission.
 FACTORY AUTOMATION: visual inspection of
products.
• MATERIALS TESTING: detection and quantification
of cracks, impurities, etc.
 MEDICAL: disease detection and monitoring,
therapy/surgery planning
ANY QUERRIES????????
References
 www.mathworks.com
 “Digital Image Processing using
MATLAB” by Rafael C. Gonzalez,
Richard E. Woods, Steven L. Eddins.
THANK YOU

More Related Content

What's hot

Digital Image Processing: An Introduction
Digital Image Processing: An IntroductionDigital Image Processing: An Introduction
Digital Image Processing: An Introduction
Mostafa G. M. Mostafa
 
Enhancement in spatial domain
Enhancement in spatial domainEnhancement in spatial domain
Enhancement in spatial domainAshish Kumar
 
Image sampling and quantization
Image sampling and quantizationImage sampling and quantization
Image sampling and quantization
BCET, Balasore
 
IMAGE SEGMENTATION.
IMAGE SEGMENTATION.IMAGE SEGMENTATION.
IMAGE SEGMENTATION.
Tawose Olamide Timothy
 
Mathematical operations in image processing
Mathematical operations in image processingMathematical operations in image processing
Mathematical operations in image processing
Asad Ali
 
Introduction of image processing
Introduction of image processingIntroduction of image processing
Introduction of image processing
Avani Shah
 
Point processing
Point processingPoint processing
Point processing
panupriyaa7
 
Digital image processing
Digital image processingDigital image processing
Digital image processing
tushar05
 
Digital Image Fundamentals
Digital Image FundamentalsDigital Image Fundamentals
Digital Image Fundamentals
A B Shinde
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
Md Shabir Alam
 
Image proccessing and its application
Image proccessing and its applicationImage proccessing and its application
Image proccessing and its application
Ashwini Awatare
 
Advance image processing
Advance image processingAdvance image processing
Advance image processing
AAKANKSHA JAIN
 
Histogram Equalization
Histogram EqualizationHistogram Equalization
Histogram Equalization
Kalyan Acharjya
 
Digital image processing
Digital image processingDigital image processing
Digital image processing
gayathrysatheesan1
 
Lecture 1 for Digital Image Processing (2nd Edition)
Lecture 1 for Digital Image Processing (2nd Edition)Lecture 1 for Digital Image Processing (2nd Edition)
Lecture 1 for Digital Image Processing (2nd Edition)
Moe Moe Myint
 
Introduction to Image Processing with MATLAB
Introduction to Image Processing with MATLABIntroduction to Image Processing with MATLAB
Introduction to Image Processing with MATLAB
Sriram Emarose
 
Image Filtering in the Frequency Domain
Image Filtering in the Frequency DomainImage Filtering in the Frequency Domain
Image Filtering in the Frequency Domain
Amnaakhaan
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial Domain
A B Shinde
 
Image segmentation ppt
Image segmentation pptImage segmentation ppt
Image segmentation pptGichelle Amon
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
lalithambiga kamaraj
 

What's hot (20)

Digital Image Processing: An Introduction
Digital Image Processing: An IntroductionDigital Image Processing: An Introduction
Digital Image Processing: An Introduction
 
Enhancement in spatial domain
Enhancement in spatial domainEnhancement in spatial domain
Enhancement in spatial domain
 
Image sampling and quantization
Image sampling and quantizationImage sampling and quantization
Image sampling and quantization
 
IMAGE SEGMENTATION.
IMAGE SEGMENTATION.IMAGE SEGMENTATION.
IMAGE SEGMENTATION.
 
Mathematical operations in image processing
Mathematical operations in image processingMathematical operations in image processing
Mathematical operations in image processing
 
Introduction of image processing
Introduction of image processingIntroduction of image processing
Introduction of image processing
 
Point processing
Point processingPoint processing
Point processing
 
Digital image processing
Digital image processingDigital image processing
Digital image processing
 
Digital Image Fundamentals
Digital Image FundamentalsDigital Image Fundamentals
Digital Image Fundamentals
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
Image proccessing and its application
Image proccessing and its applicationImage proccessing and its application
Image proccessing and its application
 
Advance image processing
Advance image processingAdvance image processing
Advance image processing
 
Histogram Equalization
Histogram EqualizationHistogram Equalization
Histogram Equalization
 
Digital image processing
Digital image processingDigital image processing
Digital image processing
 
Lecture 1 for Digital Image Processing (2nd Edition)
Lecture 1 for Digital Image Processing (2nd Edition)Lecture 1 for Digital Image Processing (2nd Edition)
Lecture 1 for Digital Image Processing (2nd Edition)
 
Introduction to Image Processing with MATLAB
Introduction to Image Processing with MATLABIntroduction to Image Processing with MATLAB
Introduction to Image Processing with MATLAB
 
Image Filtering in the Frequency Domain
Image Filtering in the Frequency DomainImage Filtering in the Frequency Domain
Image Filtering in the Frequency Domain
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial Domain
 
Image segmentation ppt
Image segmentation pptImage segmentation ppt
Image segmentation ppt
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
 

Viewers also liked

Introduction to Digital Image Processing Using MATLAB
Introduction to Digital Image Processing Using MATLABIntroduction to Digital Image Processing Using MATLAB
Introduction to Digital Image Processing Using MATLAB
Ray Phan
 
Introduction in Image Processing Matlab Toolbox
Introduction in Image Processing Matlab ToolboxIntroduction in Image Processing Matlab Toolbox
Introduction in Image Processing Matlab Toolbox
Shahriar Yazdipour
 
Matlab and Image Processing Workshop-SKERG
Matlab and Image Processing Workshop-SKERG Matlab and Image Processing Workshop-SKERG
Matlab and Image Processing Workshop-SKERG
Sulaf Almagooshi
 
Image proceesing with matlab
Image proceesing with matlabImage proceesing with matlab
Image proceesing with matlabAshutosh Shahi
 
Getting started with image processing using Matlab
Getting started with image processing using MatlabGetting started with image processing using Matlab
Getting started with image processing using Matlab
Pantech ProLabs India Pvt Ltd
 
Getting started with Matlab by Hannah Dotson, Vikram Kodibagkar laboratory
Getting started with Matlab by Hannah Dotson, Vikram Kodibagkar laboratoryGetting started with Matlab by Hannah Dotson, Vikram Kodibagkar laboratory
Getting started with Matlab by Hannah Dotson, Vikram Kodibagkar laboratory
Sairam Geethanath
 
Medical Informatics
Medical InformaticsMedical Informatics
Medical Informatics
Suraj Honakamble
 
Image Processing using Matlab ( using a built in Matlab function(Histogram eq...
Image Processing using Matlab ( using a built in Matlab function(Histogram eq...Image Processing using Matlab ( using a built in Matlab function(Histogram eq...
Image Processing using Matlab ( using a built in Matlab function(Histogram eq...
Majd Khaleel
 
Image processing with matlab
Image processing with matlabImage processing with matlab
Image processing with matlabneetirajsinh
 
36324442 biosignal-and-bio-medical-image-processing-matlab-based-applications...
36324442 biosignal-and-bio-medical-image-processing-matlab-based-applications...36324442 biosignal-and-bio-medical-image-processing-matlab-based-applications...
36324442 biosignal-and-bio-medical-image-processing-matlab-based-applications...Avinash Nandakumar
 
Image quality in nuclear medicine
Image quality in nuclear medicineImage quality in nuclear medicine
Image quality in nuclear medicineRad Tech
 
Digital Image Processing - MATLAB Notes - Akshansh
Digital Image Processing - MATLAB Notes - AkshanshDigital Image Processing - MATLAB Notes - Akshansh
Digital Image Processing - MATLAB Notes - Akshansh
Akshansh Chaudhary
 
Image trnsformations
Image trnsformationsImage trnsformations
Image trnsformationsJohn Williams
 
Matlab Working With Images
Matlab Working With ImagesMatlab Working With Images
Matlab Working With Images
matlab Content
 
Snakes in Images (Active contour tutorial)
Snakes in Images (Active contour tutorial)Snakes in Images (Active contour tutorial)
Snakes in Images (Active contour tutorial)Yan Xu
 
Image enhancement techniques
Image enhancement techniquesImage enhancement techniques
Image enhancement techniquesSaideep
 
Introduction to Medical Imaging
Introduction to Medical ImagingIntroduction to Medical Imaging
Introduction to Medical Imaging
Nova Southeastern University
 

Viewers also liked (20)

Introduction to Digital Image Processing Using MATLAB
Introduction to Digital Image Processing Using MATLABIntroduction to Digital Image Processing Using MATLAB
Introduction to Digital Image Processing Using MATLAB
 
Introduction in Image Processing Matlab Toolbox
Introduction in Image Processing Matlab ToolboxIntroduction in Image Processing Matlab Toolbox
Introduction in Image Processing Matlab Toolbox
 
Matlab and Image Processing Workshop-SKERG
Matlab and Image Processing Workshop-SKERG Matlab and Image Processing Workshop-SKERG
Matlab and Image Processing Workshop-SKERG
 
Image proceesing with matlab
Image proceesing with matlabImage proceesing with matlab
Image proceesing with matlab
 
Getting started with image processing using Matlab
Getting started with image processing using MatlabGetting started with image processing using Matlab
Getting started with image processing using Matlab
 
Getting started with Matlab by Hannah Dotson, Vikram Kodibagkar laboratory
Getting started with Matlab by Hannah Dotson, Vikram Kodibagkar laboratoryGetting started with Matlab by Hannah Dotson, Vikram Kodibagkar laboratory
Getting started with Matlab by Hannah Dotson, Vikram Kodibagkar laboratory
 
MATLAB & Image Processing
MATLAB & Image ProcessingMATLAB & Image Processing
MATLAB & Image Processing
 
Medical Informatics
Medical InformaticsMedical Informatics
Medical Informatics
 
Matlab
MatlabMatlab
Matlab
 
Image Processing using Matlab ( using a built in Matlab function(Histogram eq...
Image Processing using Matlab ( using a built in Matlab function(Histogram eq...Image Processing using Matlab ( using a built in Matlab function(Histogram eq...
Image Processing using Matlab ( using a built in Matlab function(Histogram eq...
 
Image processing with matlab
Image processing with matlabImage processing with matlab
Image processing with matlab
 
Point Processing
Point ProcessingPoint Processing
Point Processing
 
36324442 biosignal-and-bio-medical-image-processing-matlab-based-applications...
36324442 biosignal-and-bio-medical-image-processing-matlab-based-applications...36324442 biosignal-and-bio-medical-image-processing-matlab-based-applications...
36324442 biosignal-and-bio-medical-image-processing-matlab-based-applications...
 
Image quality in nuclear medicine
Image quality in nuclear medicineImage quality in nuclear medicine
Image quality in nuclear medicine
 
Digital Image Processing - MATLAB Notes - Akshansh
Digital Image Processing - MATLAB Notes - AkshanshDigital Image Processing - MATLAB Notes - Akshansh
Digital Image Processing - MATLAB Notes - Akshansh
 
Image trnsformations
Image trnsformationsImage trnsformations
Image trnsformations
 
Matlab Working With Images
Matlab Working With ImagesMatlab Working With Images
Matlab Working With Images
 
Snakes in Images (Active contour tutorial)
Snakes in Images (Active contour tutorial)Snakes in Images (Active contour tutorial)
Snakes in Images (Active contour tutorial)
 
Image enhancement techniques
Image enhancement techniquesImage enhancement techniques
Image enhancement techniques
 
Introduction to Medical Imaging
Introduction to Medical ImagingIntroduction to Medical Imaging
Introduction to Medical Imaging
 

Similar to Image Processing Using MATLAB

Image processing tool box.pptx
Image processing tool box.pptxImage processing tool box.pptx
Image processing tool box.pptx
AvinashJain66
 
Image processing for robotics
Image processing for roboticsImage processing for robotics
Image processing for robotics
SALAAMCHAUS
 
Matlab intro
Matlab introMatlab intro
Matlab introfvijayami
 
Image processing using matlab
Image processing using matlab Image processing using matlab
Image processing using matlab
SangeethaSasi1
 
Image_Processing_LECTURE_c#_programming.ppt
Image_Processing_LECTURE_c#_programming.pptImage_Processing_LECTURE_c#_programming.ppt
Image_Processing_LECTURE_c#_programming.ppt
LOUISSEVERINOROMANO
 
Image Processing using Matlab . Useful for beginners to learn Image Processing
Image Processing using Matlab . Useful for beginners to learn Image ProcessingImage Processing using Matlab . Useful for beginners to learn Image Processing
Image Processing using Matlab . Useful for beginners to learn Image Processing
Ashok Kumar
 
Image processing with matlab
Image processing with matlabImage processing with matlab
Image processing with matlab
minhtaispkt
 
Image processing using matlab
Image processing using matlabImage processing using matlab
Image processing using matlab
dedik dafiyanto
 
Matlab dip
Matlab dipMatlab dip
Matlab dip
Jeevan Reddy
 
Image processing
Image processingImage processing
Image processing
Antriksh Saxena
 
Performance Anaysis for Imaging System
Performance Anaysis for Imaging SystemPerformance Anaysis for Imaging System
Performance Anaysis for Imaging System
Vrushali Lanjewar
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
Ankur Nanda
 
Dip digital image 3
Dip digital image 3Dip digital image 3
Dip digital image 3
Shajun Nisha
 
ImageProcessingWithMatlab(HasithaEdiriweera)
ImageProcessingWithMatlab(HasithaEdiriweera)ImageProcessingWithMatlab(HasithaEdiriweera)
ImageProcessingWithMatlab(HasithaEdiriweera)Hasitha Ediriweera
 
Working with images in matlab graphics
Working with images in matlab graphicsWorking with images in matlab graphics
Working with images in matlab graphics
mustafa_92
 
Final Report for project
Final Report for projectFinal Report for project
Final Report for projectRajarshi Roy
 
aip basic open cv example
aip basic open cv exampleaip basic open cv example
aip basic open cv example
Saeed Ullah
 
YCIS_Forensic PArt 1 Digital Image Processing.pptx
YCIS_Forensic PArt 1 Digital Image Processing.pptxYCIS_Forensic PArt 1 Digital Image Processing.pptx
YCIS_Forensic PArt 1 Digital Image Processing.pptx
SharmilaMore5
 

Similar to Image Processing Using MATLAB (20)

Image processing tool box.pptx
Image processing tool box.pptxImage processing tool box.pptx
Image processing tool box.pptx
 
Image processing for robotics
Image processing for roboticsImage processing for robotics
Image processing for robotics
 
Matlab intro
Matlab introMatlab intro
Matlab intro
 
Image processing using matlab
Image processing using matlab Image processing using matlab
Image processing using matlab
 
Image_Processing_LECTURE_c#_programming.ppt
Image_Processing_LECTURE_c#_programming.pptImage_Processing_LECTURE_c#_programming.ppt
Image_Processing_LECTURE_c#_programming.ppt
 
Image Processing using Matlab . Useful for beginners to learn Image Processing
Image Processing using Matlab . Useful for beginners to learn Image ProcessingImage Processing using Matlab . Useful for beginners to learn Image Processing
Image Processing using Matlab . Useful for beginners to learn Image Processing
 
Image processing with matlab
Image processing with matlabImage processing with matlab
Image processing with matlab
 
Image processing using matlab
Image processing using matlabImage processing using matlab
Image processing using matlab
 
Matlab dip
Matlab dipMatlab dip
Matlab dip
 
Image processing
Image processingImage processing
Image processing
 
Ec section
Ec section Ec section
Ec section
 
Image processing
Image processingImage processing
Image processing
 
Performance Anaysis for Imaging System
Performance Anaysis for Imaging SystemPerformance Anaysis for Imaging System
Performance Anaysis for Imaging System
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
 
Dip digital image 3
Dip digital image 3Dip digital image 3
Dip digital image 3
 
ImageProcessingWithMatlab(HasithaEdiriweera)
ImageProcessingWithMatlab(HasithaEdiriweera)ImageProcessingWithMatlab(HasithaEdiriweera)
ImageProcessingWithMatlab(HasithaEdiriweera)
 
Working with images in matlab graphics
Working with images in matlab graphicsWorking with images in matlab graphics
Working with images in matlab graphics
 
Final Report for project
Final Report for projectFinal Report for project
Final Report for project
 
aip basic open cv example
aip basic open cv exampleaip basic open cv example
aip basic open cv example
 
YCIS_Forensic PArt 1 Digital Image Processing.pptx
YCIS_Forensic PArt 1 Digital Image Processing.pptxYCIS_Forensic PArt 1 Digital Image Processing.pptx
YCIS_Forensic PArt 1 Digital Image Processing.pptx
 

More from Amarjeetsingh Thakur

“Introduction to MATLAB & SIMULINK”
“Introduction to MATLAB  & SIMULINK”“Introduction to MATLAB  & SIMULINK”
“Introduction to MATLAB & SIMULINK”
Amarjeetsingh Thakur
 
Python code for servo control using Raspberry Pi
Python code for servo control using Raspberry PiPython code for servo control using Raspberry Pi
Python code for servo control using Raspberry Pi
Amarjeetsingh Thakur
 
Python code for Push button using Raspberry Pi
Python code for Push button using Raspberry PiPython code for Push button using Raspberry Pi
Python code for Push button using Raspberry Pi
Amarjeetsingh Thakur
 
Python code for Buzzer Control using Raspberry Pi
Python code for Buzzer Control using Raspberry PiPython code for Buzzer Control using Raspberry Pi
Python code for Buzzer Control using Raspberry Pi
Amarjeetsingh Thakur
 
Arduino programming part 2
Arduino programming part 2Arduino programming part 2
Arduino programming part 2
Amarjeetsingh Thakur
 
Arduino programming part1
Arduino programming part1Arduino programming part1
Arduino programming part1
Amarjeetsingh Thakur
 
Python openCV codes
Python openCV codesPython openCV codes
Python openCV codes
Amarjeetsingh Thakur
 
Python Numpy Source Codes
Python Numpy Source CodesPython Numpy Source Codes
Python Numpy Source Codes
Amarjeetsingh Thakur
 
Steemit html blog
Steemit html blogSteemit html blog
Steemit html blog
Amarjeetsingh Thakur
 
Python OpenCV Real Time projects
Python OpenCV Real Time projectsPython OpenCV Real Time projects
Python OpenCV Real Time projects
Amarjeetsingh Thakur
 
Adafruit_IoT_Platform
Adafruit_IoT_PlatformAdafruit_IoT_Platform
Adafruit_IoT_Platform
Amarjeetsingh Thakur
 
Core python programming tutorial
Core python programming tutorialCore python programming tutorial
Core python programming tutorial
Amarjeetsingh Thakur
 
Python openpyxl
Python openpyxlPython openpyxl
Python openpyxl
Amarjeetsingh Thakur
 
Introduction to Internet of Things (IoT)
Introduction to Internet of Things (IoT)Introduction to Internet of Things (IoT)
Introduction to Internet of Things (IoT)
Amarjeetsingh Thakur
 
Introduction to Node MCU
Introduction to Node MCUIntroduction to Node MCU
Introduction to Node MCU
Amarjeetsingh Thakur
 
Introduction to Things board (An Open Source IoT Cloud Platform)
Introduction to Things board (An Open Source IoT Cloud Platform)Introduction to Things board (An Open Source IoT Cloud Platform)
Introduction to Things board (An Open Source IoT Cloud Platform)
Amarjeetsingh Thakur
 
Introduction to MQ Telemetry Transport (MQTT)
Introduction to MQ Telemetry Transport (MQTT)Introduction to MQ Telemetry Transport (MQTT)
Introduction to MQ Telemetry Transport (MQTT)
Amarjeetsingh Thakur
 
Arduino Interfacing with different sensors and motor
Arduino Interfacing with different sensors and motorArduino Interfacing with different sensors and motor
Arduino Interfacing with different sensors and motor
Amarjeetsingh Thakur
 
Image processing in MATLAB
Image processing in MATLABImage processing in MATLAB
Image processing in MATLAB
Amarjeetsingh Thakur
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
Amarjeetsingh Thakur
 

More from Amarjeetsingh Thakur (20)

“Introduction to MATLAB & SIMULINK”
“Introduction to MATLAB  & SIMULINK”“Introduction to MATLAB  & SIMULINK”
“Introduction to MATLAB & SIMULINK”
 
Python code for servo control using Raspberry Pi
Python code for servo control using Raspberry PiPython code for servo control using Raspberry Pi
Python code for servo control using Raspberry Pi
 
Python code for Push button using Raspberry Pi
Python code for Push button using Raspberry PiPython code for Push button using Raspberry Pi
Python code for Push button using Raspberry Pi
 
Python code for Buzzer Control using Raspberry Pi
Python code for Buzzer Control using Raspberry PiPython code for Buzzer Control using Raspberry Pi
Python code for Buzzer Control using Raspberry Pi
 
Arduino programming part 2
Arduino programming part 2Arduino programming part 2
Arduino programming part 2
 
Arduino programming part1
Arduino programming part1Arduino programming part1
Arduino programming part1
 
Python openCV codes
Python openCV codesPython openCV codes
Python openCV codes
 
Python Numpy Source Codes
Python Numpy Source CodesPython Numpy Source Codes
Python Numpy Source Codes
 
Steemit html blog
Steemit html blogSteemit html blog
Steemit html blog
 
Python OpenCV Real Time projects
Python OpenCV Real Time projectsPython OpenCV Real Time projects
Python OpenCV Real Time projects
 
Adafruit_IoT_Platform
Adafruit_IoT_PlatformAdafruit_IoT_Platform
Adafruit_IoT_Platform
 
Core python programming tutorial
Core python programming tutorialCore python programming tutorial
Core python programming tutorial
 
Python openpyxl
Python openpyxlPython openpyxl
Python openpyxl
 
Introduction to Internet of Things (IoT)
Introduction to Internet of Things (IoT)Introduction to Internet of Things (IoT)
Introduction to Internet of Things (IoT)
 
Introduction to Node MCU
Introduction to Node MCUIntroduction to Node MCU
Introduction to Node MCU
 
Introduction to Things board (An Open Source IoT Cloud Platform)
Introduction to Things board (An Open Source IoT Cloud Platform)Introduction to Things board (An Open Source IoT Cloud Platform)
Introduction to Things board (An Open Source IoT Cloud Platform)
 
Introduction to MQ Telemetry Transport (MQTT)
Introduction to MQ Telemetry Transport (MQTT)Introduction to MQ Telemetry Transport (MQTT)
Introduction to MQ Telemetry Transport (MQTT)
 
Arduino Interfacing with different sensors and motor
Arduino Interfacing with different sensors and motorArduino Interfacing with different sensors and motor
Arduino Interfacing with different sensors and motor
 
Image processing in MATLAB
Image processing in MATLABImage processing in MATLAB
Image processing in MATLAB
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 

Recently uploaded

Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
Nguyen Thanh Tu Collection
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
rosedainty
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
Fundacja Rozwoju Społeczeństwa Przedsiębiorczego
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
PedroFerreira53928
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
Excellence Foundation for South Sudan
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
AzmatAli747758
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
PedroFerreira53928
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 

Recently uploaded (20)

Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 

Image Processing Using MATLAB

  • 1. Workshop on “Image processing using MATLAB” Presented by Amarjeetsingh Thakur Asst. Professor Dept. of Electronics & Communication Engg. S.G.B.I.T. Belgaum
  • 2. Outline  What is MATLAB?  Image Processing tool box  Image formats  How to read an image?  Image conversion  Arithmetic operations on images  Conversion of an image into different formats  Image rotation  Image blurring and deblurring  Fill in ROI in grayscale image  References
  • 3. What is MATLAB? • MATLAB = MATrix LABoratory • “MATLAB is a high-level language and interactive environment that enables us to perform computationally intensive tasks faster than with traditional programming languages such as C, C++ and Fortran.” • MATLAB is an interactive, interpreted language that is designed for fast numerical matrix calculations.
  • 5. Key Industries  Aerospace and defense  Automotive  Biotech and pharmaceutical  Communications  Computers  Education  Electronics and semiconductors  Energy production  Industrial automation and machinery  Medical devices
  • 6. The MATLAB Environment MATLAB window components: Workspace > Displays all the defined variables Command Window > To execute commands in the MATLAB environment Command History > Displays record of the commands used File Editor Window > Define functions
  • 7. MATLAB Help • MATLAB Help is an extremely powerful assistance to learning MATLAB • Help not only contains the theoretical background, but also shows demos for implementation • MATLAB Help can be opened by using the HELP pull-down menu
  • 8. MATLAB Help (cont.) • Any command description can be found by typing the command in the search field • As shown above, the command to take square root (sqrt) is searched • We can also utilize MATLAB Help from the command window as shown
  • 9. What is the Image Processing Toolbox? • The Image Processing Toolbox is a collection of functions that extend the capabilities of the MATLAB’s numeric computing environment. The toolbox supports a wide range of image processing operations, including: – Geometric operations – Linear filtering and filter design – Transforms – Image analysis and enhancement – Binary image operations – Region of interest operations
  • 10. Images in MATLAB • MATLAB can import/export several image formats: – BMP (Microsoft Windows Bitmap) – GIF (Graphics Interchange Files) – HDF (Hierarchical Data Format) – JPEG (Joint Photographic Experts Group) – PCX (Paintbrush) – PNG (Portable Network Graphics) – TIFF (Tagged Image File Format) • Data types in MATLAB – Double (64-bit double- precision floating point) – Single (32-bit single- precision floating point) – Int32 (32-bit signed integer) – Int16 (16-bit signed integer) – Int8 (8-bit signed integer) – Uint32 (32-bit unsigned integer) – Uint16 (16-bit unsigned integer) – Uint8 (8-bit unsigned
  • 11. Images in MATLAB • Binary images : {0,1} • Intensity images : [0,1] or uint8, double etc. • RGB images : m × n × 3 • Multidimensional images: m × n × p (p is the number of layers)
  • 12. Binary Images  They are also called “ Black & White ” images , containing ‘1’ for white and ‘0’(zero) for black  MATLAB code
  • 13. Intensity Images  They are also called ‘ Gray Scale images ’ , containging numbers in the range of 0 to 255
  • 14. Indexed Images  These are the color images and also represented as ‘RGB image’.  In RGB Images there exist three indexed images.  First image contains all the red portion of the image, second green and third contains the blue portion.
  • 15. How to read an image?? I=imread(‘steve.jpg’) figure Imshow(I) size(I) % 295 171 3
  • 16.
  • 17. Images and Matrices Column 1 to 256 Row1to256 o [0, 0] o [256, 256] How to build a matrix (or image)? Intensity Image: row = 256; col = 256; img = zeros(row, col); img(100:105, :) = 0.5; img(:, 100:105) = 1; figure; imshow(img);
  • 18. Image Conversion • gray2ind - intensity image to index image • im2bw - image to binary • im2double - image to double precision • im2uint8 - image to 8-bit unsigned integers • im2uint16 - image to 16-bit unsigned integers • ind2gray - indexed image to intensity image • mat2gray - matrix to intensity image • rgb2gray - RGB image to grayscale • rgb2ind - RGB image to indexed image
  • 19. Arithmetic operations on images 1. Imadd Syntax : Z = imadd(X,Y) Description: Z = imadd(X,Y) adds each element in array X with the corresponding element in array Y and returns the sum in the corresponding element of the output array Z.
  • 20. Figure window shows addition of two different images
  • 21. Contd.. 2. imsubtract Syntax : Z = imsubtract(X,Y) Description: Z = imsubtract(X,Y) subtracts each element in array Y from the corresponding element in array X and returns the difference in the corresponding element of the output array Z
  • 22. Figure window shows Subtraction of two different images
  • 23. Contd.. 3. immultiply Syntax : Z = immultiply(X,Y) Description: Z = immultiply(X,Y) multiplies each element in array X by the corresponding element in array Y and returns the product in the corresponding element of the output array Z.
  • 24. Figure window shows Multiplication of two different images
  • 25. Contd.. 4. imdivide Syntax : Z = immultiply(X,Y) Description: Z = imdivide(X,Y) divides each element in the array X by the corresponding element in array Y and returns the result in the corresponding element of the output array Z.
  • 26. Figure window shows Division of two different images
  • 27. Converting RGB image to gray format I=imread(‘Sachin.jpg'); % Read an image I=rgb2gray(I); % RGB to gray conversion figure % Figure window imshow(I) % Display figure on figure window
  • 29. RGB to BW image conversion commands  i=imread('Sachin.jpg');  I=im2bw(I);  imshow(I)
  • 31. Image rotation by some angle  I=imread('steve.jpg');  J=imrotate(I,45); % Rotate image anticlockwise by an angle 45  K=imrotate(I,-45); % Rotate image clockwise by an angle 45  imshow(J)  Imshow(K)
  • 32.
  • 33. Deblurring operation on an blurred image using wiener filter  I=imread(‘Sachin.jpg');  figure  imshow(I)
  • 34. Commands for blurring the image  PSF=fspecial('motion');  Blurred=imfilter(I,PSF,'circular','con v');  figure, imshow(Blurred)
  • 36. Commands for deblurring the image  wnr1=deconvwnr(Blurred,PSF);  figure, imshow(wnr1);  title('Restored image');
  • 38. Fill in specified region of interest (ROI) polygon in grayscale image I = imread('eight.tif'); J = roifill(I); figure, imshow(J)
  • 39.
  • 40.
  • 41.
  • 43.
  • 44. ROI fill (contd..)  K = roifill(J);  figure  imshow(K)
  • 47. Applications of image processing  BIOLOGICAL: automated systems for analysis of samples.  DEFENSE/INTELLIGENCE: enhancement and interpretation of images to find and track targets.  DOCUMENT PROCESSING: scanning, archiving, transmission.  FACTORY AUTOMATION: visual inspection of products. • MATERIALS TESTING: detection and quantification of cracks, impurities, etc.  MEDICAL: disease detection and monitoring, therapy/surgery planning
  • 49. References  www.mathworks.com  “Digital Image Processing using MATLAB” by Rafael C. Gonzalez, Richard E. Woods, Steven L. Eddins.

Editor's Notes

  1. 3