SlideShare une entreprise Scribd logo
1  sur  51
Basic Image processing
techniques
H Anandkumar Singh
Student : @ Veltech Dr RR & Dr SR Technical University
Image Processing
• A Digital Image Processing System--- Java open CV or Matlab C program or MATLAB
• Image Representation and Formats
1. Sensing, Sampling, Quantization
2. Gray level and Color Images
3. Raw, RGB, Tiff, BMP, JPG, GIF, (JP2)
• Image Transform and Filtering
• Histogram, Enhancement and Restoration
• Segmentation, Edge Detection, Thinning
• Image Data Compression
• Image Pattern Analysis (Recognition and Interpretation)
[1] R.C. Gonzalez, R.E. Woods, S.L. Eddins, Digital Image Processing Using MATLAB, Pearson Prentice
Hall, 2004
[2] R.C. Gonzalez and R.E. Woods, Digital Image Processing, Prentice-Hall, 2002+
Image Processing System
Digital Image Analysis System
• A 2D image is nothing but a mapping from a region to a matrix
• A Digital Image Processing System consists of
1. Acquisition – scanners, digital camera, ultrasound,
X-ray, MRI
2. Storage – HD (120GB), CD (700MB), DVD (4.7GB),
Flash memory (512MB~4GB), …
3. Processing Unit – PC, Workstation, PC-cluster
4. Communication – telephone lines, cable, wireless, …
5. Display – LCD monitor, laser printer, laser-jet printer
Gray Level and Color Images
Simple Code to read Image and display in
Matlab
• %% Reading Image of 2D
• I = imread('circuit.tif'); %Reading the Image and stores in Variable I
• figure, subplot(121)% Define a location on the figure to display
• imshow(I,[]);% displaying the Read Image on the define location
• %% Reading Colour Image
• I = imread('peppers.png');
• subplot(122)
• imshow(I,[]);
Pixels in a Gray Level Image
Pixels Value(0~255) Gray Level Image
15 16 15 14 15 16 15
15 27 56 66 73 81 83
15 24 57 63 66 72 81
15 22 47 59 66 66 81
14 20 43 56 64 63 75
15 16 42 49 56 62 68
14 15 34 41 51 59 58
A Gray Level Image is a Matrix
f(0,0) f(0,1) f(0,2) …. …. f(0,n-1)
f(1,0) f(1,1) f(1,2) …. …. f(1,n-1)
. . .
. . .
. . .
f(m-1,0) f(m-1,1) f(m-1,2) … …. f(m-1,n-1)
An image of m rows, n columns, f(i,j) is in [0,255]
Red, Green, Blue, Color Images
Sensing, Sampling, Quantization
• A 2D digital image is formed by a sensor which maps a region to a
matrix
• Digitization of the spatial coordinates (x,y) in an image function f(x,y)
is called Sampling
• Digitization of the amplitude of an image function f(x,y) is called
Quantization
Sensing, Sampling, Quantization
Image File Formats
• The most common image file formats, the
most important for cameras, printing,
scanning, and internet use, are JPG, TIF,
PNG, and GIF.
• DICOM image for Medical Image
processing
• Common Image FileFormat:
BIN, RAW
PPM,PBM,PGM
BMP
JPEG
TIFF
GIF
RAS
SGI
PNG
PICT, FPX
EPS
VIP
• Satellite Image file format:
• CCRS format
• EOSAT Fast Format
• Fast-L7A Format
• HDF Format
Filtering
• Median Filter,
• Low Pass filter, High Pass filter, Band Pass filter,
• Gabor Filter, Log Gabor filter,
• Normalized 2-D cross-correlation filter,
• 2-D adaptive noise-removal filtering
• 2-D FIR filter using frequency sampling
• Local range filter of image
• Local standard deviation of image
• Local entropy of grayscale image
Consists of three types of filters:
• Mean filters
• Median filters
• Enhancement filters
Laplacian Filter
 Are rotationally invariant , that is they enhance the details in
all directions equally
 Example convolution masks of Laplacian-type filters are:
