Image Processing - PowerPoint PPT Presentation

1 / 34
About This Presentation
Title:

Image Processing

Description:

Canny Edge Detector. Edge localisation. Wide edges: ... Canny. 34. Exercises. Use ImageJ to generate a magnitude image using the Sobel kernels ... – PowerPoint PPT presentation

Number of Views:161
Avg rating:3.0/5.0
Slides: 35
Provided by: thomasm46
Category:

less

Transcript and Presenter's Notes

Title: Image Processing


1
Image Processing 8Edge Detection Video
segmentation
2
Edge detection
3
Edge detection
  • What are edges?
  • Why are they interesting?
  • How do we find them?
  • Prewitt
  • Sobel
  • Laplacian
  • Canny

4
What are edges?
  • Local intensity change
  • Strong edge the steep areas in a 3D plot
  • (show blobs-for-edge, surface plot)

Edge detection
5
What are edges?
6
Why are they interesting?
  • Edges can (many times) represent the
  • information in the image (the objects)
  • A higher level of abstraction (less data to
    process!)
  • Edges are features
  • Independent from illumination. As opposed to
    e.g., color information
  • Object recognition and detection (many times) use
    edge features
  • This is true for computer vision as well as for
    biological vision systems!
  • Excellent for measurements

7
Edges detectors
  • Different detectors, but all have three steps
  • Noise reduction
  • Edge enhancement
  • Edge localisation

8
Edges detectors
  • Three steps
  • Noise reduction
  • E.g., median filter
  • E.g., mean filter
  • Dilemma
  • Large filter gt remove noise ?
  • Large filter gt remove edges ?
  • Small filter gt keep edges ?
  • Small filter gt keep noise ?
  • Edge enhancement
  • Edge localisation

9
Edges detectors
  • Three steps
  • Noise reduction
  • Edge enhancement
  • Calculate candidates for the edges
  • Edge localisation
  • Decide which edge candidates to keep

10
Edges detectors
  • Well look at four methods (but others exist!)
  • With respect to complexity (simplest first)
  • Prewitt
  • Sobel
  • Laplacian
  • Canny

11
Edge Detectors Prewitt and Sobel
12
Edge Detectors Prewitt and Sobel
  • Simple to implement. Fast
  • Based on the grey-level gradient
  • A measure of the steepness of the
    image-landscape
  • Calculated for each pixel gt Gradient image
    g(x,y)
  • Use a 16-bit or 32-bit image to represent the
    gradients!
  • The gradient is the first-order derivative
  • Approximated in the x- and y-direction by

x
x1
x-1
y-1
y
y1
13
Convolution (Foldning) with this kernel
-1
1
Normally this kernel to avoid bias
14
Edge Detectors Prewitt and Sobel
gx , gy
  • Gradient vector
  • Magnitude (hvor kraftig er kanten længden af
    blå pil)

15
Edge Detectors Prewitt and Sobel
  • Noise reduction
  • Mean of three gradients
  • Edge enhancement
  • Implementation of
  • Convolution with Prewitt kernels or Sobel
    kernels
  • Edge localisation
  • If the magnitude g(x,y) gt TH gt edge found
    e(x,y)255
  • Else no edge e(x,y)0
  • (Show blobs-for-edge, 32-bit, convolution, abs,
    TH)

Sobel kernels
Prewitt kernels
16
Prewitt and Sobel
  • Conclusion
  • Pros
  • Simple to understand
  • Simple to implement
  • Fast
  • Cons
  • Produce wide edges
  • Used a lot! (most common Sobel)

17
Edge Detector Laplacian
18
Edge Detector Laplacian
  • Where exactly is the edge (width)?
  • Second-order derivative
  • The variation of the variation of the gray-level
    value!
  • How fast does the gradient change?
  • Find the zero-crossing
  • Center of edge

Prewitt and Sobel
0
Zero-crossing
19
(No Transcript)
20
Edge Detector Laplacian
  • The second-order derivative is very sensitive to
    noise!

