SlideShare a Scribd company logo
1 of 41
Image Enhancement
  & Edge Detection

          Tati R Mengko
Introduction
 Image Enhancement :
   accentuation and sharpening of image features
   (edges, boundaries, contrast) to improve image
   visual appearance and analysis.
   does not increase information content, but
   improves feature dynamic range to ease feature
   detection.
 Major challenge in image enhancement:
   quantification of the enhanced feature criterion.
Image Enhancement Techniques
                          Image Enhancement




  Point              Spatial           Transform            Pseudo
  Operation          operation         Operation            Coloring



•Contrast         •Noise              •Linear Filtering
                                                          •False Coloring
Stretching        Smoothing           •Root Filtering
                                                          •Psudocoloring
•Noise Clipping   •Median Filtering   •Homomorphic
•Window Slicing   •Unsharp            Filtering
•Histogram        Masking
Modeling          •Low-, High-,
                  Band-pass
                  Filtering
                  •Zooming
Point Operation
 Point Operation
   zero-memory operation
   Map graylevel u∈[0,L] to graylevel v∈[0,L], through
   transform relation v=f(u).
   Contrast stretching, clipping, thresholding

                                   α u,                0≤u<a
  vb   v           γ               
                               v =  β ( u − a ) + va , a ≤ u < b
           β
                                   
  va                               γ ( u − b ) + vb , b ≤ u < L
       α
                           u   α and β determination is based on
           a   b       L       image histogram.
Point Operation
 Contrast stretching
   Bad contrast: unadequate illumination, sensor non-linearity.
   In the contrast-stretched area, transforming gradient >1.
 Special contrast-stretching cases:
   Clipping: α=γ=0.
   Thresholding : α=γ=0 , a=b.

                                      v                v
    vb   v                γ
                β

   va                                            u                   u
         α
                                  u
                a     b       L
         stretching                   clipping         tresholding
Thresholding Example: Binarization




  Red Blood Cells Grayscale Image   Red Blood Cells Binary Image
Thresholding Example: Gamma Correction




        Original Image   Gamma-corrected Image
Digital Negative
 Reversed graylevel scaling:

                                                  50
     50



                                                  100
    100

                                        v = L-u
                                                  150
    150



                                                  200
    200



                                                  250
    250                                                 50   100   150   200   250
          50    100   150   200   250




               %MATLAB
               I=imread('cameraman.tif');
               figure(1);imagesc(I);colormap(gray);
               figure(2);imagesc(255-double(I));
               colormap(gray);
Intensity Level Slicing
 Segment a certain intensity level from the rest of the
 image.
 Without background:          L, a ≤ u ≤ b
                          v=
                            0, lainnya
 With background:            L, a ≤ u ≤ b
                          v=
                            u , lainnya
      v                             v

  L



                      u                                   u

          a    b                        a     b     L
Intensity Level Slicing




Original image



                 Without background


                                      With background
Range Compression and Digital Substraction
  Compress image intensity range:
     v = c log10(1+|u|)  , c = scaling constant
  Digital Substraction:
    Detect difference/gradual intensity change between
    images.
    Example: Digital Substraction Angiography (DSA).
Example of Range Compression
Histogram Modeling
 Image histogram represents distribution of graylevel occurrence in
 an image.
 Histogram modeling:
     modification of an image histogram into a desired shape.
 Histogram Equalization:
    uniformly-distribute graylevel occurrence frequency distribution.

  I = imread('tire.tif');imshow(I); imhist(I,64)
  J = histeq(I);figure, imshow(J); figure; imhist(J,64)

                                                                 2000
                 3000
                                                                 1800
                 2500                                            1600

                                                                 1400
                 2000
                                                                 1200
                 1500
                                                                 1000

                 1000                                             800

                                                                  600
                 500
                                                                  400

                   0                                              200

                                                                   0
                        0   50   100   150   200   250

                                                                        0   50   100   150   200   250




     Before hist.equalization                            After hist.equalization
Histogram Examples
Histogram Equalization
 Histogram equalization is not appropriate for narrow
 intensity distribution images.

                   Original                        Histeq
                   Image                           Result
