edge detection l.
Skip this Video
Loading SlideShow in 5 Seconds..
Edge Detection PowerPoint Presentation
Download Presentation
Edge Detection

Loading in 2 Seconds...

play fullscreen
1 / 39

Edge Detection - PowerPoint PPT Presentation

  • Uploaded on

Edge Detection. Edge Detection. Edges characterize boundaries of objects in image A fundamental problem in image processing Edges are areas with strong intensity contrasts A jump in intensity from one pixel to the next Edge detected image Reduces significantly the amount of data,

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'Edge Detection' - baird

Download Now An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
edge detection2
Edge Detection
  • Edges characterize boundaries of objects in image
  • A fundamental problem in image processing
  • Edges are areas with strong intensity contrasts
  • A jump in intensity from one pixel to the next
  • Edge detected image
    • Reduces significantly the amount of data,
    • Filters out useless information,
    • Preserves the important structural properties

Our goal is to extract a “line drawing” representation from an image

  • Useful for recognition: edges contain shape information
    • invariance
need of edge detection
Need of Edge Detection
  • Digital artists use it to create image outlines.
  • The output of an edge detector can be added back to an original image to enhance the edges
  • Edge detection is often the first step in image segmentation
  • Edge detection is also used in image registration by alignment of two images that may have been acquired at separate times or from different sensors
thick edge
Thick Edge
  • The slope of the ramp is inversely proportional to the degree of blurring in the edge.
  • We no longer have a thin (one pixel thick) path.
  • Instead, an edge point now is any point contained in the ramp, and an edge would then be a set of such points that are connected.
  • The thickness of an edge is determined by the length of the ramp.
  • The length is determined by the slope, which is in turn determined by the degree of blurring.
  • Blurred edges tend to be thick and sharp edges tend to be thin
second derivatives
Second Derivatives
  • Produces 2 values for every edge in an image (an undesirable feature)
  • An imaginary straight line joining the extreme positive and negative values of the second derivative would cross zero near the midpoint of the edge. (zero-crossing property)
  • Quite useful for locating the centers of thick edges
noise images
Noise Images
  • First column: images and gray-level profiles of a ramp edge corrupted by random Gaussian noise of mean 0 and  = 0.0, 0.1, 1.0 and 10.0, respectively.
  • Second column: first-derivative images and gray-level profiles.
  • Third column : second-derivative images and gray-level profiles.
  • Fairly little noise can have such a significant impact on the two key derivatives used for edge detection in images
  • Image smoothing should be serious consideration prior to the use of derivatives in applications where noise is likely to be present.
edge point
Edge Point
  • To determine a point as an edge point
    • Determine the transition in grey level associated with the point which is significantly stronger than the background at that point.
    • Use threshold to determine whether a value is “significant” or not.
    • Note that the point’s two-dimensional first-order derivative must be greater than the specified threshold
gradient operator

commonly approx.

the magnitude becomes nonlinear

Gradient Operator
  • first derivatives are implemented using the magnitude of the gradient.
gradient direction
Gradient Direction
  • Let  (x,y) represent the direction angle of the vector f at (x,y)

 (x,y) = tan-1(Gy/Gx)

diagonal edges with prewitt and sobel masks
Diagonal edges with Prewitt and Sobel Masks

Sobel masks have slightly superior noise-suppression characteristics which is an important issue when dealing with derivatives.

  • Original Image
  • |Gx|, component of the gradient in the x-direction
  • |Gy|, component of the gradient in the y-direction
  • Gradient image,
  • Gx|+ |Gy|

Same sequence as previous figure, but with original image smoothed with a 5 x 5 averaging filter

  • Diagonal edge detection
  • Result of using the Prewitt masks
  • Result of using the Sobel masks

Laplacian operator

(linear operator)


Laplacian masks

laplacian of gaussian log

where r2 = x2+y2, and

 is the standard deviation

Laplacian of Gaussian (LOG)
  • Laplacian combined with smoothing as a precursor to find edges via zero-crossing.
mexican hat

positive central term

surrounded by an adjacent negative region (a function of distance)

zero outer region

Mexican Hat
  • Laplacian of a Gaussian
  • 3-D plot
  • Image (black is negative, gray is the zero plane, and white is positive)
  • Cross-section showing zero-crossings
  • 5x5 mask approximation to (a)