Image Transformation
•Feature Extraction – find all ellipses in an image
•Bandwidth Reduction – eliminate the low
contrast “coefficients”
•Data Reduction – eliminate insignificant
coefficients of Discrete Cosine Transform (DCT),
Wavelet Transform (WT)
•Smooth filtering can get rid of noisy signals
Matlab Image Transformation
•Discrete Cosine Transform
•Fast Fourier Transform
•Wavelet Transform
•Radon Transform
•Hough Transform
•Distance Transform
Matlab Variable
• 2-D Convolution Compute 2-D discrete convolution of two input matrices
• 2-D FFT Compute two-dimensional fast Fourier transform of input
• 2-D IFFT 2-D Inverse fast Fourier transform of input
• 2-D DCT Compute 2-D discrete cosine transform (DCT)
• 2-D IDCT Compute 2-D inverse discrete cosine transform (IDCT)
• 2-D FIR Filter Perform 2-D FIR filtering on input matrix
• Contrast Adjustment Adjust image contrast by linearly scaling pixel values
• Deinterlacing Remove motion artifacts by deinterlacing input video signal
• Edge Detection Find edges of objects in images using Sobel, Prewitt, Roberts, or Canny method
• Histogram Equalization Enhance contrast of images using histogram equalization
• Median Filter Perform 2-D median filtering
• Hough Transform Find lines in images
• Hough Lines Find Cartesian coordinates of lines described by rho and theta pairs
• Gaussian Pyramid Perform Gaussian pyramid decomposition
Enhancement and Restoration
•The goal of enhancement is to accentuate
certain features for subsequent analysis or
image display. The enhancement process is
usually done interactively
•The restoration is a process that attempts to
reconstruct or recover an image that has been
degraded by using some unknown phenomenon
Image Enhancement
• Grayscale colormap for contrast enhancement
• Matlab Library:
• vision.ContrastAdjuster Adjust image contrast by linear scaling
• vision.Convolver Compute 2-D discrete convolution of two input matrices
• vision.FFT Two-dimensional discrete Fourier transform
• vision.IFFT Two–dimensional inverse discrete Fourier transform
• vision.DCT Compute 2-D discrete cosine transform
• vision.IDCT Compute 2-D inverse discrete cosine transform
• vision.Deinterlacer Remove motion artifacts by deinterlacing input video signal
• vision.EdgeDetector Find object edge
• vision.HistogramEqualizer Enhance contrast of images using histogram equalization
• vision.HoughTransform Find lines in images via Hough transform
• vision.HoughLines Find Cartesian coordinates of lines that are described by rho and theta pairs
• vision.ImageFilter Perform 2-D FIR filtering of input matrix
• vision.MedianFilter 2D median filtering
• vision.Pyramid Perform Gaussian pyramid decomposition
Feature Detection and Extraction
•Interest point detection,
•extracting feature descriptors,
•Point feature matching
Functions
• detectBRISKFeatures -Detect BRISK features and return BRISKPoints object
• detectFASTFeatures- Detect corners using FAST algorithm and return cornerPoints
object
• detectHarrisFeatures- Detect corners using Harris–Stephens algorithm and return
cornerPoints object
• detectMinEigenFeatures- Detect corners using minimum eigenvalue algorithm and
return cornerPoints object
• detectMSERFeatures- Detect MSER features and return MSERRegions object
• detectSURFFeatures- Detect SURF features and return SURFPoints object
• extractFeatures- Extract interest point descriptors
• extractHOGFeatures- Extract histogram of oriented gradients (HOG) features
• matchFeatures- Find matching features
• showMatchedFeatures- Display corresponding feature points
Image Restoration--- Wavelet Decomposition
• Restoration by Fusion from Fuzzy Images
• example
• Restoration by fussing two different images
• Example
• Image Restoration --Deblur image using Wiener filter
• Example
• Deblur image using Lucy-Richardson method
• example
Denoising
• Functions
• cmddenoise Interval-dependent denoising
• ddencmp Default values for denoising or compression
• thselect Threshold selection for de-noising
• wbmpen Penalized threshold for wavelet 1-D or 2-D de-noising
• wdcbm Thresholds for wavelet 1-D using Birgé-Massart strategy
• wdcbm2 Thresholds for wavelet 2-D using Birgé-Massart strategy
• wden Automatic 1-D de-noising
• wdencmp De-noising or compression
• wmulden Wavelet multivariate de-noising
• wnoise Noisy wavelet test data
• wnoisest Estimate noise of 1-D wavelet coefficients
• wpbmpen Penalized threshold for wavelet packet de-noising
• wpdencmp De-noising or compression using wavelet packets
• wpthcoef Wavelet packet coefficients thresholding
• wthcoef 1-D wavelet coefficient thresholding
• wthcoef2 Wavelet coefficient thresholding 2-D
• wthresh Soft or hard thresholding
• wthrmngr Threshold settings manager
• wvarchg Find variance change points
• measerr Approximation quality metrics
• wavemenu Wavelet Toolbox GUI tools
Image Compression
• Functions
• imgCompress Compress HDU from one file into another
• isCompressedImg Determine if current image is compressed
• setCompressionType Set image compression type
• setHCompScale Set scale parameter for HCOMPRESS
algorithm
• setHCompSmooth Set smoothing for images compressed with
HCOMPRESS
• setTileDim Set tile dimensions
Image Compression
• Two-Dimensional True Compression
• example
• Compression by Global Thresholding and Huffman Encoding
• example
• Uncompression
• Compression by Progressive Methods
• Handling Truecolor Images
• More about True Compression of Images
Segmentation and Edge Detection
• Segmentation is basically a process of pixel classification: the picture
is segmented into subsets by assigning the individual pixels into
classes
• Edge Detection is to find the pixels whose gray values or colors being
abruptly changed
Image Segmentation
• Functions in Matlab
• activecontour Segment image into foreground and background using active
contour
• imsegfmm Binary image segmentation using Fast Marching Method
• gradientweight Calculate weights for image pixels based on image gradient
• graydiffweight Calculate weights for image pixels based on grayscale intensity
difference
• graythresh Global image threshold using Otsu's method
• multithresh Multilevel image thresholds using Otsu's method
Edge Detection
• Edge finding Syntax;
• BW = edge(I)
• gpuarrayBW = edge(gpuarrayI)
• BW = edge(I,'sobel')
• BW = edge(I,'sobel',thresh)
• BW = edge(I,'sobel',thresh,direction)
• BW = edge(I,'sobel',...,options)
• [BW,thresh] = edge(I,'sobel',...)
• BW = edge(I,'prewitt')
• BW = edge(I,'prewitt',thresh)
• BW = edge(I,'prewitt',thresh,direction)
• [BW,thresh] = edge(I,'prewitt',...)
• BW = edge(I,'roberts')
• BW = edge(I,'roberts',thresh)
• BW = edge(I,'roberts',...,options)
• [BW,thresh] = edge(I,'roberts',...)
• BW = edge(I,'log')
• BW = edge(I,'log',thresh)
• BW = edge(I,'log',thresh,sigma)
• [BW,thresh] = edge(I,'log',...)
• BW = edge(I,'zerocross',thresh,h)
• [BW,thresh] = edge(I,'zerocross',...)
• BW = edge(I,'canny')
• BW = edge(I,'canny',thresh)
• BW = edge(I,'canny',thresh,sigma)
• [BW,thresh] = edge(I,'canny',...)
Edge Detection
• Hough Transform
• Corner Detection
• Boundary Tracing in Images
• Quadtree Decomposition
GUI
• Create a Simple GUIDE GUI
• List Pop-Up Menu Items
• The pop-up menu provides a choice of three data sets: peaks, membrane, and sinc. These data sets correspond to MATLAB functions of the
same name. This topic shows you how to list those data sets as choices in the pop-menu.
• In the layout area, click the pop-up menu.
• In the Property Inspector, click the button next to String. The String dialog box displays.
Replace the existing text with the names of the three data sets: Peaks,
Membrane, and Sinc. Press Enter to move to the next line.
When you finish editing the items, click OK.
Modify the Static Text
In this GUI, the static text serves as a label for the pop-up menu. This topic shows you how to change the static text to read Select Data.
In the layout area, click the static text.
In the Property Inspector, click the button next to String. In the String dialog box that displays, replace the existing text with the phrase Select
Data.
• Save the GUI Layout
• When you save a GUI, GUIDE creates two files, a FIG-file and a code file. The FIG-file, with extension .fig, is a binary file that
contains a description of the layout. The code file, with extension .m, contains MATLAB functions that control the GUI behavior.
• Save and activate your GUI by selecting Tools > Run.
• GUIDE displays a dialog box displaying: "Activating will save changes to your figure file and MATLAB code. Do you wish to continue?
• Click Yes.
• GUIDE opens a Save As dialog box in your current folder and prompts you for a FIG-file name.
• Browse to any folder for which you have write privileges, and then enter the file name simple_gui for the FIG-file. GUIDE saves
both the FIG-file and the code file using this name.
• If the folder in which you save the GUI is not on the MATLAB path, GUIDE opens a dialog box, giving you the option of changing the
current folder to the folder containing the GUI files, or adding that folder to the top or bottom of the MATLAB path.
• GUIDE saves the files simple_gui.fig and simple_gui.m, and then activates the GUI. It also opens the GUI code file in your default
editor.
• The GUI opens in a new window. Notice that the GUI lacks the standard menu bar and toolbar that MATLAB figure windows
display. You can add your own menus and toolbar buttons with GUIDE, but by default a GUIDE GUI includes none of these
components.
• When you run simple_gui, you can select a data set in the pop-up menu and click the push buttons, but nothing happens. This is
because the code file contains no statements to service the pop-up menu and the buttons.
Code the Simple GUIDE GUI Behavior
• % Create the data to plot.
• handles.peaks=peaks(35);
• handles.membrane=membrane;
• [x,y] = meshgrid(-8:.5:8);
• r = sqrt(x.^2+y.^2) + eps;
• sinc = sin(r)./r;
• handles.sinc = sinc;
• % Set the current data value.
• handles.current_data = handles.peaks;
• surf(handles.current_data)
• % Determine the selected data set.
• str = get(hObject, 'String');
• val = get(hObject,'Value');
• % Set current data to the selected data set.
• switch str{val};
• case 'Peaks' % User selects peaks.
• handles.current_data = handles.peaks;
• case 'Membrane' % User selects membrane.
• handles.current_data = handles.membrane;
• case 'Sinc' % User selects sinc.
• handles.current_data = handles.sinc;
• end
• % Save the handles structure.
• guidata(hObject,handles)
• Add the following code to the callback immediately after the comment that
begins % handles...
• % Display surf plot of the currently selected data.
• surf(handles.current_data);
• Add this code to the Mesh push button callback, pushbutton2_Callback:
• % Display mesh plot of the currently selected data.
• mesh(handles.current_data);
• Add this code to the Contour push button callback, pushbutton3_Callback:
• % Display contour plot of the currently selected data.
• contour(handles.current_data);
• Save your code by selecting File > Save.
• handles.Dataset = 'Databasetrain';
•
• k = dir(fullfile(handles.Dataset,'*.bmp')); % Read All file in(Dataset =
'Databasepalmprint';)
• k = {k(~[k.isdir]).name}; % Read Filename extension
• ------------------------
• [FileName,PathName] = uigetfile('*.m','Select the MATLAB code file');
The session Is ended
• Any queries please !!!!!!!!!!!!!!!!!!!!