Spatial Operation
 Spatial Averaging
  Pixel intensity is replaced with weighted average of its
  neighborhood pixels intensity.
           v ( m, n ) =     ∑ ∑ a (k,l ) y (m − k, n − l )
                          ( k ,l )∈W
 Spatial averaging: a(k,l) = constant
                        1
          v ( m, n ) =       ∑W ∑ y ( m − k , n − l )
                       NW ( k ,l )∈
  a(k,l)=1/NW, NW = number of pixels within filtering window
Spatial Operation
 Alternative method: every pixel is replaced by its 4-
 closest neioghbors average intensity value :

 v(m,n) = 0.5 [y(m,n) + 0.25{ y(m-1,n)
             + y(m+1,n) + y(m,n-1) + y(m,n+1)} ]

 Averaging ‘ mask’:

  ¼      ¼       1/9      1/9      1/9      0      1/8       0

  ¼      ¼       1/9      1/9      1/9     1/8      ¼      1/8
                 1/9      1/9      1/9      0      1/8       0

 2×2 window           3×3 window         5-points weighted averaging
Spatial Operation
  Spatial averaging:
    Smoothing
    Low-pass filtering
    Subsampling
  Noisy image:

               y(m,n) = u(m,n) + η(m,n)

  η(m,n) = white noise with variance= ση2
  Output image:
                     1
       v ( m, n ) =
                    NW
                           ∑ ∑ u ( m − k , n − l ) + η ( m, n )
                         ( k ,l )∈W
   η(m,n) = spatial average

• If mean(η(m,n)) = 0, noise power suppression level is proportional
  to the number of pixels in the filtering window: ση2 = ση2/NW.
Example of Spatial Operation




      Original Image   Original Image + Noise
Example of Spatial Operation
Blurring Effect due to Averaging
Blurring Effect due to Averaging
Effects of Various Noise Energy
Effects of Various Noise Energy
Median Filter
 The last examples shows the weakness of averaging method
 Median filter overcome this problem
Median Filter
Image Sharpening
 Enhance missing delicate structures due to blurring
 effect.
 Sharpen graylevel difference between neighbouring
 pixels in an image.
 High-pass filtering
    Shift-invariant operator
    Convolution mask contains positive number
    surrounded by negative numbers.

                    −1 −1 −1
                  1         
                     −1 8 −1
                  9
                    −1 −1 −1
                            
High Pass Filtering
 Relation between high-pass filtered image g, original
 image f, and its low-pass filtered version:

               g(m, n) = f(m, n) – lowpass(f(m, n))
High-boost Filtering (Unsharp Masking)
 Substraction of amplified original image and low-pass fitered
 original image:
      g(m, n) = Af(m, n) – lowpass(f(m, n))
              = (A-1)f(m, n) + [f(m, n)– lowpass(f(m, n))]
              = (A-1)f(m, n) + higpass(f(m, n))
 Produce an edge-enhanced version of original image.




    Original Image        High pass           High boost
Derivative Filter
 Sharpen image boundaries/edges, based on discrete
 spatial gradient operator:




 Implemented with 2-D convolution approach:



 hn = edge detector derivative filter convolution mask
Derivative Filter: Roberts Operator




  Original Image
Derivative Filter: Prewitt & Sobel Operator




                                     Sobel
          Prewitt
Frequency-domain Method
 Enhancement conducted in the transform domain, followed by
 an inverse transform to obtain the spatial domain enhanced
 image representation.
 For original image U = {u(m,n)} being transformed into V =
 {v(k,l)} : V = AUAT.
 Enhancement operation produces v’(k,l) = f(u(m,n)).
 Spatial domain enhanced image: U = A-1V’(AT)-1 .
 Generalized Filtering:
    zero-memory transformation
    Pixel-to-pixel multiplication: v’(k, l) = g(k, l) v(k, l).
    g(k, l) = zonal mask.
u(m,n)   Transformasi   v(k,l) Operasi      v’(k,l) Transformasi    u’(m,n)
                                                      Inverse
         Uniter AUAT           Titik f(.)
                                                     A-1 V’(AT)-1