the coefficient must be sum to zero

linear operation
Linear Operation
  • Second derivation is a linear operation
  • Thus, 2f is the same as convolving the image with Gaussian smoothing function first and then computing the Laplacian of the result
  • Original image
  • Sobel Gradient
  • Spatial Gaussian smoothing function
  • Laplacian mask
  • LoG
  • Threshold LoG
  • Zero crossings
zero crossing log
Zero Crossing & LoG
  • Approximate the zero crossing from LoG image
  • Threshold the LoG image by setting all its positive values to white and all negative values to black.
  • Zero crossings occur between positive and negative values of the thresholded LoG.
zero crossing vs gradient
Zero Crossing vs. Gradient
  • Attractive
    • Zero crossing produces thinner edges
    • Noise reduction
  • Drawbacks
    • sophisticated computation.
  • Gradient is more frequently used.
edge linking and boundary detection
Edge Linking and Boundary Detection
  • Edge detection algorithm are followed by linking procedures to assemble edge pixels into meaningful edges.
  • Basic approaches
    • Local Processing
    • Global Processing via the Hough Transform
    • Global Processing via Graph-Theoretic Techniques

Problemswith Edge Detection Methods

  • Most of these partial derivative operators are sensitive to noise,
  • Use of these masks produces thick edges or boundaries,
  • Gives spurious edge pixels due to noise.

Input Image

Edge Detection

Edge Map

To overcome the effect of noise, smoothing operation is performed before edge detection

Input Image

Smoothing operation

Edge Detection

Edge Map

smoothing based edge detection
Smoothing based Edge Detection
  • Two operators which use smoothing
  • Marr-Hildreth operator
    • Laplacian of Gaussian function (LOG)
    • Follows 2-Operations
      • Smoothing
      • Applying Laplacian operator

Or generate the combined mask of LOG

  • Canny Edge Detector
canny edge detection
Canny Edge Detection
  • Normally, edge operators use one threshold for whole image





canny edge detector j canny 1986
Canny Edge Detector (J. Canny’ 1986):
  • An "optimal" edge detector means:
    • Good detection - the algorithm should mark as many real edges in the image as possible.
    • Good localization - edges marked should be as close as possible to the edge in the real image.
  • Canny edge detector uses two threshold values to detect weak and strong edges
canny edge detector
Canny Edge Detector
  • Stages of the Canny Algorithm:
    • Noise reduction
    • Finding the intensity gradient of the image
    • Non-maximum suppression
    • Tracing edges through the image and hysteresis thresholding
stages of the canny algorithm
Stages of the Canny algorithm
  • Noise reduction: raw image is convolved with a Gaussian filter
  • Finding the intensity gradient of the image
    • Intensity gradient is estimated from the smoothed image using simple horizontal and vertical difference operators
    • Gradient direction together with the gradient magnitude then gives an estimated intensity gradient at each point in the image
    • Canny algorithm uses both gradient magnitude and direction in the edge detection
stages of the canny algorithm33
Stages of the Canny algorithm
  • Non-maximum suppression:
    • A search is carried out to determine if the gradient magnitude assumes a local maximum in the gradient direction
    • From this stage, referred to as non-maximum suppression, a set of edge points in the form of a binary image are obtained
    • Output of this stage is sometimes referred to as "thin edges"
stages of the canny algorithm34
Stages of the Canny Algorithm
    • Large threshold: gives true edges
    • Small threshold: gives false edges
  • Canny algorithm does not use same threshold for whole image
    • It does thresholding with hysteresis
  • Thresholding with hysteresis requires
    • two thresholds – high and low
    • Therefore we begin by applying a high threshold
stages of the canny algorithm35
Stages of the Canny Algorithm
  • This marks out the edges we can be fairly sure are genuine.
  • Starting from these, using the directional information derived earlier, edges can be traced through the image.
  • While tracing an edge, we apply the lower threshold, allowing us to trace faint sections of edges as long as we find a starting point.

Stages of the Canny algorithm


Original image

Smoothing by Gaussian convolution

Differential operators along x and y axis

Non-maximum suppression

finds peaks in the image gradient

Hysteresis thresholding locates edge strings

Edge map