Contenu connexe

Tendances

HIGH PASS FILTER IN DIGITAL IMAGE PROCESSING
HIGH PASS FILTER IN DIGITAL IMAGE PROCESSINGHIGH PASS FILTER IN DIGITAL IMAGE PROCESSING
HIGH PASS FILTER IN DIGITAL IMAGE PROCESSINGBimal2354
 
Stages of image processing
Stages of image processingStages of image processing
Stages of image processingAmal Mp
 
Digital Image Fundamentals
Digital Image FundamentalsDigital Image Fundamentals
Digital Image FundamentalsA B Shinde
 
Histogram Processing
Histogram ProcessingHistogram Processing
Histogram ProcessingAmnaakhaan
 
Fundamentals and image compression models
Fundamentals and image compression modelsFundamentals and image compression models
Fundamentals and image compression modelslavanya marichamy
 
Smoothing Filters in Spatial Domain
Smoothing Filters in Spatial DomainSmoothing Filters in Spatial Domain
Smoothing Filters in Spatial DomainMadhu Bala
 
Smoothing in Digital Image Processing
Smoothing in Digital Image ProcessingSmoothing in Digital Image Processing
Smoothing in Digital Image ProcessingPallavi Agarwal
 
Image Processing: Spatial filters
Image Processing: Spatial filtersImage Processing: Spatial filters
Image Processing: Spatial filtersA B Shinde
 