Frequency-domain Method
 Frequency-domain processing is utilized to accelerate
 spatial image filtering.
 Time domain convolution is equivalent to fourier domain
 (FFT) pixel-to-pixel multiplication:

       g(m,n) = h(m,n)*f(m,n) ≈ G(u,v) = H(u,v) F(u,v)
Ideal Low-pass Filter
  Ideal low-pass filter:
              1, jika u 2 + v 2 ≤ r
                                                      r0=57
                                    0
 H ( u, v ) = 
              0, jika u 2 + v 2 > r0
              




   Original Image   LPF, r0 = 57        LPF, r0 = 36   LPF, r0 = 26
• Ringing effect: property of ideal filter.
Butterworth Low Pass Filter
 Butterworth low-pass filter:




   n: order filter, r0: cutoff freq.




  Original Image           r0 = 18     r0 = 13   r0 = 10
•Removes ringing effects.
Butterworth Low-pass Filter
 False contouring removal and noise suppression.

                     False                    False contour
                     contour due              removal with
                     to                       LPF
                     unadequate               Butterworth
                     quantization




    Original Image         Noisy Image   Filtered Image
Ideal High-pass Filter
  Ideal high-pass filter
             0, jika u 2 + v 2 ≤ r
                                                          r0 = 36
                                    0
H ( u, v ) = 
             1, jika u 2 + v 2 > r0
             




  Original Image   HPF, r0 = 18         HPF, r0 = 36   HPF, r0 = 26
•Ringing effect: property of ideal filter
Butterworth High-pass Filter
 Butterworth high-pass filter

                                                  r0=47, n=2



 n: filter order, r0: cutoff freq.




  Citra asli                r0 = 47   r0 = 36   r0 = 81
•Removes ringing effects.
Iterative based
Edge Enhancement
          T.L.R. Mengko
Pyramid Edge Detection
 There may be a number of strong edges in the image that are not significant,
 because they are short or unconnected.
 Pyramid edge detection is used to enhance substantial (strong & long) edges,
 but to ignore the weak or short edges.




                                    repetitive
                                    shrinkage                    EDGE TRACKING


                                      1.   Cut down to quarter size by averaging 4
                                           corresponding pixels
                                      2.   Repeat x times, keep each generated image
                                      3.   At the smallest image, perform edge detection
                                           (e.g Sobel)
                                      4.   Find edges ? (a threshold is needed)
                                      5.   If yes, perform edge detection on the group of 4
                                           corresponding pixel in the next larger image.
                        averaging     6.   Continue to the next larger image till the largest
                                           image.

More Related Content

What's hot

Image enhancement
Image enhancementImage enhancement
Image enhancement
Ayaelshiwi
 
Frequency Domain Image Enhancement Techniques
Frequency Domain Image Enhancement TechniquesFrequency Domain Image Enhancement Techniques
Frequency Domain Image Enhancement Techniques
Diwaker Pant
 

What's hot (20)

Image Restoration (Digital Image Processing)
Image Restoration (Digital Image Processing)Image Restoration (Digital Image Processing)
Image Restoration (Digital Image Processing)
 
Spatial Filters (Digital Image Processing)
Spatial Filters (Digital Image Processing)Spatial Filters (Digital Image Processing)
Spatial Filters (Digital Image Processing)
 
Image Enhancement using Frequency Domain Filters
Image Enhancement using Frequency Domain FiltersImage Enhancement using Frequency Domain Filters
Image Enhancement using Frequency Domain Filters
 
Image segmentation
Image segmentation Image segmentation
Image segmentation
 
Unit3 dip
Unit3 dipUnit3 dip
Unit3 dip
 
Image Filtering in the Frequency Domain
Image Filtering in the Frequency DomainImage Filtering in the Frequency Domain
Image Filtering in the Frequency Domain
 
Digital Image Processing: An Introduction
Digital Image Processing: An IntroductionDigital Image Processing: An Introduction
Digital Image Processing: An Introduction
 
Image enhancement ppt nal2
Image enhancement ppt nal2Image enhancement ppt nal2
Image enhancement ppt nal2
 
Digital Image Fundamentals
Digital Image FundamentalsDigital Image Fundamentals
Digital Image Fundamentals
 
