SlideShare a Scribd company logo
Presented by:
Dr. Moe Moe Myint
Information Technology Department
Technological University (Kyaukse), Myanmar
Digital Image Processing
moemoemyint@moemyanmar.ml
www.slideshare.net/MoeMoeMyint
• Only Original Owner has full rights reserved for copied images.
• This PPT is only for fair academic use.
Image Enhancement (Lab 7)
M. M. Myint
Dr. Moe Moe Myint
Information Technology Department
Technological University (Kyaukse)
- To process an image so that the result is more suitable
than the original image for a specific application
Objectives
• To apply contrast-limited Adaptive Histogram Equalization (CLAHE)
to an image
• To enhance contrast using histogram equalization
• To adjust image intensity values or colormap
• To add noise to image and Display the results
Required Equipment
• Computers with MATLAB software and Projector
Practical Procedures
• Use the adapthisteq command
• Use the histeq command
• Use the imadjust command
• Use the imnoise command
• Use the medfilt2 command
Image Enhancement
• adapthisteq Contrast-limited adaptive histogram equalization
(CLAHE)
• histeq Enhance contrast using histogram equalization
• imadjust Adjust image intensity values or colormap
• imnoise Convert integer values using lookup table
• medfilt2 2-D median filtering
adapthisteq
• Contrast-limited adaptive histogram equalization (CLAHE)
Syntax
J = adapthisteq(I)
J = adapthisteq(I,param1,val1,param2,val2...)
Description
• J = adapthisteq(I) enhances the contrast of the grayscale image I
by transforming the values using contrast-limited adaptive
histogram equalization (CLAHE).
• J = adapthisteq(I,param1,val1,param2,val2...) specifies any of the
additional parameter/value pairs listed in the following table.
Parameter names can be abbreviated, and case does not matter.
Examples
• Apply Contrast-limited Adaptive Histogram Equalization (CLAHE) to an
image and display the results.
I = imread('tire.tif');
A = adapthisteq(I,'clipLimit',0.02,'Distribution','rayleigh');
figure, imshow(I);
figure, imshow(A);
• Apply CLAHE to a color image.
[X MAP] = imread('shadow.tif'); % Convert indexed image to true-color (RGB) format
RGB = ind2rgb(X,MAP); % Convert image to L*a*b* color space
cform2lab = makecform('srgb2lab'); %Create color transformation structure
LAB = applycform(RGB, cform2lab); % Scale values to range from 0 to 1
L = LAB(:,:,1)/100; % Perform CLAHE
LAB(:,:,1) = adapthisteq(L,'NumTiles',...
[8 8],'ClipLimit',0.005)*100; % Convert back to RGB color space
cform2srgb = makecform('lab2srgb');
J = applycform(LAB, cform2srgb); % Display the results
figure, imshow(RGB);
figure, imshow(J);
histeq
• Enhance contrast using histogram equalization
Syntax
J = histeq(I, hgram)
J = histeq(I, n)
[J, T] = histeq(I,...)
newmap = histeq(X, map, hgram)
newmap = histeq(X, map)
[newmap, T] = histeq(X,...)
Description
• histeq enhances the contrast of images by transforming the values in
an intensity image, or the values in the colormap of an indexed
image, so that the histogram of the output image approximately
matches a specified histogram.
Examples
• Enhance the contrast of an intensity image using
histogram equalization.
I = imread('tire.tif');
J = histeq(I);
imshow(I)
figure, imshow(J)
• Display a histogram of the original image.
figure; imhist(I,64)
• Compare it to a histogram of the processed image.
figure; imhist(J,64)
imadjust
• Adjust image intensity values or colormap
Syntax
J = imadjust(I)
J = imadjust(I,[low_in; high_in],[low_out; high_out])
J = imadjust(I,[low_in; high_in],[low_out; high_out],gamma)
newmap = imadjust(map,[low_in; high_in],[low_out;
high_out],gamma)
RGB2 = imadjust(RGB1,...)
Examples
• Adjust a low-contrast grayscale image.
I = imread('pout.tif');
J = imadjust(I);
imshow(I), figure, imshow(J)
• Adjust the grayscale image, specifying the contrast limits.
K = imadjust(I,[0.3 0.7],[]);
figure, imshow(K)
• Adjust an RGB image.
RGB1 = imread('football.jpg');
RGB2 = imadjust(RGB1,[.2 .3 0; .6 .7 1],[]);
imshow(RGB1), figure, imshow(RGB2)
imnoise
• Add noise to image
Syntax
J = imnoise(I,type)
J = imnoise(I,type,parameters)
J = imnoise(I,'gaussian',m,v)
J = imnoise(I,'localvar',V)
J = imnoise(I,'localvar',image_intensity,var)
J = imnoise(I,'poisson')
J = imnoise(I,'salt & pepper',d)
J = imnoise(I,'speckle',v)
Examples
I = imread('eight.tif');
J = imnoise(I,'salt & pepper',0.02);
figure, imshow(I)
figure, imshow(J)
medfilt2
• 2-D median filtering
Syntax
B = medfilt2(A, [m n])
B = medfilt2(A)
B = medfilt2(A, 'indexed', ...)
B = medfilt2(..., padopt)
Description
Median filtering is a nonlinear operation often used in image
processing to reduce "salt and pepper" noise. A median filter is
more effective than convolution when the goal is to
simultaneously reduce noise and preserve edges.
Examples
• Add salt and pepper noise to an image and then restore
the image using medfilt2.
I = imread('eight.tif');
J = imnoise(I,'salt & pepper',0.02);
K = medfilt2(J);
imshow(J), figure, imshow(K)
Questions?

