SlideShare a Scribd company logo
1 of 20
DIGITAL IMAGE PROCESSING
Presented by:
Dr. Moe Moe Myint
Information Technology Department
Technological University (Kyaukse),
Myanmar
moemoemyint@moemyanmar.ml
www.slideshare.net/MoeMoeMyint
DIGITAL IMAGE PROCESSING
USING MATLAB
(LAB 09)
Presented by
Dr Moe Moe Myint
AL, Department of IT
Technological University (Kyaukse)
LINEAR FILTERING AND TRANSFORMS
 Linear Filtering Convolution, N-D filtering, and
predefined 2-D filters
 Linear 2-D Filter Design 2-D FIR filters
 Image Transforms Fourier, Discrete Cosine, Radon,
and Fan- beam transforms
Objectives
 To use 2-D discrete cosine transform
 To use 2-D inverse discrete cosine transform
Required Equipment
 Computers with MATLAB software and Projector
Practical Procedures
 Use the dct2 and idct2 matlab command
 To compute the discrete cosine transform for the
autumn image and show the result
 To create a DCT matrix by using inverse DCT
IMAGE TRANSFORMS
 dct2 2-D discrete cosine transform
 idct2 2-D inverse discrete cosine
transform
2-D DISCRETE COSINE TRANSFORM
 Syntax
B = dct2(A)
 Description
B = dct2(A) returns the two-dimensional
discrete cosine transform of A. The matrix B is
the same size as A and contains the discrete
cosine transform coefficients B(k1, k2).
2-D INVERSE DISCRETE COSINE TRANSFORM
 Syntax
B = idct2(A)
 Description