Image processing, Noise, Noise Removal filters
Image processing, Noise, Noise Removal filtersImage processing, Noise, Noise Removal filters
Image processing, Noise, Noise Removal filters
 
Edge detection
Edge detectionEdge detection
Edge detection
 
Image degradation and noise by Md.Naseem Ashraf
Image degradation and noise by Md.Naseem AshrafImage degradation and noise by Md.Naseem Ashraf
Image degradation and noise by Md.Naseem Ashraf
 
Image enhancement
Image enhancementImage enhancement
Image enhancement
 
Image enhancement techniques
Image enhancement techniques Image enhancement techniques
Image enhancement techniques
 
Frequency Domain Image Enhancement Techniques
Frequency Domain Image Enhancement TechniquesFrequency Domain Image Enhancement Techniques
Frequency Domain Image Enhancement Techniques
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial Domain
 
Morphological operations
Morphological operationsMorphological operations
Morphological operations
 
Image Restoration
Image RestorationImage Restoration
Image Restoration
 
Image Enhancement
Image Enhancement Image Enhancement
Image Enhancement
 
Digital Image restoration
Digital Image restorationDigital Image restoration
Digital Image restoration
 

Viewers also liked

Exploring Methods to Improve Edge Detection with Canny Algorithm
Exploring Methods to Improve Edge Detection with Canny AlgorithmExploring Methods to Improve Edge Detection with Canny Algorithm
Exploring Methods to Improve Edge Detection with Canny Algorithm
Prasad Thakur
 

Viewers also liked (20)

Image enhancement sharpening
Image enhancement  sharpeningImage enhancement  sharpening
Image enhancement sharpening
 
03 image transform
03 image transform03 image transform
03 image transform
 
Introduction to digital image processing
Introduction to digital image processingIntroduction to digital image processing
Introduction to digital image processing
 
Image processing
Image processingImage processing
Image processing
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
 
FIR filter designing using Matlab
FIR filter designing using MatlabFIR filter designing using Matlab
FIR filter designing using Matlab
 
Pantone Paper
Pantone  PaperPantone  Paper
Pantone Paper
 
Exploring Methods to Improve Edge Detection with Canny Algorithm
Exploring Methods to Improve Edge Detection with Canny AlgorithmExploring Methods to Improve Edge Detection with Canny Algorithm
Exploring Methods to Improve Edge Detection with Canny Algorithm
 
Fuzzy Logic Based Edge Detection
Fuzzy Logic Based Edge DetectionFuzzy Logic Based Edge Detection
Fuzzy Logic Based Edge Detection
 
Lecture 8
Lecture 8Lecture 8
Lecture 8
 
Image mosaicing
Image mosaicingImage mosaicing
Image mosaicing
 
Mp3 player working by digital signal processing
Mp3 player working by digital signal processingMp3 player working by digital signal processing
Mp3 player working by digital signal processing
 
06 object measurement
06 object measurement06 object measurement
06 object measurement
 
Mikrokontroler pertemuan 4
Mikrokontroler pertemuan 4Mikrokontroler pertemuan 4
Mikrokontroler pertemuan 4
 
Mikrokontroler pertemuan 7
Mikrokontroler pertemuan 7Mikrokontroler pertemuan 7
Mikrokontroler pertemuan 7
 
Mikrokontroler pertemuan 8
Mikrokontroler pertemuan 8Mikrokontroler pertemuan 8
Mikrokontroler pertemuan 8
 
Mikrokontroler pertemuan 2
Mikrokontroler pertemuan 2Mikrokontroler pertemuan 2
Mikrokontroler pertemuan 2
 
Implementation and comparison of Low pass filters in Frequency domain
Implementation and comparison of Low pass filters in Frequency domainImplementation and comparison of Low pass filters in Frequency domain
Implementation and comparison of Low pass filters in Frequency domain
 
Digital image processing using matlab: filters (detail)
Digital image processing using matlab: filters (detail)Digital image processing using matlab: filters (detail)
Digital image processing using matlab: filters (detail)
 
