Instructor: Mircea Nicolescu Lecture 6 CS 485 / 685 Computer Vision.

Slides:



Advertisements
Similar presentations
EDGE DETECTION ARCHANA IYER AADHAR AUTHENTICATION.
Advertisements

DREAM PLAN IDEA IMPLEMENTATION Introduction to Image Processing Dr. Kourosh Kiani
Edge Detection. Our goal is to extract a “line drawing” representation from an image Useful for recognition: edges contain shape information –invariance.
Edge detection Goal: Identify sudden changes (discontinuities) in an image Intuitively, most semantic and shape information from the image can be encoded.
Lecture 4 Edge Detection
Filtering and Edge Detection
Computer Vision Group Edge Detection Giacomo Boracchi 5/12/2007
Canny Edge Detector.
Edge detection. Edge Detection in Images Finding the contour of objects in a scene.
EE663 Image Processing Edge Detection 2 Dr. Samir H. Abdul-Jauwad Electrical Engineering Department King Fahd University of Petroleum & Minerals.
Canny Edge Detector1 1)Smooth image with a Gaussian optimizes the trade-off between noise filtering and edge localization 2)Compute the Gradient magnitude.
Edge Detection Today’s reading Forsyth, chapters 8, 15.1
CS485/685 Computer Vision Dr. George Bebis
Segmentation (Section 10.2)
EE663 Image Processing Edge Detection 3 Dr. Samir H. Abdul-Jauwad Electrical Engineering Department King Fahd University of Petroleum & Minerals.
Lecture 2: Image filtering
Edge Detection Today’s readings Cipolla and Gee –supplemental: Forsyth, chapter 9Forsyth Watt, From Sandlot ScienceSandlot Science.
Edge detection Goal: Identify sudden changes (discontinuities) in an image Intuitively, most semantic and shape information from the image can be encoded.
3-D Computational Vision CSc Canny Edge Detection.
Computer Vision Spring ,-685 Instructor: S. Narasimhan WH 5409 T-R 10:30 – 11:50am.
Discrete Images (Chapter 7) Fourier Transform on discrete and bounded domains. Given an image: 1.Zero boundary condition 2.Periodic boundary condition.
Lecture 2: Edge detection CS4670: Computer Vision Noah Snavely From Sandlot ScienceSandlot Science.
Edge Detection Edge detection Convert a 2D image into a set of curves Extracts salient features of the scene More compact than pixels.
Edges. Edge detection schemes can be grouped in three classes: –Gradient operators: Robert, Sobel, Prewitt, and Laplacian (3x3 and 5x5 masks) –Surface.
EDGE DETECTION IN COMPUTER VISION SYSTEMS PRESENTATION BY : ATUL CHOPRA JUNE EE-6358 COMPUTER VISION UNIVERSITY OF TEXAS AT ARLINGTON.
Edge Detection Today’s reading Cipolla & Gee on edge detection (available online)Cipolla & Gee on edge detection From Sandlot ScienceSandlot Science.
Edge Detection Today’s reading Cipolla & Gee on edge detection (available online)Cipolla & Gee on edge detection Szeliski, Ch 4.1.2, From Sandlot.
SHINTA P. Juli What are edges in an image? Edge Detection Edge Detection Methods Edge Operators Matlab Program.
Instructor: S. Narasimhan
CS654: Digital Image Analysis Lecture 24: Introduction to Image Segmentation: Edge Detection Slide credits: Derek Hoiem, Lana Lazebnik, Steve Seitz, David.
Edge detection Goal: Identify sudden changes (discontinuities) in an image Intuitively, most semantic and shape information from the image can be encoded.
CSE 185 Introduction to Computer Vision Edges. Scale space Reading: Chapter 3 of S.
EE 4780 Edge Detection.
Many slides from Steve Seitz and Larry Zitnick
October 7, 2014Computer Vision Lecture 9: Edge Detection II 1 Laplacian Filters Idea: Smooth the image, Smooth the image, compute the second derivative.
Digital Image Processing Lecture 16: Segmentation: Detection of Discontinuities Prof. Charlene Tsai.
Brent M. Dingle, Ph.D Game Design and Development Program Mathematics, Statistics and Computer Science University of Wisconsin - Stout Edge Detection.
Chapter 9: Image Segmentation
CSE 6367 Computer Vision Image Operations and Filtering “You cannot teach a man anything, you can only help him find it within himself.” ― Galileo GalileiGalileo.
Digital Image Processing Lecture 16: Segmentation: Detection of Discontinuities May 2, 2005 Prof. Charlene Tsai.
Course 5 Edge Detection. Image Features: local, meaningful, detectable parts of an image. edge corner texture … Edges: Edges points, or simply edges,
Lecture 04 Edge Detection Lecture 04 Edge Detection Mata kuliah: T Computer Vision Tahun: 2010.
Canny Edge Detection. 5 STEPS 5 STEPS Apply Gaussian filter to smooth the image in order to remove the noise Apply Gaussian filter to smooth the image.
Machine Vision Edge Detection Techniques ENT 273 Lecture 6 Hema C.R.
Computer Vision Image Features Instructor: Dr. Sherif Sami Lecture 4.
Instructor: Mircea Nicolescu Lecture 7
Instructor: Mircea Nicolescu Lecture 5 CS 485 / 685 Computer Vision.
Lecture 8: Edges and Feature Detection
Digital Image Processing CSC331
September 26, 2013Computer Vision Lecture 8: Edge Detection II 1Gradient In the one-dimensional case, a step edge corresponds to a local peak in the first.
1 Edge Operators a kind of filtering that leads to useful features.
April 21, 2016Introduction to Artificial Intelligence Lecture 22: Computer Vision II 1 Canny Edge Detector The Canny edge detector is a good approximation.
Winter in Kraków photographed by Marcin Ryczek
Edge Detection slides taken and adapted from public websites:
Edge Detection CS485/685 Computer Vision Dr. George Bebis.
Edge Detection CS 678 Spring 2018.
Computer Vision Lecture 9: Edge Detection II
Edge detection Goal: Identify sudden changes (discontinuities) in an image Intuitively, most semantic and shape information from the image can be encoded.
Dr. Chang Shu COMP 4900C Winter 2008
a kind of filtering that leads to useful features
a kind of filtering that leads to useful features
Lecture 2: Edge detection
Canny Edge Detector.
Edge Detection Today’s reading
Edge Detection Today’s readings Cipolla and Gee Watt,
Canny Edge Detector Smooth image with a Gaussian
Lecture 2: Edge detection
Winter in Kraków photographed by Marcin Ryczek
IT472 Digital Image Processing
IT472 Digital Image Processing
Presentation transcript:

Instructor: Mircea Nicolescu Lecture 6 CS 485 / 685 Computer Vision

Edge Detection Using Derivatives Points that lie on an edge can be found by: (1) Detecting the local maxima or minima of the first derivative. (2) Detecting the zero-crossings of the second derivative. 2 nd derivative 1 st derivative 2

Image Derivatives How can we differentiate a digital image? −Option 1: reconstruct a continuous image, f(x,y), then compute the derivative. −Option 2: take discrete derivative (i.e., finite differences) Consider this case first! 3

Edge Detection Using First Derivative ramp edge roof edge (upward) step edge (downward) step edge (centered at x) 1D functions (not centered at x) 4

Edge Detection Using Second Derivative Approximate finding maxima/minima of first derivative by finding places where: Can’t always find discrete pixels where the second derivative is zero – look for zero-crossing instead. 5

Replace x+1 with x (centered at x): 1D functions: (centered at x+1) Edge Detection Using Second Derivative 6

7

(upward) step edge (downward) step edge ramp edge roof edge Edge Detection Using Second Derivative 8

Effect of Smoothing on Derivatives Where is the edge? 9

Effect of Smoothing on Derivatives 10

Combine Smoothing with Differentiation (saves one operation) 11

Mathematical interpretation: Numerical differentiation is an ill-posed problem - solution does not exist or it is not unique or it does not depend continuously on initial data Ill-posed problems can be solved using “regularization” - impose additional constraints Smoothing performs image interpolation Combine Smoothing with Differentiation 12

13 Edge Detection Using the Gradient The first derivative of an image can be computed using the gradient: To save computations, the magnitude of gradient could be approximated by: 2D functions

14 Edge Detection Using the Gradient Properties of the gradient: −The magnitude of gradient provides information about the strength of the edge −The direction of gradient is always perpendicular to the direction of the edge Main idea: −Compute derivatives in x and y directions −Find gradient magnitude −Threshold gradient magnitude

Approximate gradient using finite differences: Approximate Gradient 15 hxhx