21
Laplacian of Gaussian
  • Solution
  • Combined with a 2D Gaussian smoothing filter
  • (show blobs-to-edge, 32-bit, gauss, convolution,
    plot profile)

22
Examples
  • Gauss filter width
  • 5x5 pixels
  • 9x9 pixels
  • 12x12 pixels

Input
Gauss conv.
Edges
23
Laplacian of Gaussian
  • Conclusion
  • Pros
  • Edges well-defined due to zero-crossings
  • Cons
  • How do we find the zero-crossings?
  • I.e., transitions from black to white and vice
    versa
  • Laplacian is too sensitive to noise due to
    second-order derivative
  • Simple to implement except for the search for
    zero-crossings!
  • Not used so often

24
Canny Edge Detector
25
Canny Edge Detector
  • Noise reduction
  • 2D Gaussian used for smoothing
  • Edge enhancement
  • Magnitude of gradient vector
  • Edge localisation

26
Canny Edge Detector
  • Edge localisation
  • Wide edges
  • Edges give rise to ridges in the gradient image
  • Thin edges using the principle of non-maximal
    suppression
  • Find gradients directions
  • Each pixel is compared with its two
  • neighbors in the gradient direction. The
  • two smallest are suppressed gt set to zero
  • The result is pixel-thin edges

27
Thresholding Dilemma
  • Define a threshold in the magnitude-image
  • Assume high magnitudes originate from
    object-edges
  • Dilemma (Show blobs-to-edge, edge, dilate(3),
    TH)
  • Too high threshold
  • Remove noise ?
  • Remove small edges ?
  • Too low threshold
  • Keep noise ?
  • Keep small edges ?
  • How do we threshold the magnitude image so that
    noise is suppressed and the object-edges are
    not???

28
Hysteresis Thresholding
  • Concept think of object-edges as a connected
    group of edge pixels
  • Use two thresholds Thmin and Thmax
  • All magnitude edge-pixel below Thmin are sat to
    zero
  • Choose Thmin so low that no object edges are
    eliminated
  • Find all grouped edges (non-zero edge-pixels)
  • Ignore all groups which are too small (in number)
  • Ignore all groups which do not contain at least
    one edge-pixel with a magnitude above Thmax
  • Choose Thmax so high that (most) noise edges are
    eliminated
  • Similar to region growing
  • Effect
  • Isolated (noise) edge-pixels are ignored
  • Both strong and weak edge-pixels are kept

29
Examples
Gauss 5x5, Thmax 255, Thmin 1
Gauss 5x5, Thmax 255, Thmin 220
Gauss 5x5, Thmax 128, Thmin 1
Gauss 9x9, Thmax 128, Thmin 1
30
Examples
Gauss 7x7, Thmax 200, Thmin 1
Gauss 5x5, Thmax 200, Thmin 1
31
Examples
  • Comparison on noisy image

Canny
Sobel
32
Canny edge detector
  • Conclusion
  • Pros
  • One pixel wide edges
  • Edges are grouped together (often good for
    segmentation)
  • Robust against noise!
  • Cons
  • Complicated to understand and implement
  • Slow
  • Used a lot!

33
What to remember
  • Edge Rapid intensity change
  • Edge information is an important factor in Image
    Procesing and Human Vision
  • Three steps in edge detection
  • Noise reduction
  • Edge enhancement
  • Edge localisation
  • Three types were presented
  • Based on first-order derivative
  • Prewitt and Sobel
  • Based on second-order derivative
  • Laplacian of Gaussian
  • Based on groups of edges
  • Canny

34
Exercises
  • Use ImageJ to generate a magnitude image using
    the Sobel kernels
  • Discuss the PE-questions
  • How wide will the edges be for the different edge
    detectors?
  • Does this matter?
  • Discuss the principle of non-maximal suppression
Write a Comment
User Comments (0)
About PowerShow.com