Mikrokontroler pertemuan 3
Mikrokontroler pertemuan 3Mikrokontroler pertemuan 3
Mikrokontroler pertemuan 3
 

Similar to 04 image enhancement edge detection

IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
ijceronline
 
Image Processing using Matlab . Useful for beginners to learn Image Processing
Image Processing using Matlab . Useful for beginners to learn Image ProcessingImage Processing using Matlab . Useful for beginners to learn Image Processing
Image Processing using Matlab . Useful for beginners to learn Image Processing
Ashok Kumar
 
Image enhancement techniques
Image enhancement techniquesImage enhancement techniques
Image enhancement techniques
Saideep
 

Similar to 04 image enhancement edge detection (20)

Image enhancement
Image enhancementImage enhancement
Image enhancement
 
Lec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdfLec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdf
 
2. filtering basics
2. filtering basics2. filtering basics
2. filtering basics
 
Dip3
Dip3Dip3
Dip3
 
Chapter 1 introduction (Image Processing)
Chapter 1 introduction (Image Processing)Chapter 1 introduction (Image Processing)
Chapter 1 introduction (Image Processing)
 
Lecture 5
Lecture 5Lecture 5
Lecture 5
 
Image Restoration (Digital Image Processing)
Image Restoration (Digital Image Processing)Image Restoration (Digital Image Processing)
Image Restoration (Digital Image Processing)
 
3 intensity transformations and spatial filtering slides
3 intensity transformations and spatial filtering slides3 intensity transformations and spatial filtering slides
3 intensity transformations and spatial filtering slides
 
Image enhancement
Image enhancementImage enhancement
Image enhancement
 
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
 
image_enhancement_spatial
 image_enhancement_spatial image_enhancement_spatial
image_enhancement_spatial
 
Image Processing using Matlab . Useful for beginners to learn Image Processing
Image Processing using Matlab . Useful for beginners to learn Image ProcessingImage Processing using Matlab . Useful for beginners to learn Image Processing
Image Processing using Matlab . Useful for beginners to learn Image Processing
 
Digital Image Processing Fundamental
Digital Image Processing FundamentalDigital Image Processing Fundamental
Digital Image Processing Fundamental
 
Digital image processing - Image Enhancement (MATERIAL)
Digital image processing  - Image Enhancement (MATERIAL)Digital image processing  - Image Enhancement (MATERIAL)
Digital image processing - Image Enhancement (MATERIAL)
 
Digital Image Processing - Image Enhancement
Digital Image Processing  - Image EnhancementDigital Image Processing  - Image Enhancement
Digital Image Processing - Image Enhancement
 
Image enhancement techniques
Image enhancement techniquesImage enhancement techniques
Image enhancement techniques
 
LAPLACE TRANSFORM SUITABILITY FOR IMAGE PROCESSING
LAPLACE TRANSFORM SUITABILITY FOR IMAGE PROCESSINGLAPLACE TRANSFORM SUITABILITY FOR IMAGE PROCESSING
LAPLACE TRANSFORM SUITABILITY FOR IMAGE PROCESSING
 
Lecture-11.pdf
Lecture-11.pdfLecture-11.pdf
Lecture-11.pdf
 
Notes on image processing
Notes on image processingNotes on image processing
Notes on image processing
 
imageenhancementtechniques-140316011049-phpapp01 (1).pptx
imageenhancementtechniques-140316011049-phpapp01 (1).pptximageenhancementtechniques-140316011049-phpapp01 (1).pptx
imageenhancementtechniques-140316011049-phpapp01 (1).pptx
 

More from Rumah Belajar

Image segmentation 2
Image segmentation 2 Image segmentation 2
Image segmentation 2
Rumah Belajar
 
Image segmentation 3 morphology
Image segmentation 3 morphologyImage segmentation 3 morphology
Image segmentation 3 morphology
Rumah Belajar
 
Bab 09 kekuatan sambungan las
Bab 09 kekuatan sambungan lasBab 09 kekuatan sambungan las
Bab 09 kekuatan sambungan las
Rumah Belajar
 

More from Rumah Belajar (20)

Image segmentation 2
Image segmentation 2 Image segmentation 2
Image segmentation 2
 
