SlideShare a Scribd company logo
1 of 50
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

discrete wavelet transform
discrete wavelet transformdiscrete wavelet transform
discrete wavelet transform
piyush_11
 

What's hot (20)

Digital Image Fundamentals
Digital Image FundamentalsDigital Image Fundamentals
Digital Image Fundamentals
 
IMAGE SEGMENTATION TECHNIQUES
IMAGE SEGMENTATION TECHNIQUESIMAGE SEGMENTATION TECHNIQUES
IMAGE SEGMENTATION TECHNIQUES
 
Image Restoration
Image RestorationImage Restoration
Image Restoration
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
 
Digital image processing
Digital image processing  Digital image processing
Digital image processing
 
Chapter 3 image enhancement (spatial domain)
Chapter 3 image enhancement (spatial domain)Chapter 3 image enhancement (spatial domain)
Chapter 3 image enhancement (spatial domain)
 
Image sampling and quantization
Image sampling and quantizationImage sampling and quantization
Image sampling and quantization
 
Spatial Filters (Digital Image Processing)
Spatial Filters (Digital Image Processing)Spatial Filters (Digital Image Processing)
Spatial Filters (Digital Image Processing)
 
Digital Image restoration
Digital Image restorationDigital Image restoration
Digital Image restoration
 
Image Filtering in the Frequency Domain
Image Filtering in the Frequency DomainImage Filtering in the Frequency Domain
Image Filtering in the Frequency Domain
 
03 image transform
03 image transform03 image transform
03 image transform
 
discrete wavelet transform
discrete wavelet transformdiscrete wavelet transform
discrete wavelet transform
 
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
 
Digital image processing
Digital image processingDigital image processing
Digital image processing
 
Image degradation and noise by Md.Naseem Ashraf
Image degradation and noise by Md.Naseem AshrafImage degradation and noise by Md.Naseem Ashraf
Image degradation and noise by Md.Naseem Ashraf
 
Digital image processing questions
Digital  image processing questionsDigital  image processing questions
Digital image processing questions
 
Color image processing Presentation
Color image processing PresentationColor image processing Presentation
Color image processing Presentation
 
1.arithmetic & logical operations
1.arithmetic & logical operations1.arithmetic & logical operations
1.arithmetic & logical operations
 
Mathematical operations in image processing
Mathematical operations in image processingMathematical operations in image processing
Mathematical operations in 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)
 

Viewers also liked

Basics of Image Processing using MATLAB
Basics of Image Processing using MATLABBasics of Image Processing using MATLAB
Basics of Image Processing using MATLAB
vkn13
 
Image proceesing with matlab
Image proceesing with matlabImage proceesing with matlab
Image proceesing with matlab
Ashutosh Shahi
 
Image processing with matlab
Image processing with matlabImage processing with matlab
Image processing with matlab
neetirajsinh
 
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 medicine
Rad Tech
 
Image trnsformations
Image trnsformationsImage trnsformations
Image trnsformations
John Williams
 
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 techniques
Saideep
 

Viewers also liked (20)

Digital image processing using matlab
Digital image processing using matlab Digital image processing using matlab
Digital image processing using matlab
 
Basics of Image Processing using MATLAB
Basics of Image Processing using MATLABBasics of Image Processing using MATLAB
Basics of 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
 
Introduction to Image Processing with MATLAB
Introduction to Image Processing with MATLABIntroduction to Image Processing with MATLAB
Introduction to Image Processing with MATLAB
 
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
 

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
 
Matlab intro
Matlab introMatlab intro
Matlab intro
fvijayami
 
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
 
ImageProcessingWithMatlab(HasithaEdiriweera)
ImageProcessingWithMatlab(HasithaEdiriweera)ImageProcessingWithMatlab(HasithaEdiriweera)
ImageProcessingWithMatlab(HasithaEdiriweera)
Hasitha Ediriweera
 
Final Report for project
Final Report for projectFinal Report for project
Final Report for project
Rajarshi Roy
 

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

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

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 

Recently uploaded (20)

Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
latest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answerslatest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answers
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 

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