SPATIAL FILTERING IN IMAGE PROCESSING
SPATIAL FILTERING IN IMAGE PROCESSINGSPATIAL FILTERING IN IMAGE PROCESSING
SPATIAL FILTERING IN IMAGE PROCESSINGmuthu181188
 
Region based segmentation
Region based segmentationRegion based segmentation
Region based segmentationramya marichamy
 
Chapter 6 Image Processing: Image Enhancement
Chapter 6 Image Processing: Image EnhancementChapter 6 Image Processing: Image Enhancement
Chapter 6 Image Processing: Image EnhancementVarun Ojha
 
Fundamental steps in image processing
Fundamental steps in image processingFundamental steps in image processing
Fundamental steps in image processingPremaPRC211300301103
 
Lecture 1 for Digital Image Processing (2nd Edition)
Lecture 1 for Digital Image Processing (2nd Edition)Lecture 1 for Digital Image Processing (2nd Edition)
Lecture 1 for Digital Image Processing (2nd Edition)Moe Moe Myint
 
Chapter10 image segmentation
Chapter10 image segmentationChapter10 image segmentation
Chapter10 image segmentationasodariyabhavesh
 
Digital Image Processing: Digital Image Fundamentals
Digital Image Processing: Digital Image FundamentalsDigital Image Processing: Digital Image Fundamentals
Digital Image Processing: Digital Image FundamentalsMostafa G. M. Mostafa
 

Tendances (20)

Image restoration and reconstruction
Image restoration and reconstructionImage restoration and reconstruction
Image restoration and reconstruction
 
HIGH PASS FILTER IN DIGITAL IMAGE PROCESSING
HIGH PASS FILTER IN DIGITAL IMAGE PROCESSINGHIGH PASS FILTER IN DIGITAL IMAGE PROCESSING
HIGH PASS FILTER IN DIGITAL IMAGE PROCESSING
 
Stages of image processing
Stages of image processingStages of image processing
Stages of image processing
 
Image processing
Image processingImage processing
Image processing
 
Digital Image Fundamentals
Digital Image FundamentalsDigital Image Fundamentals
Digital Image Fundamentals
 
Histogram Processing
Histogram ProcessingHistogram Processing
Histogram Processing
 
Sharpening spatial filters
Sharpening spatial filtersSharpening spatial filters
Sharpening spatial filters
 
Fundamentals and image compression models
Fundamentals and image compression modelsFundamentals and image compression models
Fundamentals and image compression models
 
Smoothing Filters in Spatial Domain
Smoothing Filters in Spatial DomainSmoothing Filters in Spatial Domain
Smoothing Filters in Spatial Domain
 
Smoothing in Digital Image Processing
Smoothing in Digital Image ProcessingSmoothing in Digital Image Processing
Smoothing in Digital Image Processing
 
Image Processing: Spatial filters
Image Processing: Spatial filtersImage Processing: Spatial filters
Image Processing: Spatial filters
 
SPATIAL FILTERING IN IMAGE PROCESSING
SPATIAL FILTERING IN IMAGE PROCESSINGSPATIAL FILTERING IN IMAGE PROCESSING
SPATIAL FILTERING IN IMAGE PROCESSING
 
Jpeg standards
Jpeg   standardsJpeg   standards
Jpeg standards
 
Region based segmentation
Region based segmentationRegion based segmentation
Region based segmentation
 
Chapter 6 Image Processing: Image Enhancement
Chapter 6 Image Processing: Image EnhancementChapter 6 Image Processing: Image Enhancement
Chapter 6 Image Processing: Image Enhancement
 
Fundamental steps in image processing
Fundamental steps in image processingFundamental steps in image processing
Fundamental steps 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)
 
Chapter10 image segmentation
Chapter10 image segmentationChapter10 image segmentation
Chapter10 image segmentation
 
Digital Image Processing: Digital Image Fundamentals
Digital Image Processing: Digital Image FundamentalsDigital Image Processing: Digital Image Fundamentals
Digital Image Processing: Digital Image Fundamentals
 
Object Recognition
Object RecognitionObject Recognition
Object Recognition
 

Similaire à Basic image processing techniques

DIP Notes Unit-1 PPT.pdf
DIP Notes Unit-1 PPT.pdfDIP Notes Unit-1 PPT.pdf
DIP Notes Unit-1 PPT.pdfGaurav Sharma
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image ProcessingAzharo7
 
Image enhancement
Image enhancementImage enhancement
Image enhancementKuppusamy P
 
Lectures 1 3 final (4)
Lectures 1 3 final (4)Lectures 1 3 final (4)
Lectures 1 3 final (4)seemakashyap15
 
Fingerprint Images Enhancement ppt
Fingerprint Images Enhancement pptFingerprint Images Enhancement ppt
Fingerprint Images Enhancement pptMukta Gupta
 
