SlideShare a Scribd company logo
1 of 15
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
 
Image segmentation
Image segmentationImage segmentation
Image segmentationDeepak Kumar
 
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 TECHNIQUES
IMAGE SEGMENTATION TECHNIQUESIMAGE SEGMENTATION TECHNIQUES
IMAGE SEGMENTATION TECHNIQUESVicky 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 SegmentationOnur 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 videosshiva kumar cheruku
 
Region based image segmentation
Region based image segmentationRegion based image segmentation
Region based image segmentationSafayet 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
 

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 Image Analysis and Classification in MATLAB

Image enhancement techniques
Image enhancement techniquesImage enhancement techniques
Image enhancement techniquesBulbul Agrawal
 
image enhancement image enhancement imag
image enhancement image enhancement imagimage enhancement image enhancement imag
image enhancement image enhancement imagNaveenKumar5162
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image ProcessingReshma 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 Sciencebaaburao4200
 
DIP Notes Unit-1 PPT.pdf
DIP Notes Unit-1 PPT.pdfDIP Notes Unit-1 PPT.pdf
DIP Notes Unit-1 PPT.pdfGaurav Sharma
 
SIRG-BSU_3_used-important.pdf
SIRG-BSU_3_used-important.pdfSIRG-BSU_3_used-important.pdf
SIRG-BSU_3_used-important.pdfDrAhmedElngar
 
Image processing
Image processingImage processing
Image processingkamal330
 
Various object detection and tracking methods
Various object detection and tracking methodsVarious object detection and tracking methods
Various object detection and tracking methodssujeeshkumarj
 
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 Analysisvivatechijri
 
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
 
08 cie552 image_segmentation
08 cie552 image_segmentation08 cie552 image_segmentation
08 cie552 image_segmentationElsayed 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 Image Analysis and Classification 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

Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...Pooja Nehwal
 

Recently uploaded (20)

Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
 

Image Analysis and Classification 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);