More Related Content

PPT
Digital image processing lab 1
PPTX
Computer Graphics
PDF
Depth Prediction Without the Sensors: Leveraging Structure for Unsupervised L...
PPTX
Sign language recognizer
PDF
Digital Image Processing: Image Segmentation
PDF
Transfer Learning
PDF
三次元点群処理ライブラリPCLと 統合ロボットシステム研究での 利用例の紹介
PPTX
Ppt final
Digital image processing lab 1
Computer Graphics
Depth Prediction Without the Sensors: Leveraging Structure for Unsupervised L...
Sign language recognizer
Digital Image Processing: Image Segmentation
Transfer Learning
三次元点群処理ライブラリPCLと 統合ロボットシステム研究での 利用例の紹介
Ppt final

What's hot (20)

PPTX
Lect 02 second portion
PPTX
Object Recognition
PDF
Convolutional Neural Network Models - Deep Learning
PPT
Action Recognition (Thesis presentation)
PDF
IMAGE QUALITY ASSESSMENT- A SURVEY OF RECENT APPROACHES
PPTX
Hand Gesture Recognition Using OpenCV Python
PPT
Biometric steganography
DOC
Digital image processing questions
PPTX
Google Media Pipe and Computer Vision
PPT
3d password ppt
PPTX
Speech recognition final presentation
DOCX
Project Report
PDF
Image Restoration (Digital Image Processing)
PDF
Lab manual of Digital image processing using python by khalid Shaikh
PDF
Lecture 8 (Stereo imaging) (Digital Image Processing)
PPTX
Hand gesture recognition PROJECT PPT.pptx
PDF
Deepface
PDF
Transfer Learning: An overview
PPTX
LiDARの原理などのまとめ
PDF
Image sampling and quantization
Lect 02 second portion
Object Recognition
Convolutional Neural Network Models - Deep Learning
Action Recognition (Thesis presentation)
IMAGE QUALITY ASSESSMENT- A SURVEY OF RECENT APPROACHES
Hand Gesture Recognition Using OpenCV Python
Biometric steganography
Digital image processing questions
Google Media Pipe and Computer Vision
3d password ppt
Speech recognition final presentation
Project Report
Image Restoration (Digital Image Processing)
Lab manual of Digital image processing using python by khalid Shaikh
Lecture 8 (Stereo imaging) (Digital Image Processing)
Hand gesture recognition PROJECT PPT.pptx
Deepface
Transfer Learning: An overview
LiDARの原理などのまとめ
Image sampling and quantization
Ad

Viewers also liked (6)

PPTX
Digital Image Processing (Lab 09 and 10)
PDF
Webber-thesis-2015
PPTX
Digital Image Processing (Lab 06)
PPTX
Digital Image Processing (Lab 05)
PPTX
Digital Image Processing (Lab 08)
PPTX
Lect 03 - first portion
Digital Image Processing (Lab 09 and 10)
Webber-thesis-2015
Digital Image Processing (Lab 06)
Digital Image Processing (Lab 05)
Digital Image Processing (Lab 08)
Lect 03 - first portion
Ad