Image segmentation 3 morphology
Image segmentation 3 morphologyImage segmentation 3 morphology
Image segmentation 3 morphology
 
point processing
point processingpoint processing
point processing
 
02 2d systems matrix
02 2d systems matrix02 2d systems matrix
02 2d systems matrix
 
01 introduction image processing analysis
01 introduction image processing analysis01 introduction image processing analysis
01 introduction image processing analysis
 
Bab 11 bantalan dan sistem pelumasan
Bab 11 bantalan dan sistem pelumasanBab 11 bantalan dan sistem pelumasan
Bab 11 bantalan dan sistem pelumasan
 
Bab 10 spring arif hary
Bab 10 spring  arif hary Bab 10 spring  arif hary
Bab 10 spring arif hary
 
Bab 06 kriteria kegagalan lelah
Bab 06 kriteria kegagalan lelahBab 06 kriteria kegagalan lelah
Bab 06 kriteria kegagalan lelah
 
Bab 09 kekuatan sambungan las
Bab 09 kekuatan sambungan lasBab 09 kekuatan sambungan las
Bab 09 kekuatan sambungan las
 
Bab 08 screws, fasteners and connection syarif
Bab 08 screws, fasteners and connection  syarif Bab 08 screws, fasteners and connection  syarif
Bab 08 screws, fasteners and connection syarif
 
Bab 07 poros dan aksesoriny
Bab 07 poros dan aksesorinyBab 07 poros dan aksesoriny
Bab 07 poros dan aksesoriny
 
Bab 05 kriteria kegagalan 1
Bab 05 kriteria kegagalan 1Bab 05 kriteria kegagalan 1
Bab 05 kriteria kegagalan 1
 
Bab 04 tegangan regangan defleksi
Bab 04 tegangan regangan defleksiBab 04 tegangan regangan defleksi
Bab 04 tegangan regangan defleksi
 
Bab 03 load analysis
Bab 03 load analysisBab 03 load analysis
Bab 03 load analysis
 
Bab 02 material dan proses
Bab 02 material dan prosesBab 02 material dan proses
Bab 02 material dan proses
 
Bab 11 bantalan dan sistem pelumasan
Bab 11 bantalan dan sistem pelumasanBab 11 bantalan dan sistem pelumasan
Bab 11 bantalan dan sistem pelumasan
 
Mikrokontroler pertemuan 5
Mikrokontroler pertemuan 5Mikrokontroler pertemuan 5
Mikrokontroler pertemuan 5
 
Mikrokontroler pertemuan 1
Mikrokontroler pertemuan 1Mikrokontroler pertemuan 1
Mikrokontroler pertemuan 1
 
Mikrokontroler pertemuan 6
Mikrokontroler pertemuan 6Mikrokontroler pertemuan 6
Mikrokontroler pertemuan 6
 
15. ide pata dan sata
15. ide pata dan sata15. ide pata dan sata
15. ide pata dan sata
 

Recently uploaded

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Recently uploaded (20)

Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 

