SlideShare a Scribd company logo
Multimedia Technology in
MATLAB
By:
Mustafa N. Jaafar
Lecture 3: Images Analysis in matlab
IMAGE ANALYSIS
• Image analysis methods extract information from an image by using automatic ,
such as:
• scene analysis
• image description
• image understanding
• pattern recognition
I m a g e a n a l y s i s t e c h n i q u e
Feature description Segmentation Classification
Spatial features
Transform features
Edges and boundaries
Shape features
Moments
Texture
Thresholding
Boundary based segm.
Region based segm.
Template matching
Texture segmentation
Clustering
Statistical classif.
Decision trees
Neural networks
Similarity measures
2 1 3
9
ENHANCEMENT METHODS IN IMAGE PROCESSING
• Image enhancement is the process of adjusting digital images so that the results are more suitable for display or further image analysis. For example, can remove noise, sharpen, or
brighten an image, making it easier to identify key features.
• Here are some useful examples and methods of image enhancement:
• Filtering with morphological operators
• Histogram equalization
• Noise removal using a Wiener filter
• Linear contrast adjustment
• Median filtering
• Unsharp mask filtering
• Contrast-limited adaptive histogram equalization (CLAHE)
• Decorrelation stretch
MEDIAN FILTER
• The median filter is normally used to reduce noise in an image,
• How It Works Like the mean filter, the median filter considers each pixel in the image
in turn and looks at its nearby neighbors to decide whether or not it is representative
of its surroundings.
• Instead of simply replacing the pixel value with the mean of neighboring pixel values,
it replaces it with the median of those values.
• The median is calculated by first sorting all the pixel values from the surrounding
neighborhood into numerical order and then replacing the pixel being considered
with the middle pixel value.
MEDIAN FILTER
SEGMENTATION
•Image segmentation is a key step in image analysis.
• Segmentation subdivides an image into its components.
• The segmentation operation only subdivides an image;
Amplitude thresholding (i.e. in the brightness domain)
is the basis approach to image segmentation.
A threshold T is selected a that would separate the two
modes, i.e. any image point for which f(x,y)>T is
considered as an object; otherwise, the point is called a
background point.
The thresholded image (binary image) is defined by:
0 for f (x, y) T
g(x, y) 
1 for f (x, y)  T
THRESHOLDING
THRESHOLDING
Suppose an
surrounded by
image f(x,y)
dark background
contains bright objects
and its gray-level
histogram is shown in the figure.
FEATURE EXTRACTION
• Feature plays a very important role in the area of image processing.
• feature extraction techniques are applied to get features that will be useful in
classifying and recognition of images
• A statistical method of examining texture that considers the spatial relationship of
pixels is the gray-level co-occurrence matrix (GLCM),
• The GLCM functions characterize the texture of an image by calculating how
often pairs of pixel with specific values and then extracting statistical measures
from this matrix.
TEXTURE ANALYSIS USING THE GRAY-LEVEL CO-OCCURRENCE
MATRIX (GLCM)
Statistic Description
Contrast Measures the local variations in the gray-level co-occurrence matrix.
Correlation Measures the joint probability occurrence of the specified pixel pairs.
Energy Provides the sum of squared elements in the GLCM. Also known as
uniformity or the angular second moment.
Homogeneity Measures the closeness of the distribution of elements in the GLCM to
the GLCM diagonal.
CLASSIFICATION
• Supervised and semi-supervised learning algorithms for binary and multiclass problems
• Classification is a type of supervised machine learning in which an algorithm
“learns” to classify new observations from examples of labeled data.
• To explore classification models interactively, use the Classification Learner app.
For greater flexibility
• can pass predictor or feature data with corresponding responses or labels to an
algorithm-fitting function in the command-line interface.
• Fitctree Fit binary decision tree for multiclass classification
• fitcknn Fit k-nearest neighbor classifier
• Fitcsvm Train support vector machine (SVM) classifier for one-class and binary
classification
• Fitnet Function fitting neural network
CLASSIFICATION TECHNIQUE IN MATLAB
MATALB CODE
• clc;clear all;close all;
• %% step1: read image by image
• imagefiles = dir('normal/*.bmp');
• nfiles = length(imagefiles); % Number of files found
• t=[];
• for ii=1:nfiles
• currentfilename = [imagefiles(ii).folder ''
imagefiles(ii).name];
• currentimage = imread(currentfilename );
• images_Normal_medain = medfilt2(currentimage);%
enhancent
•
images_Normal_SEG=im2bw(images_Normal_medain,0.5);%segmn
etataion
• feature_normal(ii,:) = get_feature(
images_Normal_SEG);% feauter
• t=[t; 1];
• end
• imagefiles = dir('abnormal/*.bmp');
• nfiles = length(imagefiles); % Number of files found
MATALB CODE
• for ii=1:nfiles
• currentfilename = [imagefiles(ii).folder '' imagefiles(ii).name];
• currentimage = imread(currentfilename );
• images_abormal_medain = medfilt2(currentimage);
• images_abormal_SEG=im2bw(images_abormal_medain,0.5);
• feature_abnormal(ii,:) = get_feature( images_abormal_SEG);
• t=[t; 2];
• end
• x = [feature_normal ; feature_abnormal] ;
• %t = [ones(size(feature_normal,1),1) ; ones(size(feature_abnormal,1),1)*2 ];
• hiddenLayerSize = 20;
• net = fitnet(hiddenLayerSize);
• [net,tr] = train(net,x',t');
• y = round(net(x'));
• acc = sum(t==y')/ length(t);

More Related Content

What's hot

Image segmentation using advanced fuzzy c-mean algorithm [FYP @ IITR, obtaine...
Image segmentation using advanced fuzzy c-mean algorithm [FYP @ IITR, obtaine...Image segmentation using advanced fuzzy c-mean algorithm [FYP @ IITR, obtaine...
Image segmentation using advanced fuzzy c-mean algorithm [FYP @ IITR, obtaine...
Koteswar Rao Jerripothula
 
Segmentation Techniques -I
Segmentation Techniques -ISegmentation Techniques -I
Segmentation Techniques -I
Hemantha Kulathilake
 
Image segmentation
Image segmentationImage segmentation
Image segmentationDeepak Kumar
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
Bulbul Agrawal
 
Image segmentation 2
Image segmentation 2 Image segmentation 2
Image segmentation 2 Rumah Belajar
 
Remote Sensing Lec 11
Remote Sensing Lec 11Remote Sensing Lec 11
Remote Sensing Lec 11polylsgiedx
 
Image parts and segmentation
Image parts and segmentation Image parts and segmentation
Image parts and segmentation
Rappy Saha
 
Image segmentation
Image segmentationImage segmentation
Image segmentationMukul Jindal
 
Image segmentation
Image segmentation Image segmentation
Image segmentation
Tubur Borgoary
 
IMAGE SEGMENTATION TECHNIQUES
IMAGE SEGMENTATION TECHNIQUESIMAGE SEGMENTATION TECHNIQUES
IMAGE SEGMENTATION TECHNIQUES
Vicky Kumar
 
Region-based Semi-supervised Clustering Image Segmentation
Region-based Semi-supervised Clustering Image SegmentationRegion-based Semi-supervised Clustering Image Segmentation
Region-based Semi-supervised Clustering Image Segmentation
Onur Yılmaz
 
motion and feature based person tracking in survillance videos
motion and feature based person tracking in survillance videosmotion and feature based person tracking in survillance videos
motion and feature based person tracking in survillance videos
shiva kumar cheruku
 
Region based segmentation
Region based segmentationRegion based segmentation
Region based segmentation
Inamul Hossain Imran
 
Region based image segmentation
Region based image segmentationRegion based image segmentation
Region based image segmentation
Safayet Hossain
 
Image segmentation ppt
Image segmentation pptImage segmentation ppt
Image segmentation pptGichelle Amon
 
Ajay ppt region segmentation new copy
Ajay ppt region segmentation new   copyAjay ppt region segmentation new   copy
Ajay ppt region segmentation new copyAjay Kumar Singh
 
Segmentation Techniques -II
Segmentation Techniques -IISegmentation Techniques -II
Segmentation Techniques -II
Hemantha Kulathilake
 

What's hot (20)

Image segmentation using advanced fuzzy c-mean algorithm [FYP @ IITR, obtaine...
Image segmentation using advanced fuzzy c-mean algorithm [FYP @ IITR, obtaine...Image segmentation using advanced fuzzy c-mean algorithm [FYP @ IITR, obtaine...
Image segmentation using advanced fuzzy c-mean algorithm [FYP @ IITR, obtaine...
 
Segmentation Techniques -I
Segmentation Techniques -ISegmentation Techniques -I
Segmentation Techniques -I
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
Image segmentation 2
Image segmentation 2 Image segmentation 2
Image segmentation 2
 
Remote Sensing Lec 11
Remote Sensing Lec 11Remote Sensing Lec 11
Remote Sensing Lec 11
 
Image parts and segmentation
Image parts and segmentation Image parts and segmentation
Image parts and segmentation
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
Image segmentation
Image segmentation Image segmentation
Image segmentation
 
Final Review
Final ReviewFinal Review
Final Review
 
IMAGE SEGMENTATION TECHNIQUES
IMAGE SEGMENTATION TECHNIQUESIMAGE SEGMENTATION TECHNIQUES
IMAGE SEGMENTATION TECHNIQUES
 
Region-based Semi-supervised Clustering Image Segmentation
Region-based Semi-supervised Clustering Image SegmentationRegion-based Semi-supervised Clustering Image Segmentation
Region-based Semi-supervised Clustering Image Segmentation
 
Segmentation
SegmentationSegmentation
Segmentation
 
motion and feature based person tracking in survillance videos
motion and feature based person tracking in survillance videosmotion and feature based person tracking in survillance videos
motion and feature based person tracking in survillance videos
 
Dip Image Segmentation
Dip Image SegmentationDip Image Segmentation
Dip Image Segmentation
 
Region based segmentation
Region based segmentationRegion based segmentation
Region based segmentation
 
Region based image segmentation
Region based image segmentationRegion based image segmentation
Region based image segmentation
 
Image segmentation ppt
Image segmentation pptImage segmentation ppt
Image segmentation ppt
 
Ajay ppt region segmentation new copy
Ajay ppt region segmentation new   copyAjay ppt region segmentation new   copy
Ajay ppt region segmentation new copy
 
Segmentation Techniques -II
Segmentation Techniques -IISegmentation Techniques -II
Segmentation Techniques -II
 

Similar to Images Analysis  in matlab

ACMP340.pptx
ACMP340.pptxACMP340.pptx
ACMP340.pptx
FelixGathage
 
IMAGE SEGMENTATION.
IMAGE SEGMENTATION.IMAGE SEGMENTATION.
IMAGE SEGMENTATION.
Tawose Olamide Timothy
 
ImSeg04.ppt
ImSeg04.pptImSeg04.ppt
ImSeg04.ppt
ssuser1cc06c1
 
ImSeg04 (2).ppt
ImSeg04 (2).pptImSeg04 (2).ppt
ImSeg04 (2).ppt
Dhaval Bhojani
 
Image enhancement techniques
Image enhancement techniquesImage enhancement techniques
Image enhancement techniques
Bulbul Agrawal
 
image enhancement image enhancement imag
image enhancement image enhancement imagimage enhancement image enhancement imag
image enhancement image enhancement imag
NaveenKumar5162
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
Reshma KC
 
Image enhancement
Image enhancementImage enhancement
Image enhancementAyaelshiwi
 
DIP Notes Unit-1 PPT , engineering, computer Science
DIP Notes Unit-1 PPT , engineering, computer ScienceDIP Notes Unit-1 PPT , engineering, computer Science
DIP Notes Unit-1 PPT , engineering, computer Science
baaburao4200
 
DIP Notes Unit-1 PPT.pdf
DIP Notes Unit-1 PPT.pdfDIP Notes Unit-1 PPT.pdf
DIP Notes Unit-1 PPT.pdf
Gaurav Sharma
 
SIRG-BSU_3_used-important.pdf
SIRG-BSU_3_used-important.pdfSIRG-BSU_3_used-important.pdf
SIRG-BSU_3_used-important.pdf
DrAhmedElngar
 
Image processing.pdf
Image processing.pdfImage processing.pdf
Image processing.pdf
JasaRChoudhary
 
Image processing
Image processingImage processing
Image processing
kamal330
 
Various object detection and tracking methods
Various object detection and tracking methodsVarious object detection and tracking methods
Various object detection and tracking methods
sujeeshkumarj
 
Feature Extraction and Feature Selection using Textual Analysis
Feature Extraction and Feature Selection using Textual AnalysisFeature Extraction and Feature Selection using Textual Analysis
Feature Extraction and Feature Selection using Textual Analysis
vivatechijri
 
A Review on Image Segmentation using Clustering and Swarm Optimization Techni...
A Review on Image Segmentation using Clustering and Swarm Optimization Techni...A Review on Image Segmentation using Clustering and Swarm Optimization Techni...
A Review on Image Segmentation using Clustering and Swarm Optimization Techni...
IJSRD
 
PPT s07-machine vision-s2
PPT s07-machine vision-s2PPT s07-machine vision-s2
PPT s07-machine vision-s2
Binus Online Learning
 
08 cie552 image_segmentation
08 cie552 image_segmentation08 cie552 image_segmentation
08 cie552 image_segmentation
Elsayed Hemayed
 
30thSep2014
30thSep201430thSep2014
30thSep2014Mia liu
 
Dip lect2-Machine Vision Fundamentals
Dip  lect2-Machine Vision Fundamentals Dip  lect2-Machine Vision Fundamentals
Dip lect2-Machine Vision Fundamentals
Abdul Abbasi
 

Similar to Images Analysis  in matlab (20)

ACMP340.pptx
ACMP340.pptxACMP340.pptx
ACMP340.pptx
 
IMAGE SEGMENTATION.
IMAGE SEGMENTATION.IMAGE SEGMENTATION.
IMAGE SEGMENTATION.
 
ImSeg04.ppt
ImSeg04.pptImSeg04.ppt
ImSeg04.ppt
 
ImSeg04 (2).ppt
ImSeg04 (2).pptImSeg04 (2).ppt
ImSeg04 (2).ppt
 
Image enhancement techniques
Image enhancement techniquesImage enhancement techniques
Image enhancement techniques
 
image enhancement image enhancement imag
image enhancement image enhancement imagimage enhancement image enhancement imag
image enhancement image enhancement imag
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
 
Image enhancement
Image enhancementImage enhancement
Image enhancement
 
DIP Notes Unit-1 PPT , engineering, computer Science
DIP Notes Unit-1 PPT , engineering, computer ScienceDIP Notes Unit-1 PPT , engineering, computer Science
DIP Notes Unit-1 PPT , engineering, computer Science
 
DIP Notes Unit-1 PPT.pdf
DIP Notes Unit-1 PPT.pdfDIP Notes Unit-1 PPT.pdf
DIP Notes Unit-1 PPT.pdf
 
SIRG-BSU_3_used-important.pdf
SIRG-BSU_3_used-important.pdfSIRG-BSU_3_used-important.pdf
SIRG-BSU_3_used-important.pdf
 
Image processing.pdf
Image processing.pdfImage processing.pdf
Image processing.pdf
 
Image processing
Image processingImage processing
Image processing
 
Various object detection and tracking methods
Various object detection and tracking methodsVarious object detection and tracking methods
Various object detection and tracking methods
 
Feature Extraction and Feature Selection using Textual Analysis
Feature Extraction and Feature Selection using Textual AnalysisFeature Extraction and Feature Selection using Textual Analysis
Feature Extraction and Feature Selection using Textual Analysis
 
A Review on Image Segmentation using Clustering and Swarm Optimization Techni...
A Review on Image Segmentation using Clustering and Swarm Optimization Techni...A Review on Image Segmentation using Clustering and Swarm Optimization Techni...
A Review on Image Segmentation using Clustering and Swarm Optimization Techni...
 
PPT s07-machine vision-s2
PPT s07-machine vision-s2PPT s07-machine vision-s2
PPT s07-machine vision-s2
 
08 cie552 image_segmentation
08 cie552 image_segmentation08 cie552 image_segmentation
08 cie552 image_segmentation
 
30thSep2014
30thSep201430thSep2014
30thSep2014
 
Dip lect2-Machine Vision Fundamentals
Dip  lect2-Machine Vision Fundamentals Dip  lect2-Machine Vision Fundamentals
Dip lect2-Machine Vision Fundamentals
 

Recently uploaded

How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
ArianaBusciglio
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
Kartik Tiwari
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
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
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 

Recently uploaded (20)

How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
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
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 

Images Analysis  in matlab

  • 1. Multimedia Technology in MATLAB By: Mustafa N. Jaafar Lecture 3: Images Analysis in matlab
  • 2. IMAGE ANALYSIS • Image analysis methods extract information from an image by using automatic , such as: • scene analysis • image description • image understanding • pattern recognition
  • 3. I m a g e a n a l y s i s t e c h n i q u e Feature description Segmentation Classification Spatial features Transform features Edges and boundaries Shape features Moments Texture Thresholding Boundary based segm. Region based segm. Template matching Texture segmentation Clustering Statistical classif. Decision trees Neural networks Similarity measures 2 1 3 9
  • 4. ENHANCEMENT METHODS IN IMAGE PROCESSING • Image enhancement is the process of adjusting digital images so that the results are more suitable for display or further image analysis. For example, can remove noise, sharpen, or brighten an image, making it easier to identify key features. • Here are some useful examples and methods of image enhancement: • Filtering with morphological operators • Histogram equalization • Noise removal using a Wiener filter • Linear contrast adjustment • Median filtering • Unsharp mask filtering • Contrast-limited adaptive histogram equalization (CLAHE) • Decorrelation stretch
  • 5. MEDIAN FILTER • The median filter is normally used to reduce noise in an image, • How It Works Like the mean filter, the median filter considers each pixel in the image in turn and looks at its nearby neighbors to decide whether or not it is representative of its surroundings. • Instead of simply replacing the pixel value with the mean of neighboring pixel values, it replaces it with the median of those values. • The median is calculated by first sorting all the pixel values from the surrounding neighborhood into numerical order and then replacing the pixel being considered with the middle pixel value.
  • 7. SEGMENTATION •Image segmentation is a key step in image analysis. • Segmentation subdivides an image into its components. • The segmentation operation only subdivides an image;
  • 8. Amplitude thresholding (i.e. in the brightness domain) is the basis approach to image segmentation. A threshold T is selected a that would separate the two modes, i.e. any image point for which f(x,y)>T is considered as an object; otherwise, the point is called a background point. The thresholded image (binary image) is defined by: 0 for f (x, y) T g(x, y)  1 for f (x, y)  T THRESHOLDING
  • 9. THRESHOLDING Suppose an surrounded by image f(x,y) dark background contains bright objects and its gray-level histogram is shown in the figure.
  • 10. FEATURE EXTRACTION • Feature plays a very important role in the area of image processing. • feature extraction techniques are applied to get features that will be useful in classifying and recognition of images • A statistical method of examining texture that considers the spatial relationship of pixels is the gray-level co-occurrence matrix (GLCM), • The GLCM functions characterize the texture of an image by calculating how often pairs of pixel with specific values and then extracting statistical measures from this matrix.
  • 11. TEXTURE ANALYSIS USING THE GRAY-LEVEL CO-OCCURRENCE MATRIX (GLCM) Statistic Description Contrast Measures the local variations in the gray-level co-occurrence matrix. Correlation Measures the joint probability occurrence of the specified pixel pairs. Energy Provides the sum of squared elements in the GLCM. Also known as uniformity or the angular second moment. Homogeneity Measures the closeness of the distribution of elements in the GLCM to the GLCM diagonal.
  • 12. CLASSIFICATION • Supervised and semi-supervised learning algorithms for binary and multiclass problems • Classification is a type of supervised machine learning in which an algorithm “learns” to classify new observations from examples of labeled data. • To explore classification models interactively, use the Classification Learner app. For greater flexibility • can pass predictor or feature data with corresponding responses or labels to an algorithm-fitting function in the command-line interface.
  • 13. • Fitctree Fit binary decision tree for multiclass classification • fitcknn Fit k-nearest neighbor classifier • Fitcsvm Train support vector machine (SVM) classifier for one-class and binary classification • Fitnet Function fitting neural network CLASSIFICATION TECHNIQUE IN MATLAB
  • 14. MATALB CODE • clc;clear all;close all; • %% step1: read image by image • imagefiles = dir('normal/*.bmp'); • nfiles = length(imagefiles); % Number of files found • t=[]; • for ii=1:nfiles • currentfilename = [imagefiles(ii).folder '' imagefiles(ii).name]; • currentimage = imread(currentfilename ); • images_Normal_medain = medfilt2(currentimage);% enhancent • images_Normal_SEG=im2bw(images_Normal_medain,0.5);%segmn etataion • feature_normal(ii,:) = get_feature( images_Normal_SEG);% feauter • t=[t; 1]; • end • imagefiles = dir('abnormal/*.bmp'); • nfiles = length(imagefiles); % Number of files found
  • 15. MATALB CODE • for ii=1:nfiles • currentfilename = [imagefiles(ii).folder '' imagefiles(ii).name]; • currentimage = imread(currentfilename ); • images_abormal_medain = medfilt2(currentimage); • images_abormal_SEG=im2bw(images_abormal_medain,0.5); • feature_abnormal(ii,:) = get_feature( images_abormal_SEG); • t=[t; 2]; • end • x = [feature_normal ; feature_abnormal] ; • %t = [ones(size(feature_normal,1),1) ; ones(size(feature_abnormal,1),1)*2 ]; • hiddenLayerSize = 20; • net = fitnet(hiddenLayerSize); • [net,tr] = train(net,x',t'); • y = round(net(x')); • acc = sum(t==y')/ length(t);