Fundamentals of Image Processing & Components.ppt
Fundamentals of Image Processing & Components.pptFundamentals of Image Processing & Components.ppt
Fundamentals of Image Processing & Components.pptANJANISINGHAL
 
Fidelity criteria in image compression
Fidelity criteria in image compressionFidelity criteria in image compression
Fidelity criteria in image compressionKadamPawan
 
Dip lect2-Machine Vision Fundamentals
Dip  lect2-Machine Vision Fundamentals Dip  lect2-Machine Vision Fundamentals
Dip lect2-Machine Vision Fundamentals Abdul Abbasi
 
Digital image classification
Digital image classificationDigital image classification
Digital image classificationAleemuddin Abbasi
 
Intro+Imaging.ppt
Intro+Imaging.pptIntro+Imaging.ppt
Intro+Imaging.pptshohel rana
 
Image processing
Image processingImage processing
Image processingkamal330
 
24th IP_Fundamentals.ppt
24th IP_Fundamentals.ppt24th IP_Fundamentals.ppt
24th IP_Fundamentals.pptMphill2018
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image ProcessingReshma KC
 
Various object detection and tracking methods
Various object detection and tracking methodsVarious object detection and tracking methods
Various object detection and tracking methodssujeeshkumarj
 
Real-time Edge-aware Image Processing with the Bilateral Grid
Real-time Edge-aware Image Processing with the Bilateral GridReal-time Edge-aware Image Processing with the Bilateral Grid
Real-time Edge-aware Image Processing with the Bilateral GridMLReview
 

Similaire à Basic image processing techniques (20)

DIP Notes Unit-1 PPT.pdf
DIP Notes Unit-1 PPT.pdfDIP Notes Unit-1 PPT.pdf
DIP Notes Unit-1 PPT.pdf
 
ACMP340.pptx
ACMP340.pptxACMP340.pptx
ACMP340.pptx
 
Seema dip
Seema dipSeema dip
Seema dip
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
 
Image enhancement
Image enhancementImage enhancement
Image enhancement
 
Lectures 1 3 final (4)
Lectures 1 3 final (4)Lectures 1 3 final (4)
Lectures 1 3 final (4)
 
Fingerprint Images Enhancement ppt
Fingerprint Images Enhancement pptFingerprint Images Enhancement ppt
Fingerprint Images Enhancement ppt
 
Image processing.pdf
Image processing.pdfImage processing.pdf
Image processing.pdf
 
PPT s06-machine vision-s2
PPT s06-machine vision-s2PPT s06-machine vision-s2
PPT s06-machine vision-s2
 
Fundamentals of Image Processing & Components.ppt
Fundamentals of Image Processing & Components.pptFundamentals of Image Processing & Components.ppt
Fundamentals of Image Processing & Components.ppt
 
Fidelity criteria in image compression
Fidelity criteria in image compressionFidelity criteria in image compression
Fidelity criteria in image compression
 
Dip lect2-Machine Vision Fundamentals
Dip  lect2-Machine Vision Fundamentals Dip  lect2-Machine Vision Fundamentals
Dip lect2-Machine Vision Fundamentals
 
Digital image classification
Digital image classificationDigital image classification
Digital image classification
 
Intro+Imaging.ppt
Intro+Imaging.pptIntro+Imaging.ppt
Intro+Imaging.ppt
 
thesis
thesisthesis
thesis
 
Image processing
Image processingImage processing
Image processing
 
24th IP_Fundamentals.ppt
24th IP_Fundamentals.ppt24th IP_Fundamentals.ppt
24th IP_Fundamentals.ppt
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital 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
 
Real-time Edge-aware Image Processing with the Bilateral Grid
Real-time Edge-aware Image Processing with the Bilateral GridReal-time Edge-aware Image Processing with the Bilateral Grid
Real-time Edge-aware Image Processing with the Bilateral Grid
 

Dernier

BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxSayali Powar
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Association for Project Management
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnvESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnvRicaMaeCastro1
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWQuiz Club NITW
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
Using Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea DevelopmentUsing Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea Developmentchesterberbo7
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research DiscourseAnita GoswamiGiri
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSMae Pangan
 
CHEST Proprioceptive neuromuscular facilitation.pptx
CHEST Proprioceptive neuromuscular facilitation.pptxCHEST Proprioceptive neuromuscular facilitation.pptx
CHEST Proprioceptive neuromuscular facilitation.pptxAneriPatwari
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDhatriParmar
 
CLASSIFICATION OF ANTI - CANCER DRUGS.pptx
CLASSIFICATION OF ANTI - CANCER DRUGS.pptxCLASSIFICATION OF ANTI - CANCER DRUGS.pptx
CLASSIFICATION OF ANTI - CANCER DRUGS.pptxAnupam32727
 
How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17Celine George
 
4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptxmary850239
 
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptxDIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptxMichelleTuguinay1
 
ARTERIAL BLOOD GAS ANALYSIS........pptx
ARTERIAL BLOOD  GAS ANALYSIS........pptxARTERIAL BLOOD  GAS ANALYSIS........pptx
ARTERIAL BLOOD GAS ANALYSIS........pptxAneriPatwari
 
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQuiz Club NITW
 

Dernier (20)

Mattingly "AI & Prompt Design: Large Language Models"
Mattingly "AI & Prompt Design: Large Language Models"Mattingly "AI & Prompt Design: Large Language Models"
Mattingly "AI & Prompt Design: Large Language Models"
 
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnvESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITW
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
Using Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea DevelopmentUsing Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea Development
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research Discourse
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHS
 