B = idct2(A) returns the two-dimensional
inverse discrete cosine transform (DCT) of A.
EXAMPLES
The commands below compute the discrete
cosine transform for the autumn image.
Notice that most of the energy is in the
upper left corner.
RGB = imread('autumn.tif');
I = rgb2gray(RGB);
J = dct2(I);
imshow(log(abs(J)),[]), title('dct‘), colormap(jet(64)),
colorbar
%Now set values less than magnitude 10 in
the DCT matrix to zero, and then
reconstruct the image using the inverse
DCT function idct2.
J(abs(J) < 10) = 0;
K = idct2(J);
figure, imshow(K,[0 255]); title('inverse dct');
DIGITAL IMAGE PROCESSING
USING MATLAB
(LAB 10)
Presented by
Dr Moe Moe Myint
AL, Department of IT
Technological University (Kyaukse)
Objectives
 To use the morphologically close image and
dilate image
 To erode a binary image with a disk structuring
element
Required Equipment
 Computers with MATLAB software and Projector
Practical Procedures
 Read the image
 Use the imclose command
 Use the imdilate command
 Use the imerode command
 Display the results
INTENSITY AND BINARY IMAGES
 imclose Morphologically close
image
 imdilate Dilate image
 imerode Erode image
IMCLOSE
 Morphologically close image
Syntax
IM2 = imclose(IM,SE)
IM2 = imclose(IM,NHOOD)
Description
IM2 = imclose(IM,SE) performs morphological
closing on the grayscale or binary image IM,
returning the closed image, IM2.
Example
1. Read the image into the MATLAB workspace and
view it.
2. Create a disk-shaped structuring element. Use a
disk structuring element to preserve the circular
nature of the object. Specify a radius of 10 pixels
so that the largest gap gets filled.
3. Perform a morphological close operation on the
image.
originalBW = imread('circles.png');
imshow(originalBW);
se = strel('disk',10);
closeBW = imclose(originalBW,se);
figure, imshow(closeBW)
DILATE IMAGE
Dilation causes objects to dilate or grow in size. The
amount and the way that they grow depend upon
the choice of the structuring element. Dilation
makes an object larger by adding pixels around its
edges.
 Syntax
IM2 = imdilate(IM, SE)
 Description
IM2 = imdilate(IM, SE) dilates the grayscale, binary, or packed binary image
IM, returning the dilated image, IM2. The argument SE is a structuring
element object, or array of structuring element objects, returned by the strel
function.
EXAMPLES
Dilate a binary image with a vertical line
structuring element.
bw = imread('text.png');
se = strel('line',11,90);
bw2 = imdilate(bw,se);
imshow(bw), title('Original')
figure, imshow(bw2), title('Dilated')
CONT…
Dilate a grayscale image with a rolling ball
structuring element.
I = imread('cameraman.tif');
se = strel('ball',5,5);
I2 = imdilate(I,se);
imshow(I), title('Original')
figure, imshow(I2), title('Dilated')
ERODE IMAGE
Erosion causes objects to shrink. The
amount of the way that they shrink depends
upon the choice of the structuring element.
Erosion makes an object smaller by removing
or eroding a way the pixels on its edges.
 Syntax
IM2 = imerode(IM,SE)
 Description
IM2 = imerode(IM,SE) erodes the grayscale, binary, or packed
binary image IM, returning the eroded image IM2. The argument SE
is a structuring element object or array of structuring element
objects returned by the strel function.
EXAMPLES
 Erode a binary image with a disk structuring
element.
originalBW = imread('circles.png');
se = strel('disk',11);
erodedBW = imerode(originalBW,se);
imshow(originalBW), figure, imshow(erodedBW)
CONT…
 Erode a grayscale image with a rolling ball.
I = imread('cameraman.tif');
se = strel('ball',5,5);
I2 = imerode(I,se);
imshow(I), title('Original')
figure, imshow(I2), title('Eroded')
Questions
?

More Related Content

What's hot

Introduction to Image Processing with MATLAB
Introduction to Image Processing with MATLABIntroduction to Image Processing with MATLAB
Introduction to Image Processing with MATLABSriram Emarose
 
3.point operation and histogram based image enhancement
3.point operation and histogram based image enhancement3.point operation and histogram based image enhancement
3.point operation and histogram based image enhancementmukesh bhardwaj
 
Lect 03 - first portion
Lect 03 - first portionLect 03 - first portion
Lect 03 - first portionMoe Moe Myint
 
Image enhancement using alpha rooting based hybrid technique
Image enhancement using alpha rooting based hybrid techniqueImage enhancement using alpha rooting based hybrid technique
Image enhancement using alpha rooting based hybrid techniqueRahul Yadav
 
A Comparative Study of Histogram Equalization Based Image Enhancement Techniq...
A Comparative Study of Histogram Equalization Based Image Enhancement Techniq...A Comparative Study of Histogram Equalization Based Image Enhancement Techniq...
A Comparative Study of Histogram Equalization Based Image Enhancement Techniq...Shahbaz Alam
 
LAPLACE TRANSFORM SUITABILITY FOR IMAGE PROCESSING
LAPLACE TRANSFORM SUITABILITY FOR IMAGE PROCESSINGLAPLACE TRANSFORM SUITABILITY FOR IMAGE PROCESSING
LAPLACE TRANSFORM SUITABILITY FOR IMAGE PROCESSINGPriyanka Rathore
 
Image enhancement in the spatial domain1
Image enhancement in the spatial domain1Image enhancement in the spatial domain1
Image enhancement in the spatial domain1shabanam tamboli
 
Lect 02 second portion
Lect 02  second portionLect 02  second portion
Lect 02 second portionMoe Moe Myint
 
Image enhancement techniques
Image enhancement techniquesImage enhancement techniques
Image enhancement techniquesSaideep
 
Histogram equalization
Histogram equalizationHistogram equalization
Histogram equalizationtreasure17
 
Chapter 9 morphological image processing
Chapter 9   morphological image processingChapter 9   morphological image processing
Chapter 9 morphological image processingAhmed Daoud
 
Contrast limited adaptive histogram equalization
Contrast limited adaptive histogram equalizationContrast limited adaptive histogram equalization
Contrast limited adaptive histogram equalizationEr. Nancy
 
COLOUR IMAGE ENHANCEMENT BASED ON HISTOGRAM EQUALIZATION
COLOUR IMAGE ENHANCEMENT BASED ON HISTOGRAM EQUALIZATIONCOLOUR IMAGE ENHANCEMENT BASED ON HISTOGRAM EQUALIZATION
COLOUR IMAGE ENHANCEMENT BASED ON HISTOGRAM EQUALIZATIONecij
 
Image processing using matlab
Image processing using matlab Image processing using matlab
Image processing using matlab SangeethaSasi1
 

What's hot (20)

point processing
point processingpoint processing
point processing
 
Dip Morphological
Dip MorphologicalDip Morphological
Dip Morphological
 
Introduction to Image Processing with MATLAB
Introduction to Image Processing with MATLABIntroduction to Image Processing with MATLAB
Introduction to Image Processing with MATLAB
 
Matlab
MatlabMatlab
Matlab
 
3.point operation and histogram based image enhancement
3.point operation and histogram based image enhancement3.point operation and histogram based image enhancement
3.point operation and histogram based image enhancement
 
Lect 03 - first portion
Lect 03 - first portionLect 03 - first portion
Lect 03 - first portion
 
Ec section
Ec section Ec section
Ec section
 
Image enhancement using alpha rooting based hybrid technique
Image enhancement using alpha rooting based hybrid techniqueImage enhancement using alpha rooting based hybrid technique
Image enhancement using alpha rooting based hybrid technique
 
Image Processing Using MATLAB
Image Processing Using MATLABImage Processing Using MATLAB
Image Processing Using MATLAB
 
A Comparative Study of Histogram Equalization Based Image Enhancement Techniq...
A Comparative Study of Histogram Equalization Based Image Enhancement Techniq...A Comparative Study of Histogram Equalization Based Image Enhancement Techniq...
A Comparative Study of Histogram Equalization Based Image Enhancement Techniq...
 
LAPLACE TRANSFORM SUITABILITY FOR IMAGE PROCESSING
LAPLACE TRANSFORM SUITABILITY FOR IMAGE PROCESSINGLAPLACE TRANSFORM SUITABILITY FOR IMAGE PROCESSING
LAPLACE TRANSFORM SUITABILITY FOR IMAGE PROCESSING
 
Image enhancement
Image enhancementImage enhancement
Image enhancement
 
Image enhancement in the spatial domain1
Image enhancement in the spatial domain1Image enhancement in the spatial domain1
Image enhancement in the spatial domain1
 
Lect 02 second portion
Lect 02  second portionLect 02  second portion
Lect 02 second portion
 
Image enhancement techniques
Image enhancement techniquesImage enhancement techniques
Image enhancement techniques
 
Histogram equalization
Histogram equalizationHistogram equalization
Histogram equalization
 
Chapter 9 morphological image processing
Chapter 9   morphological image processingChapter 9   morphological image processing
Chapter 9 morphological image processing
 
Contrast limited adaptive histogram equalization
Contrast limited adaptive histogram equalizationContrast limited adaptive histogram equalization
Contrast limited adaptive histogram equalization
 
COLOUR IMAGE ENHANCEMENT BASED ON HISTOGRAM EQUALIZATION
COLOUR IMAGE ENHANCEMENT BASED ON HISTOGRAM EQUALIZATIONCOLOUR IMAGE ENHANCEMENT BASED ON HISTOGRAM EQUALIZATION
COLOUR IMAGE ENHANCEMENT BASED ON HISTOGRAM EQUALIZATION
 
Image processing using matlab
Image processing using matlab Image processing using matlab
Image processing using matlab
 

Similar to Digital Image Processing (Lab 09 and 10)

Discrete Cosine Transforms.pdf
Discrete Cosine Transforms.pdfDiscrete Cosine Transforms.pdf
Discrete Cosine Transforms.pdfMadhusudhan Mishra
 
project_final_seminar
project_final_seminarproject_final_seminar
project_final_seminarMUKUL BICHKAR
 
CE344L-200365-Lab7.pdf
CE344L-200365-Lab7.pdfCE344L-200365-Lab7.pdf
CE344L-200365-Lab7.pdfUmarMustafa13
 
Image enhancement techniques
Image enhancement techniques Image enhancement techniques
Image enhancement techniques Arshad khan
 
IJCER (www.ijceronline.com) International Journal of computational Engineeri...
 IJCER (www.ijceronline.com) International Journal of computational Engineeri... IJCER (www.ijceronline.com) International Journal of computational Engineeri...
IJCER (www.ijceronline.com) International Journal of computational Engineeri...ijceronline
 
Low Light Image Enhancement Using Zero-DCE algorithm
Low Light Image Enhancement Using Zero-DCE algorithmLow Light Image Enhancement Using Zero-DCE algorithm
Low Light Image Enhancement Using Zero-DCE algorithmIRJET Journal
 
Introduction to image contrast and enhancement method
Introduction to image contrast and enhancement methodIntroduction to image contrast and enhancement method
Introduction to image contrast and enhancement methodAbhishekvb
 
Paper id 25201490
Paper id 25201490Paper id 25201490
Paper id 25201490IJRAT
 
IRJET- Image Compression Technique for Quantized Encrypted Images using SVD
IRJET-  	  Image Compression Technique for Quantized Encrypted Images using SVDIRJET-  	  Image Compression Technique for Quantized Encrypted Images using SVD
IRJET- Image Compression Technique for Quantized Encrypted Images using SVDIRJET Journal
 
When Discrete Optimization Meets Multimedia Security (and Beyond)
When Discrete Optimization Meets Multimedia Security (and Beyond)When Discrete Optimization Meets Multimedia Security (and Beyond)
When Discrete Optimization Meets Multimedia Security (and Beyond)Shujun Li
 
Blur and un blur an image using matlab
Blur and un blur an image using matlabBlur and un blur an image using matlab
Blur and un blur an image using matlabWaqarAhmad444
 
imageenhancementtechniques-140316011049-phpapp01 (1).pptx
imageenhancementtechniques-140316011049-phpapp01 (1).pptximageenhancementtechniques-140316011049-phpapp01 (1).pptx
imageenhancementtechniques-140316011049-phpapp01 (1).pptxsalutiontechnology
 
Fundamentals of image processing
Fundamentals of image processingFundamentals of image processing
Fundamentals of image processingRoufulAlamBhat1
 
IJERD (www.ijerd.com) International Journal of Engineering Research and Devel...
IJERD (www.ijerd.com) International Journal of Engineering Research and Devel...IJERD (www.ijerd.com) International Journal of Engineering Research and Devel...
IJERD (www.ijerd.com) International Journal of Engineering Research and Devel...IJERD Editor
 

Similar to Digital Image Processing (Lab 09 and 10) (20)

Discrete Cosine Transforms.pdf
Discrete Cosine Transforms.pdfDiscrete Cosine Transforms.pdf
Discrete Cosine Transforms.pdf
 
project_final_seminar
project_final_seminarproject_final_seminar
project_final_seminar
 
Dip iit workshop
Dip iit workshopDip iit workshop
Dip iit workshop
 
Image processing in MATLAB
Image processing in MATLABImage processing in MATLAB
Image processing in MATLAB
 
CE344L-200365-Lab7.pdf
CE344L-200365-Lab7.pdfCE344L-200365-Lab7.pdf
CE344L-200365-Lab7.pdf
 
image enhancement.pptx
image enhancement.pptximage enhancement.pptx
image enhancement.pptx
 
Dip review
Dip reviewDip review
Dip review
 
Image enhancement techniques
Image enhancement techniques Image enhancement techniques
Image enhancement techniques
 
IJCER (www.ijceronline.com) International Journal of computational Engineeri...
 IJCER (www.ijceronline.com) International Journal of computational Engineeri... IJCER (www.ijceronline.com) International Journal of computational Engineeri...
IJCER (www.ijceronline.com) International Journal of computational Engineeri...
 
Image denoising using curvelet transform
Image denoising using curvelet transformImage denoising using curvelet transform
Image denoising using curvelet transform
 
Medial axis transformation based skeletonzation of image patterns using image...
Medial axis transformation based skeletonzation of image patterns using image...Medial axis transformation based skeletonzation of image patterns using image...
Medial axis transformation based skeletonzation of image patterns using image...
 
Low Light Image Enhancement Using Zero-DCE algorithm
Low Light Image Enhancement Using Zero-DCE algorithmLow Light Image Enhancement Using Zero-DCE algorithm
Low Light Image Enhancement Using Zero-DCE algorithm
 
Introduction to image contrast and enhancement method
Introduction to image contrast and enhancement methodIntroduction to image contrast and enhancement method
Introduction to image contrast and enhancement method
 
Paper id 25201490
Paper id 25201490Paper id 25201490
Paper id 25201490
 
IRJET- Image Compression Technique for Quantized Encrypted Images using SVD
IRJET-  	  Image Compression Technique for Quantized Encrypted Images using SVDIRJET-  	  Image Compression Technique for Quantized Encrypted Images using SVD
IRJET- Image Compression Technique for Quantized Encrypted Images using SVD
 
When Discrete Optimization Meets Multimedia Security (and Beyond)
When Discrete Optimization Meets Multimedia Security (and Beyond)When Discrete Optimization Meets Multimedia Security (and Beyond)
When Discrete Optimization Meets Multimedia Security (and Beyond)
 
Blur and un blur an image using matlab
Blur and un blur an image using matlabBlur and un blur an image using matlab
Blur and un blur an image using matlab
 
imageenhancementtechniques-140316011049-phpapp01 (1).pptx
imageenhancementtechniques-140316011049-phpapp01 (1).pptximageenhancementtechniques-140316011049-phpapp01 (1).pptx
imageenhancementtechniques-140316011049-phpapp01 (1).pptx
 
Fundamentals of image processing
Fundamentals of image processingFundamentals of image processing
Fundamentals of image processing
 
IJERD (www.ijerd.com) International Journal of Engineering Research and Devel...
IJERD (www.ijerd.com) International Journal of Engineering Research and Devel...IJERD (www.ijerd.com) International Journal of Engineering Research and Devel...
IJERD (www.ijerd.com) International Journal of Engineering Research and Devel...
 

More from Moe Moe Myint

Ch 1 introduction to Embedded Systems (AY:2018-2019--> First Semester)
Ch 1 introduction to Embedded Systems (AY:2018-2019--> First Semester)Ch 1 introduction to Embedded Systems (AY:2018-2019--> First Semester)
Ch 1 introduction to Embedded Systems (AY:2018-2019--> First Semester)Moe Moe Myint
 
Chapter 8 Embedded Hardware Design and Development (third portion)
Chapter 8 Embedded Hardware Design and Development (third portion)Chapter 8 Embedded Hardware Design and Development (third portion)
Chapter 8 Embedded Hardware Design and Development (third portion)Moe Moe Myint
 
Chapter 8 Embedded Hardware Design and Development (second portion)
Chapter 8 Embedded Hardware Design and Development (second portion)Chapter 8 Embedded Hardware Design and Development (second portion)
Chapter 8 Embedded Hardware Design and Development (second portion)Moe Moe Myint
 
Schematic and PCB Design Using Eagle
Schematic and PCB Design Using EagleSchematic and PCB Design Using Eagle
Schematic and PCB Design Using EagleMoe Moe Myint
 
Chapter 4 Embedded System: Application and Domain Specific
Chapter 4 Embedded System: Application and Domain SpecificChapter 4 Embedded System: Application and Domain Specific
Chapter 4 Embedded System: Application and Domain SpecificMoe Moe Myint
 
Chapter 3 Charateristics and Quality Attributes of Embedded System
Chapter 3 Charateristics and Quality Attributes of Embedded SystemChapter 3 Charateristics and Quality Attributes of Embedded System
Chapter 3 Charateristics and Quality Attributes of Embedded SystemMoe Moe Myint
 
Introduction to Embedded System I: Chapter 2 (5th portion)
Introduction to Embedded System I: Chapter 2 (5th portion)Introduction to Embedded System I: Chapter 2 (5th portion)
Introduction to Embedded System I: Chapter 2 (5th portion)Moe Moe Myint
 
Introduction to Embedded System: Chapter 2 (4th portion)
Introduction to Embedded System:  Chapter 2 (4th portion)Introduction to Embedded System:  Chapter 2 (4th portion)
Introduction to Embedded System: Chapter 2 (4th portion)Moe Moe Myint
 
Introduction to Embedded System I : Chapter 2 (3rd portion)
Introduction to Embedded System I : Chapter 2 (3rd portion)Introduction to Embedded System I : Chapter 2 (3rd portion)
Introduction to Embedded System I : Chapter 2 (3rd portion)Moe Moe Myint
 
Introduction to Embedded System I : Chapter 2 (2nd portion)
Introduction to Embedded System I : Chapter 2 (2nd portion)Introduction to Embedded System I : Chapter 2 (2nd portion)
Introduction to Embedded System I : Chapter 2 (2nd portion)Moe Moe Myint
 
Introduction to Embedded Systems I: Chapter 2 (1st portion)
Introduction to Embedded Systems I: Chapter 2 (1st portion)Introduction to Embedded Systems I: Chapter 2 (1st portion)
Introduction to Embedded Systems I: Chapter 2 (1st portion)Moe Moe Myint
 
Introduction to Embedded Systems I : Chapter 1
Introduction to Embedded Systems I : Chapter 1Introduction to Embedded Systems I : Chapter 1
Introduction to Embedded Systems I : Chapter 1Moe Moe Myint
 
Lect 02 first portion
Lect 02   first portionLect 02   first portion
Lect 02 first portionMoe Moe Myint
 
Lect 02 first portion
Lect 02   first portionLect 02   first portion
Lect 02 first portionMoe Moe Myint
 
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
 
Digital Image Processing (Lab 08)
Digital Image Processing (Lab 08)Digital Image Processing (Lab 08)
Digital Image Processing (Lab 08)Moe Moe Myint
 
Digital image processing lab 1
Digital image processing lab 1Digital image processing lab 1
Digital image processing lab 1Moe Moe Myint
 

More from Moe Moe Myint (18)

Ch 1 introduction to Embedded Systems (AY:2018-2019--> First Semester)
Ch 1 introduction to Embedded Systems (AY:2018-2019--> First Semester)Ch 1 introduction to Embedded Systems (AY:2018-2019--> First Semester)
Ch 1 introduction to Embedded Systems (AY:2018-2019--> First Semester)
 
Chapter 8 Embedded Hardware Design and Development (third portion)
Chapter 8 Embedded Hardware Design and Development (third portion)Chapter 8 Embedded Hardware Design and Development (third portion)
Chapter 8 Embedded Hardware Design and Development (third portion)
 
Chapter 8 Embedded Hardware Design and Development (second portion)
Chapter 8 Embedded Hardware Design and Development (second portion)Chapter 8 Embedded Hardware Design and Development (second portion)
Chapter 8 Embedded Hardware Design and Development (second portion)
 
Schematic and PCB Design Using Eagle
Schematic and PCB Design Using EagleSchematic and PCB Design Using Eagle
Schematic and PCB Design Using Eagle
 
Chapter 4 Embedded System: Application and Domain Specific
Chapter 4 Embedded System: Application and Domain SpecificChapter 4 Embedded System: Application and Domain Specific
Chapter 4 Embedded System: Application and Domain Specific
 
Chapter 3 Charateristics and Quality Attributes of Embedded System
Chapter 3 Charateristics and Quality Attributes of Embedded SystemChapter 3 Charateristics and Quality Attributes of Embedded System
Chapter 3 Charateristics and Quality Attributes of Embedded System
 
Introduction to Embedded System I: Chapter 2 (5th portion)
Introduction to Embedded System I: Chapter 2 (5th portion)Introduction to Embedded System I: Chapter 2 (5th portion)
Introduction to Embedded System I: Chapter 2 (5th portion)
 
Introduction to Embedded System: Chapter 2 (4th portion)
Introduction to Embedded System:  Chapter 2 (4th portion)Introduction to Embedded System:  Chapter 2 (4th portion)
Introduction to Embedded System: Chapter 2 (4th portion)
 
Introduction to Embedded System I : Chapter 2 (3rd portion)
Introduction to Embedded System I : Chapter 2 (3rd portion)Introduction to Embedded System I : Chapter 2 (3rd portion)
Introduction to Embedded System I : Chapter 2 (3rd portion)
 
Introduction to Embedded System I : Chapter 2 (2nd portion)
Introduction to Embedded System I : Chapter 2 (2nd portion)Introduction to Embedded System I : Chapter 2 (2nd portion)
Introduction to Embedded System I : Chapter 2 (2nd portion)
 
Introduction to Embedded Systems I: Chapter 2 (1st portion)
Introduction to Embedded Systems I: Chapter 2 (1st portion)Introduction to Embedded Systems I: Chapter 2 (1st portion)
Introduction to Embedded Systems I: Chapter 2 (1st portion)
 
Introduction to Embedded Systems I : Chapter 1
Introduction to Embedded Systems I : Chapter 1Introduction to Embedded Systems I : Chapter 1
Introduction to Embedded Systems I : Chapter 1
 
Lect 06
Lect 06 Lect 06
Lect 06
 
Lect 02 first portion
Lect 02   first portionLect 02   first portion
Lect 02 first portion
 
Lect 02 first portion
Lect 02   first portionLect 02   first portion
Lect 02 first portion
 
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)
 