04 image enhancement edge detection

  • 1. Image Enhancement & Edge Detection Tati R Mengko
  • 2. Introduction Image Enhancement : accentuation and sharpening of image features (edges, boundaries, contrast) to improve image visual appearance and analysis. does not increase information content, but improves feature dynamic range to ease feature detection. Major challenge in image enhancement: quantification of the enhanced feature criterion.
  • 3. Image Enhancement Techniques Image Enhancement Point Spatial Transform Pseudo Operation operation Operation Coloring •Contrast •Noise •Linear Filtering •False Coloring Stretching Smoothing •Root Filtering •Psudocoloring •Noise Clipping •Median Filtering •Homomorphic •Window Slicing •Unsharp Filtering •Histogram Masking Modeling •Low-, High-, Band-pass Filtering •Zooming
  • 4. Point Operation Point Operation zero-memory operation Map graylevel u∈[0,L] to graylevel v∈[0,L], through transform relation v=f(u). Contrast stretching, clipping, thresholding α u, 0≤u<a vb v γ  v =  β ( u − a ) + va , a ≤ u < b β  va γ ( u − b ) + vb , b ≤ u < L α u α and β determination is based on a b L image histogram.
  • 5. Point Operation Contrast stretching Bad contrast: unadequate illumination, sensor non-linearity. In the contrast-stretched area, transforming gradient >1. Special contrast-stretching cases: Clipping: α=γ=0. Thresholding : α=γ=0 , a=b. v v vb v γ β va u u α u a b L stretching clipping tresholding
  • 6. Thresholding Example: Binarization Red Blood Cells Grayscale Image Red Blood Cells Binary Image
  • 7. Thresholding Example: Gamma Correction Original Image Gamma-corrected Image
  • 8. Digital Negative Reversed graylevel scaling: 50 50 100 100 v = L-u 150 150 200 200 250 250 50 100 150 200 250 50 100 150 200 250 %MATLAB I=imread('cameraman.tif'); figure(1);imagesc(I);colormap(gray); figure(2);imagesc(255-double(I)); colormap(gray);
  • 9. Intensity Level Slicing Segment a certain intensity level from the rest of the image. Without background:  L, a ≤ u ≤ b v= 0, lainnya With background:  L, a ≤ u ≤ b v= u , lainnya v v L u u a b a b L
  • 10. Intensity Level Slicing Original image Without background With background
  • 11. Range Compression and Digital Substraction Compress image intensity range: v = c log10(1+|u|) , c = scaling constant Digital Substraction: Detect difference/gradual intensity change between images. Example: Digital Substraction Angiography (DSA).
  • 12. Example of Range Compression
  • 13. Histogram Modeling Image histogram represents distribution of graylevel occurrence in an image. Histogram modeling: modification of an image histogram into a desired shape. Histogram Equalization: uniformly-distribute graylevel occurrence frequency distribution. I = imread('tire.tif');imshow(I); imhist(I,64) J = histeq(I);figure, imshow(J); figure; imhist(J,64) 2000 3000 1800 2500 1600 1400 2000 1200 1500 1000 1000 800 600 500 400 0 200 0 0 50 100 150 200 250 0 50 100 150 200 250 Before hist.equalization After hist.equalization
  • 15. Histogram Equalization Histogram equalization is not appropriate for narrow intensity distribution images. Original Histeq Image Result
  • 16. Spatial Operation Spatial Averaging Pixel intensity is replaced with weighted average of its neighborhood pixels intensity. v ( m, n ) = ∑ ∑ a (k,l ) y (m − k, n − l ) ( k ,l )∈W Spatial averaging: a(k,l) = constant 1 v ( m, n ) = ∑W ∑ y ( m − k , n − l ) NW ( k ,l )∈ a(k,l)=1/NW, NW = number of pixels within filtering window
  • 17. Spatial Operation Alternative method: every pixel is replaced by its 4- closest neioghbors average intensity value : v(m,n) = 0.5 [y(m,n) + 0.25{ y(m-1,n) + y(m+1,n) + y(m,n-1) + y(m,n+1)} ] Averaging ‘ mask’: ¼ ¼ 1/9 1/9 1/9 0 1/8 0 ¼ ¼ 1/9 1/9 1/9 1/8 ¼ 1/8 1/9 1/9 1/9 0 1/8 0 2×2 window 3×3 window 5-points weighted averaging
  • 18. Spatial Operation Spatial averaging: Smoothing Low-pass filtering Subsampling Noisy image: y(m,n) = u(m,n) + η(m,n) η(m,n) = white noise with variance= ση2 Output image: 1 v ( m, n ) = NW ∑ ∑ u ( m − k , n − l ) + η ( m, n ) ( k ,l )∈W η(m,n) = spatial average • If mean(η(m,n)) = 0, noise power suppression level is proportional to the number of pixels in the filtering window: ση2 = ση2/NW.
  • 19. Example of Spatial Operation Original Image Original Image + Noise
  • 20. Example of Spatial Operation
  • 21. Blurring Effect due to Averaging
  • 22. Blurring Effect due to Averaging
  • 23. Effects of Various Noise Energy
  • 24. Effects of Various Noise Energy
  • 25. Median Filter The last examples shows the weakness of averaging method Median filter overcome this problem
  • 27. Image Sharpening Enhance missing delicate structures due to blurring effect. Sharpen graylevel difference between neighbouring pixels in an image. High-pass filtering Shift-invariant operator Convolution mask contains positive number surrounded by negative numbers.  −1 −1 −1 1  −1 8 −1 9  −1 −1 −1  
  • 28. High Pass Filtering Relation between high-pass filtered image g, original image f, and its low-pass filtered version: g(m, n) = f(m, n) – lowpass(f(m, n))
  • 29. High-boost Filtering (Unsharp Masking) Substraction of amplified original image and low-pass fitered original image: g(m, n) = Af(m, n) – lowpass(f(m, n)) = (A-1)f(m, n) + [f(m, n)– lowpass(f(m, n))] = (A-1)f(m, n) + higpass(f(m, n)) Produce an edge-enhanced version of original image. Original Image High pass High boost
  • 30. Derivative Filter Sharpen image boundaries/edges, based on discrete spatial gradient operator: Implemented with 2-D convolution approach: hn = edge detector derivative filter convolution mask
  • 31. Derivative Filter: Roberts Operator Original Image
  • 32. Derivative Filter: Prewitt & Sobel Operator Sobel Prewitt
  • 33. Frequency-domain Method Enhancement conducted in the transform domain, followed by an inverse transform to obtain the spatial domain enhanced image representation. For original image U = {u(m,n)} being transformed into V = {v(k,l)} : V = AUAT. Enhancement operation produces v’(k,l) = f(u(m,n)). Spatial domain enhanced image: U = A-1V’(AT)-1 . Generalized Filtering: zero-memory transformation Pixel-to-pixel multiplication: v’(k, l) = g(k, l) v(k, l). g(k, l) = zonal mask. u(m,n) Transformasi v(k,l) Operasi v’(k,l) Transformasi u’(m,n) Inverse Uniter AUAT Titik f(.) A-1 V’(AT)-1
  • 34. Frequency-domain Method Frequency-domain processing is utilized to accelerate spatial image filtering. Time domain convolution is equivalent to fourier domain (FFT) pixel-to-pixel multiplication: g(m,n) = h(m,n)*f(m,n) ≈ G(u,v) = H(u,v) F(u,v)
  • 35. Ideal Low-pass Filter Ideal low-pass filter: 1, jika u 2 + v 2 ≤ r  r0=57 0 H ( u, v ) =  0, jika u 2 + v 2 > r0  Original Image LPF, r0 = 57 LPF, r0 = 36 LPF, r0 = 26 • Ringing effect: property of ideal filter.
  • 36. Butterworth Low Pass Filter Butterworth low-pass filter: n: order filter, r0: cutoff freq. Original Image r0 = 18 r0 = 13 r0 = 10 •Removes ringing effects.
  • 37. Butterworth Low-pass Filter False contouring removal and noise suppression. False False contour contour due removal with to LPF unadequate Butterworth quantization Original Image Noisy Image Filtered Image
  • 38. Ideal High-pass Filter Ideal high-pass filter 0, jika u 2 + v 2 ≤ r  r0 = 36 0 H ( u, v ) =  1, jika u 2 + v 2 > r0  Original Image HPF, r0 = 18 HPF, r0 = 36 HPF, r0 = 26 •Ringing effect: property of ideal filter
  • 39. Butterworth High-pass Filter Butterworth high-pass filter r0=47, n=2 n: filter order, r0: cutoff freq. Citra asli r0 = 47 r0 = 36 r0 = 81 •Removes ringing effects.
  • 41. Pyramid Edge Detection There may be a number of strong edges in the image that are not significant, because they are short or unconnected. Pyramid edge detection is used to enhance substantial (strong & long) edges, but to ignore the weak or short edges. repetitive shrinkage EDGE TRACKING 1. Cut down to quarter size by averaging 4 corresponding pixels 2. Repeat x times, keep each generated image 3. At the smallest image, perform edge detection (e.g Sobel) 4. Find edges ? (a threshold is needed) 5. If yes, perform edge detection on the group of 4 corresponding pixel in the next larger image. averaging 6. Continue to the next larger image till the largest image.