CHEST Proprioceptive neuromuscular facilitation.pptx
CHEST Proprioceptive neuromuscular facilitation.pptxCHEST Proprioceptive neuromuscular facilitation.pptx
CHEST Proprioceptive neuromuscular facilitation.pptx
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
 
CLASSIFICATION OF ANTI - CANCER DRUGS.pptx
CLASSIFICATION OF ANTI - CANCER DRUGS.pptxCLASSIFICATION OF ANTI - CANCER DRUGS.pptx
CLASSIFICATION OF ANTI - CANCER DRUGS.pptx
 
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of EngineeringFaculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
 
How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17
 
4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx
 
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptxDIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
 
ARTERIAL BLOOD GAS ANALYSIS........pptx
ARTERIAL BLOOD  GAS ANALYSIS........pptxARTERIAL BLOOD  GAS ANALYSIS........pptx
ARTERIAL BLOOD GAS ANALYSIS........pptx
 
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
 

Basic image processing techniques

  • 1. Basic Image processing techniques H Anandkumar Singh Student : @ Veltech Dr RR & Dr SR Technical University
  • 2. Image Processing • A Digital Image Processing System--- Java open CV or Matlab C program or MATLAB • Image Representation and Formats 1. Sensing, Sampling, Quantization 2. Gray level and Color Images 3. Raw, RGB, Tiff, BMP, JPG, GIF, (JP2) • Image Transform and Filtering • Histogram, Enhancement and Restoration • Segmentation, Edge Detection, Thinning • Image Data Compression • Image Pattern Analysis (Recognition and Interpretation) [1] R.C. Gonzalez, R.E. Woods, S.L. Eddins, Digital Image Processing Using MATLAB, Pearson Prentice Hall, 2004 [2] R.C. Gonzalez and R.E. Woods, Digital Image Processing, Prentice-Hall, 2002+
  • 4. Digital Image Analysis System • A 2D image is nothing but a mapping from a region to a matrix • A Digital Image Processing System consists of 1. Acquisition – scanners, digital camera, ultrasound, X-ray, MRI 2. Storage – HD (120GB), CD (700MB), DVD (4.7GB), Flash memory (512MB~4GB), … 3. Processing Unit – PC, Workstation, PC-cluster 4. Communication – telephone lines, cable, wireless, … 5. Display – LCD monitor, laser printer, laser-jet printer
  • 5. Gray Level and Color Images
  • 6. Simple Code to read Image and display in Matlab • %% Reading Image of 2D • I = imread('circuit.tif'); %Reading the Image and stores in Variable I • figure, subplot(121)% Define a location on the figure to display • imshow(I,[]);% displaying the Read Image on the define location • %% Reading Colour Image • I = imread('peppers.png'); • subplot(122) • imshow(I,[]);
  • 7. Pixels in a Gray Level Image
  • 8. Pixels Value(0~255) Gray Level Image 15 16 15 14 15 16 15 15 27 56 66 73 81 83 15 24 57 63 66 72 81 15 22 47 59 66 66 81 14 20 43 56 64 63 75 15 16 42 49 56 62 68 14 15 34 41 51 59 58
  • 9. A Gray Level Image is a Matrix f(0,0) f(0,1) f(0,2) …. …. f(0,n-1) f(1,0) f(1,1) f(1,2) …. …. f(1,n-1) . . . . . . . . . f(m-1,0) f(m-1,1) f(m-1,2) … …. f(m-1,n-1) An image of m rows, n columns, f(i,j) is in [0,255]
  • 10. Red, Green, Blue, Color Images
  • 11. Sensing, Sampling, Quantization • A 2D digital image is formed by a sensor which maps a region to a matrix • Digitization of the spatial coordinates (x,y) in an image function f(x,y) is called Sampling • Digitization of the amplitude of an image function f(x,y) is called Quantization
  • 13. Image File Formats • The most common image file formats, the most important for cameras, printing, scanning, and internet use, are JPG, TIF, PNG, and GIF. • DICOM image for Medical Image processing • Common Image FileFormat: BIN, RAW PPM,PBM,PGM BMP JPEG TIFF GIF RAS SGI PNG PICT, FPX EPS VIP • Satellite Image file format: • CCRS format • EOSAT Fast Format • Fast-L7A Format • HDF Format
  • 14. Filtering • Median Filter, • Low Pass filter, High Pass filter, Band Pass filter, • Gabor Filter, Log Gabor filter, • Normalized 2-D cross-correlation filter, • 2-D adaptive noise-removal filtering • 2-D FIR filter using frequency sampling • Local range filter of image • Local standard deviation of image • Local entropy of grayscale image Consists of three types of filters: • Mean filters • Median filters • Enhancement filters
  • 15. Laplacian Filter  Are rotationally invariant , that is they enhance the details in all directions equally  Example convolution masks of Laplacian-type filters are:
  • 16. Image Transformation •Feature Extraction – find all ellipses in an image •Bandwidth Reduction – eliminate the low contrast “coefficients” •Data Reduction – eliminate insignificant coefficients of Discrete Cosine Transform (DCT), Wavelet Transform (WT) •Smooth filtering can get rid of noisy signals
  • 17. Matlab Image Transformation •Discrete Cosine Transform •Fast Fourier Transform •Wavelet Transform •Radon Transform •Hough Transform •Distance Transform
  • 18. Matlab Variable • 2-D Convolution Compute 2-D discrete convolution of two input matrices • 2-D FFT Compute two-dimensional fast Fourier transform of input • 2-D IFFT 2-D Inverse fast Fourier transform of input • 2-D DCT Compute 2-D discrete cosine transform (DCT) • 2-D IDCT Compute 2-D inverse discrete cosine transform (IDCT) • 2-D FIR Filter Perform 2-D FIR filtering on input matrix • Contrast Adjustment Adjust image contrast by linearly scaling pixel values • Deinterlacing Remove motion artifacts by deinterlacing input video signal • Edge Detection Find edges of objects in images using Sobel, Prewitt, Roberts, or Canny method • Histogram Equalization Enhance contrast of images using histogram equalization • Median Filter Perform 2-D median filtering • Hough Transform Find lines in images • Hough Lines Find Cartesian coordinates of lines described by rho and theta pairs • Gaussian Pyramid Perform Gaussian pyramid decomposition
  • 19. Enhancement and Restoration •The goal of enhancement is to accentuate certain features for subsequent analysis or image display. The enhancement process is usually done interactively •The restoration is a process that attempts to reconstruct or recover an image that has been degraded by using some unknown phenomenon
  • 20. Image Enhancement • Grayscale colormap for contrast enhancement • Matlab Library: • vision.ContrastAdjuster Adjust image contrast by linear scaling • vision.Convolver Compute 2-D discrete convolution of two input matrices • vision.FFT Two-dimensional discrete Fourier transform • vision.IFFT Two–dimensional inverse discrete Fourier transform • vision.DCT Compute 2-D discrete cosine transform • vision.IDCT Compute 2-D inverse discrete cosine transform • vision.Deinterlacer Remove motion artifacts by deinterlacing input video signal • vision.EdgeDetector Find object edge • vision.HistogramEqualizer Enhance contrast of images using histogram equalization • vision.HoughTransform Find lines in images via Hough transform • vision.HoughLines Find Cartesian coordinates of lines that are described by rho and theta pairs • vision.ImageFilter Perform 2-D FIR filtering of input matrix • vision.MedianFilter 2D median filtering • vision.Pyramid Perform Gaussian pyramid decomposition
  • 21. Feature Detection and Extraction •Interest point detection, •extracting feature descriptors, •Point feature matching
  • 22. Functions • detectBRISKFeatures -Detect BRISK features and return BRISKPoints object • detectFASTFeatures- Detect corners using FAST algorithm and return cornerPoints object • detectHarrisFeatures- Detect corners using Harris–Stephens algorithm and return cornerPoints object • detectMinEigenFeatures- Detect corners using minimum eigenvalue algorithm and return cornerPoints object • detectMSERFeatures- Detect MSER features and return MSERRegions object • detectSURFFeatures- Detect SURF features and return SURFPoints object • extractFeatures- Extract interest point descriptors • extractHOGFeatures- Extract histogram of oriented gradients (HOG) features • matchFeatures- Find matching features • showMatchedFeatures- Display corresponding feature points
  • 23. Image Restoration--- Wavelet Decomposition • Restoration by Fusion from Fuzzy Images • example • Restoration by fussing two different images • Example • Image Restoration --Deblur image using Wiener filter • Example • Deblur image using Lucy-Richardson method • example
  • 24. Denoising • Functions • cmddenoise Interval-dependent denoising • ddencmp Default values for denoising or compression • thselect Threshold selection for de-noising • wbmpen Penalized threshold for wavelet 1-D or 2-D de-noising • wdcbm Thresholds for wavelet 1-D using Birgé-Massart strategy • wdcbm2 Thresholds for wavelet 2-D using Birgé-Massart strategy • wden Automatic 1-D de-noising • wdencmp De-noising or compression • wmulden Wavelet multivariate de-noising • wnoise Noisy wavelet test data • wnoisest Estimate noise of 1-D wavelet coefficients • wpbmpen Penalized threshold for wavelet packet de-noising • wpdencmp De-noising or compression using wavelet packets • wpthcoef Wavelet packet coefficients thresholding • wthcoef 1-D wavelet coefficient thresholding • wthcoef2 Wavelet coefficient thresholding 2-D • wthresh Soft or hard thresholding • wthrmngr Threshold settings manager • wvarchg Find variance change points • measerr Approximation quality metrics • wavemenu Wavelet Toolbox GUI tools
  • 25. Image Compression • Functions • imgCompress Compress HDU from one file into another • isCompressedImg Determine if current image is compressed • setCompressionType Set image compression type • setHCompScale Set scale parameter for HCOMPRESS algorithm • setHCompSmooth Set smoothing for images compressed with HCOMPRESS • setTileDim Set tile dimensions
  • 26. Image Compression • Two-Dimensional True Compression • example • Compression by Global Thresholding and Huffman Encoding • example • Uncompression • Compression by Progressive Methods • Handling Truecolor Images • More about True Compression of Images
  • 27. Segmentation and Edge Detection • Segmentation is basically a process of pixel classification: the picture is segmented into subsets by assigning the individual pixels into classes • Edge Detection is to find the pixels whose gray values or colors being abruptly changed
  • 28. Image Segmentation • Functions in Matlab • activecontour Segment image into foreground and background using active contour • imsegfmm Binary image segmentation using Fast Marching Method • gradientweight Calculate weights for image pixels based on image gradient • graydiffweight Calculate weights for image pixels based on grayscale intensity difference • graythresh Global image threshold using Otsu's method • multithresh Multilevel image thresholds using Otsu's method
  • 29. Edge Detection • Edge finding Syntax; • BW = edge(I) • gpuarrayBW = edge(gpuarrayI) • BW = edge(I,'sobel') • BW = edge(I,'sobel',thresh) • BW = edge(I,'sobel',thresh,direction) • BW = edge(I,'sobel',...,options) • [BW,thresh] = edge(I,'sobel',...) • BW = edge(I,'prewitt') • BW = edge(I,'prewitt',thresh) • BW = edge(I,'prewitt',thresh,direction) • [BW,thresh] = edge(I,'prewitt',...) • BW = edge(I,'roberts') • BW = edge(I,'roberts',thresh) • BW = edge(I,'roberts',...,options) • [BW,thresh] = edge(I,'roberts',...) • BW = edge(I,'log') • BW = edge(I,'log',thresh) • BW = edge(I,'log',thresh,sigma) • [BW,thresh] = edge(I,'log',...) • BW = edge(I,'zerocross',thresh,h) • [BW,thresh] = edge(I,'zerocross',...) • BW = edge(I,'canny') • BW = edge(I,'canny',thresh) • BW = edge(I,'canny',thresh,sigma) • [BW,thresh] = edge(I,'canny',...)
  • 30. Edge Detection • Hough Transform • Corner Detection • Boundary Tracing in Images • Quadtree Decomposition
  • 31. GUI • Create a Simple GUIDE GUI
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41. • List Pop-Up Menu Items • The pop-up menu provides a choice of three data sets: peaks, membrane, and sinc. These data sets correspond to MATLAB functions of the same name. This topic shows you how to list those data sets as choices in the pop-menu. • In the layout area, click the pop-up menu. • In the Property Inspector, click the button next to String. The String dialog box displays.
  • 42. Replace the existing text with the names of the three data sets: Peaks, Membrane, and Sinc. Press Enter to move to the next line.
  • 43. When you finish editing the items, click OK.
  • 44. Modify the Static Text In this GUI, the static text serves as a label for the pop-up menu. This topic shows you how to change the static text to read Select Data. In the layout area, click the static text. In the Property Inspector, click the button next to String. In the String dialog box that displays, replace the existing text with the phrase Select Data.
  • 45. • Save the GUI Layout • When you save a GUI, GUIDE creates two files, a FIG-file and a code file. The FIG-file, with extension .fig, is a binary file that contains a description of the layout. The code file, with extension .m, contains MATLAB functions that control the GUI behavior. • Save and activate your GUI by selecting Tools > Run. • GUIDE displays a dialog box displaying: "Activating will save changes to your figure file and MATLAB code. Do you wish to continue? • Click Yes. • GUIDE opens a Save As dialog box in your current folder and prompts you for a FIG-file name. • Browse to any folder for which you have write privileges, and then enter the file name simple_gui for the FIG-file. GUIDE saves both the FIG-file and the code file using this name. • If the folder in which you save the GUI is not on the MATLAB path, GUIDE opens a dialog box, giving you the option of changing the current folder to the folder containing the GUI files, or adding that folder to the top or bottom of the MATLAB path. • GUIDE saves the files simple_gui.fig and simple_gui.m, and then activates the GUI. It also opens the GUI code file in your default editor. • The GUI opens in a new window. Notice that the GUI lacks the standard menu bar and toolbar that MATLAB figure windows display. You can add your own menus and toolbar buttons with GUIDE, but by default a GUIDE GUI includes none of these components. • When you run simple_gui, you can select a data set in the pop-up menu and click the push buttons, but nothing happens. This is because the code file contains no statements to service the pop-up menu and the buttons.
  • 46. Code the Simple GUIDE GUI Behavior • % Create the data to plot. • handles.peaks=peaks(35); • handles.membrane=membrane; • [x,y] = meshgrid(-8:.5:8); • r = sqrt(x.^2+y.^2) + eps; • sinc = sin(r)./r; • handles.sinc = sinc; • % Set the current data value. • handles.current_data = handles.peaks; • surf(handles.current_data)
  • 47. • % Determine the selected data set. • str = get(hObject, 'String'); • val = get(hObject,'Value'); • % Set current data to the selected data set. • switch str{val}; • case 'Peaks' % User selects peaks. • handles.current_data = handles.peaks; • case 'Membrane' % User selects membrane. • handles.current_data = handles.membrane; • case 'Sinc' % User selects sinc. • handles.current_data = handles.sinc; • end • % Save the handles structure. • guidata(hObject,handles)
  • 48. • Add the following code to the callback immediately after the comment that begins % handles... • % Display surf plot of the currently selected data. • surf(handles.current_data); • Add this code to the Mesh push button callback, pushbutton2_Callback: • % Display mesh plot of the currently selected data. • mesh(handles.current_data); • Add this code to the Contour push button callback, pushbutton3_Callback: • % Display contour plot of the currently selected data. • contour(handles.current_data); • Save your code by selecting File > Save.
  • 49.
  • 50. • handles.Dataset = 'Databasetrain'; • • k = dir(fullfile(handles.Dataset,'*.bmp')); % Read All file in(Dataset = 'Databasepalmprint';) • k = {k(~[k.isdir]).name}; % Read Filename extension • ------------------------ • [FileName,PathName] = uigetfile('*.m','Select the MATLAB code file');
  • 51. The session Is ended • Any queries please !!!!!!!!!!!!!!!!!!!!