Digital Image Processing (Lab 08)
Digital Image Processing (Lab 08)Digital Image Processing (Lab 08)
Digital Image Processing (Lab 08)
 
Digital image processing lab 1
Digital image processing lab 1Digital image processing lab 1
Digital image processing lab 1
 

Recently uploaded

Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfAsst.prof M.Gokilavani
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxk795866
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfROCENODodongVILLACER
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptSAURABHKUMAR892774
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...Chandu841456
 

Recently uploaded (20)

Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptx
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdf
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.ppt
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 

Digital Image Processing (Lab 09 and 10)

  • 1. DIGITAL IMAGE PROCESSING Presented by: Dr. Moe Moe Myint Information Technology Department Technological University (Kyaukse), Myanmar moemoemyint@moemyanmar.ml www.slideshare.net/MoeMoeMyint
  • 2. DIGITAL IMAGE PROCESSING USING MATLAB (LAB 09) Presented by Dr Moe Moe Myint AL, Department of IT Technological University (Kyaukse)
  • 3. LINEAR FILTERING AND TRANSFORMS  Linear Filtering Convolution, N-D filtering, and predefined 2-D filters  Linear 2-D Filter Design 2-D FIR filters  Image Transforms Fourier, Discrete Cosine, Radon, and Fan- beam transforms
  • 4. Objectives  To use 2-D discrete cosine transform  To use 2-D inverse discrete cosine transform Required Equipment  Computers with MATLAB software and Projector Practical Procedures  Use the dct2 and idct2 matlab command  To compute the discrete cosine transform for the autumn image and show the result  To create a DCT matrix by using inverse DCT
  • 5. IMAGE TRANSFORMS  dct2 2-D discrete cosine transform  idct2 2-D inverse discrete cosine transform
  • 6. 2-D DISCRETE COSINE TRANSFORM  Syntax B = dct2(A)  Description B = dct2(A) returns the two-dimensional discrete cosine transform of A. The matrix B is the same size as A and contains the discrete cosine transform coefficients B(k1, k2).
  • 7. 2-D INVERSE DISCRETE COSINE TRANSFORM  Syntax B = idct2(A)  Description B = idct2(A) returns the two-dimensional inverse discrete cosine transform (DCT) of A.
  • 8. EXAMPLES The commands below compute the discrete cosine transform for the autumn image. Notice that most of the energy is in the upper left corner. RGB = imread('autumn.tif'); I = rgb2gray(RGB); J = dct2(I); imshow(log(abs(J)),[]), title('dct‘), colormap(jet(64)), colorbar %Now set values less than magnitude 10 in the DCT matrix to zero, and then reconstruct the image using the inverse DCT function idct2. J(abs(J) < 10) = 0; K = idct2(J); figure, imshow(K,[0 255]); title('inverse dct');
  • 9. DIGITAL IMAGE PROCESSING USING MATLAB (LAB 10) Presented by Dr Moe Moe Myint AL, Department of IT Technological University (Kyaukse)
  • 10. Objectives  To use the morphologically close image and dilate image  To erode a binary image with a disk structuring element Required Equipment  Computers with MATLAB software and Projector Practical Procedures  Read the image  Use the imclose command  Use the imdilate command  Use the imerode command  Display the results
  • 11. INTENSITY AND BINARY IMAGES  imclose Morphologically close image  imdilate Dilate image  imerode Erode image
  • 12. IMCLOSE  Morphologically close image Syntax IM2 = imclose(IM,SE) IM2 = imclose(IM,NHOOD) Description IM2 = imclose(IM,SE) performs morphological closing on the grayscale or binary image IM, returning the closed image, IM2.
  • 13. Example 1. Read the image into the MATLAB workspace and view it. 2. Create a disk-shaped structuring element. Use a disk structuring element to preserve the circular nature of the object. Specify a radius of 10 pixels so that the largest gap gets filled. 3. Perform a morphological close operation on the image. originalBW = imread('circles.png'); imshow(originalBW); se = strel('disk',10); closeBW = imclose(originalBW,se); figure, imshow(closeBW)
  • 14. DILATE IMAGE Dilation causes objects to dilate or grow in size. The amount and the way that they grow depend upon the choice of the structuring element. Dilation makes an object larger by adding pixels around its edges.  Syntax IM2 = imdilate(IM, SE)  Description IM2 = imdilate(IM, SE) dilates the grayscale, binary, or packed binary image IM, returning the dilated image, IM2. The argument SE is a structuring element object, or array of structuring element objects, returned by the strel function.
  • 15. EXAMPLES Dilate a binary image with a vertical line structuring element. bw = imread('text.png'); se = strel('line',11,90); bw2 = imdilate(bw,se); imshow(bw), title('Original') figure, imshow(bw2), title('Dilated')
  • 16. CONT… Dilate a grayscale image with a rolling ball structuring element. I = imread('cameraman.tif'); se = strel('ball',5,5); I2 = imdilate(I,se); imshow(I), title('Original') figure, imshow(I2), title('Dilated')
  • 17. ERODE IMAGE Erosion causes objects to shrink. The amount of the way that they shrink depends upon the choice of the structuring element. Erosion makes an object smaller by removing or eroding a way the pixels on its edges.  Syntax IM2 = imerode(IM,SE)  Description IM2 = imerode(IM,SE) erodes the grayscale, binary, or packed binary image IM, returning the eroded image IM2. The argument SE is a structuring element object or array of structuring element objects returned by the strel function.
  • 18. EXAMPLES  Erode a binary image with a disk structuring element. originalBW = imread('circles.png'); se = strel('disk',11); erodedBW = imerode(originalBW,se); imshow(originalBW), figure, imshow(erodedBW)
  • 19. CONT…  Erode a grayscale image with a rolling ball. I = imread('cameraman.tif'); se = strel('ball',5,5); I2 = imerode(I,se); imshow(I), title('Original') figure, imshow(I2), title('Eroded')

Editor's Notes

  1. Dilation: grow image regions
  2. Erosion : Shrink image regions