Cartesian vs pixel-coordinates: - j corresponds to x direction - i to -y direction Approximate Gradient 16 i j

sensitive to vertical edges! sensitive to horizontal edges! Approximate Gradient 17

We can implement  f/  x and  f/  y using the following masks: (x+1/2,y) (x,y+1/2) * * approximation at (x+1/2,y) approximation at (x,y+1/2) Approximate Gradient 18

A different approximation of the gradient:  f/  x and  f/  y can be implemented using the masks: * (x+1/2,y+1/2) approximation at Approximate Gradient Roberts edge detector 19

20 The Prewitt edge detector −The partial derivatives can be computed by: Note: M x and M y are approximations at (i, j)) −Consider the arrangement of pixels about the pixel (i, j): −The constant c implies the emphasis given to pixels closer to the center of the mask. −Setting c = 1, we get the Prewitt operator: Approximate Gradient

21 The Sobel edge detector Note: M x and M y are approximations at (i, j)) −Setting c = 2, we get the Sobel operator: Approximate Gradient

22 Edge Detection Using the Gradient Main steps in edge detection using masks:

23 Edge Detection Using the Gradient (an example using the Prewitt edge detector) Note: in this example, the divisions by 2 and 3 in the computation of f x and f y are done for normalization purposes only

24 Edge Detection Using the Gradient Another example:

25 Edge Detection Using the Gradient Example – cont.:

26 Edge Detection Using the Gradient Example – cont.:

Isotropic Property of Gradient Magnitude The gradient magnitude detects edges in all directions. 27

28 Practical Issues −Differential masks act as high-pass filters – tend to amplify noise. −To reduce the effects of noise – first smooth with a low-pass filter. 1)The noise suppression tradeoff −A larger filter reduces noise, but worsens localization (i.e., it adds uncertainty to the location of the edge) and vice-versa.

29 Practical Issues 2)Choice of threshold gradient magnitude low thresholdhigh threshold

30 Practical Issues 3)Edge thinning and linking −required to obtain good contours

31 Criteria for Optimal Edge Detection −Good detection: the optimal detector must minimize the probability of false positives (detecting spurious edges caused by noise), as well as that of false negatives (missing real edges) −Good localization: the edges detected must be as close as possible to the true edges. −Single response constraint: the detector must return one point only for each true edge point; that is, minimize the number of local maxima around the true edge

32 The Canny Edge Detector −This is probably the most widely used edge detector in computer vision. −Canny has shown that the first derivative of the Gaussian closely approximates the operator that optimizes the product of signal-to- noise ratio and localization. −Analysis is based on "step-edges" corrupted by "additive Gaussian noise". The Canny edge detector:

33 The Canny Edge Detector

34 The Canny Edge Detector The derivative of the Gaussian:

35 The Canny Edge Detector Canny – smoothing and derivatives:

36 The Canny Edge Detector Canny – gradient magnitude: imagegradient magnitude

37 The Canny Edge Detector −To find the edge points, we need to find the local maxima of the gradient magnitude. −Broad ridges must be thinned so that only the magnitudes at the points of greatest local change remain. −All values along the direction of the gradient that are not peak values of a ridge are suppressed. Non-maxima suppression

38 The Canny Edge Detector Non-maxima suppression – cont. (i,j) Warning: may require checking interpolated pixels p and r

39 The Canny Edge Detector Canny – Non-maxima suppression: gradient magnitudethinned

40 The Canny Edge Detector Hysteresis thresholding / Edge linking Standard thresholding: - Can only select “strong” edges - Does not guarantee continuity gradient magnitudelow thresholdhigh threshold

The Canny Edge Detector Use two thresholds: For “maybe” edges, use neighboring pixels to decide - low threshold t l - high threshold t h (usually, t h = 2t l ) t l ≤ tltl thth thth Hysteresis thresholding / Edge linking – cont. 41

Idea: use a high threshold to start edge curves and a low threshold to continue them. Use edge direction for linking edges The Canny Edge Detector Hysteresis thresholding / Edge linking – cont. 42

43 The Canny Edge Detector Hysteresis thresholding / Edge linking – cont. −The algorithm performs edge linking as a by-product of double- thresholding −Note: large gaps are still difficult to bridge (more sophisticated algorithms are required)

44 The Canny Edge Detector Canny – Hysteresis thresholding / Edge linking thinned