Similar to Digital Image Processing (Lab 07) (20)

PDF
X-Ray Image Enhancement using CLAHE Method
PDF
Image Enhancement
PDF
Matlab practical ---5.pdf
PPT
Wong weisenbeck
PDF
Comparison of Histogram Equalization Techniques for Image Enhancement of Gray...
PDF
The Effectiveness and Efficiency of Medical Images after Special Filtration f...
PDF
Histogram expansion a technique of histogram equlization
PDF
Histogram Equalization
PPT
ModuleII.ppt
PPT
ModuleII.ppt
PPT
ModuleII.ppt
PPTX
Contrast limited adaptive histogram equalization
PDF
PDF
Image processing
PDF
Cq32579584
PPTX
Intensity Transformation and Spatial filtering
PPT
Histogram.ppt Histogram equilization to improve the image quality
PDF
G0813841
PDF
A Study for Applications of Histogram in Image Enhancement
PDF
Performance Evaluation of Filters for Enhancement of Images in Different Appl...
X-Ray Image Enhancement using CLAHE Method
Image Enhancement
Matlab practical ---5.pdf
Wong weisenbeck
Comparison of Histogram Equalization Techniques for Image Enhancement of Gray...
The Effectiveness and Efficiency of Medical Images after Special Filtration f...
Histogram expansion a technique of histogram equlization
Histogram Equalization
ModuleII.ppt
ModuleII.ppt
ModuleII.ppt
Contrast limited adaptive histogram equalization
Image processing
Cq32579584
Intensity Transformation and Spatial filtering
Histogram.ppt Histogram equilization to improve the image quality
G0813841
A Study for Applications of Histogram in Image Enhancement
Performance Evaluation of Filters for Enhancement of Images in Different Appl...

More from Moe Moe Myint (17)

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

Recently uploaded (20)

PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PPTX
Construction Project Organization Group 2.pptx
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PPT
Project quality management in manufacturing
PPTX
CH1 Production IntroductoryConcepts.pptx
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PDF
composite construction of structures.pdf
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PPTX
Lecture Notes Electrical Wiring System Components
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PPTX
Welding lecture in detail for understanding
PPTX
OOP with Java - Java Introduction (Basics)
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
Automation-in-Manufacturing-Chapter-Introduction.pdf
Construction Project Organization Group 2.pptx
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
Project quality management in manufacturing
CH1 Production IntroductoryConcepts.pptx
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
R24 SURVEYING LAB MANUAL for civil enggi
composite construction of structures.pdf
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
Lecture Notes Electrical Wiring System Components
Embodied AI: Ushering in the Next Era of Intelligent Systems
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
Welding lecture in detail for understanding
OOP with Java - Java Introduction (Basics)
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks

Digital Image Processing (Lab 07)

  • 1. Presented by: Dr. Moe Moe Myint Information Technology Department Technological University (Kyaukse), Myanmar Digital Image Processing moemoemyint@moemyanmar.ml www.slideshare.net/MoeMoeMyint
  • 2. • Only Original Owner has full rights reserved for copied images. • This PPT is only for fair academic use.
  • 3. Image Enhancement (Lab 7) M. M. Myint Dr. Moe Moe Myint Information Technology Department Technological University (Kyaukse) - To process an image so that the result is more suitable than the original image for a specific application
  • 4. Objectives • To apply contrast-limited Adaptive Histogram Equalization (CLAHE) to an image • To enhance contrast using histogram equalization • To adjust image intensity values or colormap • To add noise to image and Display the results Required Equipment • Computers with MATLAB software and Projector Practical Procedures • Use the adapthisteq command • Use the histeq command • Use the imadjust command • Use the imnoise command • Use the medfilt2 command
  • 5. Image Enhancement • adapthisteq Contrast-limited adaptive histogram equalization (CLAHE) • histeq Enhance contrast using histogram equalization • imadjust Adjust image intensity values or colormap • imnoise Convert integer values using lookup table • medfilt2 2-D median filtering
  • 6. adapthisteq • Contrast-limited adaptive histogram equalization (CLAHE) Syntax J = adapthisteq(I) J = adapthisteq(I,param1,val1,param2,val2...) Description • J = adapthisteq(I) enhances the contrast of the grayscale image I by transforming the values using contrast-limited adaptive histogram equalization (CLAHE). • J = adapthisteq(I,param1,val1,param2,val2...) specifies any of the additional parameter/value pairs listed in the following table. Parameter names can be abbreviated, and case does not matter.
  • 7. Examples • Apply Contrast-limited Adaptive Histogram Equalization (CLAHE) to an image and display the results. I = imread('tire.tif'); A = adapthisteq(I,'clipLimit',0.02,'Distribution','rayleigh'); figure, imshow(I); figure, imshow(A); • Apply CLAHE to a color image. [X MAP] = imread('shadow.tif'); % Convert indexed image to true-color (RGB) format RGB = ind2rgb(X,MAP); % Convert image to L*a*b* color space cform2lab = makecform('srgb2lab'); %Create color transformation structure LAB = applycform(RGB, cform2lab); % Scale values to range from 0 to 1 L = LAB(:,:,1)/100; % Perform CLAHE LAB(:,:,1) = adapthisteq(L,'NumTiles',... [8 8],'ClipLimit',0.005)*100; % Convert back to RGB color space cform2srgb = makecform('lab2srgb'); J = applycform(LAB, cform2srgb); % Display the results figure, imshow(RGB); figure, imshow(J);
  • 8. histeq • Enhance contrast using histogram equalization Syntax J = histeq(I, hgram) J = histeq(I, n) [J, T] = histeq(I,...) newmap = histeq(X, map, hgram) newmap = histeq(X, map) [newmap, T] = histeq(X,...) Description • histeq enhances the contrast of images by transforming the values in an intensity image, or the values in the colormap of an indexed image, so that the histogram of the output image approximately matches a specified histogram.
  • 9. Examples • Enhance the contrast of an intensity image using histogram equalization. I = imread('tire.tif'); J = histeq(I); imshow(I) figure, imshow(J) • Display a histogram of the original image. figure; imhist(I,64) • Compare it to a histogram of the processed image. figure; imhist(J,64)
  • 10. imadjust • Adjust image intensity values or colormap Syntax J = imadjust(I) J = imadjust(I,[low_in; high_in],[low_out; high_out]) J = imadjust(I,[low_in; high_in],[low_out; high_out],gamma) newmap = imadjust(map,[low_in; high_in],[low_out; high_out],gamma) RGB2 = imadjust(RGB1,...)
  • 11. Examples • Adjust a low-contrast grayscale image. I = imread('pout.tif'); J = imadjust(I); imshow(I), figure, imshow(J) • Adjust the grayscale image, specifying the contrast limits. K = imadjust(I,[0.3 0.7],[]); figure, imshow(K) • Adjust an RGB image. RGB1 = imread('football.jpg'); RGB2 = imadjust(RGB1,[.2 .3 0; .6 .7 1],[]); imshow(RGB1), figure, imshow(RGB2)
  • 12. imnoise • Add noise to image Syntax J = imnoise(I,type) J = imnoise(I,type,parameters) J = imnoise(I,'gaussian',m,v) J = imnoise(I,'localvar',V) J = imnoise(I,'localvar',image_intensity,var) J = imnoise(I,'poisson') J = imnoise(I,'salt & pepper',d) J = imnoise(I,'speckle',v)
  • 13. Examples I = imread('eight.tif'); J = imnoise(I,'salt & pepper',0.02); figure, imshow(I) figure, imshow(J)
  • 14. medfilt2 • 2-D median filtering Syntax B = medfilt2(A, [m n]) B = medfilt2(A) B = medfilt2(A, 'indexed', ...) B = medfilt2(..., padopt) Description Median filtering is a nonlinear operation often used in image processing to reduce "salt and pepper" noise. A median filter is more effective than convolution when the goal is to simultaneously reduce noise and preserve edges.
  • 15. Examples • Add salt and pepper noise to an image and then restore the image using medfilt2. I = imread('eight.tif'); J = imnoise(I,'salt & pepper',0.02); K = medfilt2(J); imshow(J), figure, imshow(K)

Editor's Notes

  • #4: Image arithmetic is the implementation of standard arithmetic operations, such as addition, subtraction, multiplication, and division, on images. Image arithmetic has many uses in image processing both as a preliminary step in more complex operations and by itself. For example, image subtraction can be used to detect differences between two or more images of the same scene or object.