Digital Image Processing Lecture 17: Segmentation: Canny Edge Detector & Hough Transform Prof. Charlene Tsai.

Slides:



Advertisements
Similar presentations
Hough Transforms CSE 6367 – Computer Vision Vassilis Athitsos University of Texas at Arlington.
Advertisements

Boundary Detection - Edges Boundaries of objects –Usually different materials/orientations, intensity changes.
Instructor: Mircea Nicolescu Lecture 6 CS 485 / 685 Computer Vision.
EDGE DETECTION.
Image Segmentation Image segmentation (segmentace obrazu) –division or separation of the image into segments (connected regions) of similar properties.
Segmentation (2): edge detection
Edge Detection. Our goal is to extract a “line drawing” representation from an image Useful for recognition: edges contain shape information –invariance.
EE663 Image Processing Edge Detection 1
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
Canny Edge Detector.
Edge detection. Edge Detection in Images Finding the contour of objects in a scene.
CS 376b Introduction to Computer Vision 04 / 11 / 2008 Instructor: Michael Eckmann.
Announcements Mailing list: –you should have received messages Project 1 out today (due in two weeks)
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
Segmentation (Section 10.2)
Filters and Edges. Zebra convolved with Leopard.
Lecture 4: Edge Based Vision Dr Carole Twining Thursday 18th March 2:00pm – 2:50pm.
Announcements Since Thursday we’ve been discussing chapters 7 and 8. “matlab can be used off campus by logging into your wam account and bringing up an.
3-D Computer Vision CSc Feature Detection and Grouping.
Edge Detection Today’s readings Cipolla and Gee –supplemental: Forsyth, chapter 9Forsyth Watt, From Sandlot ScienceSandlot Science.
© 2010 Cengage Learning Engineering. All Rights Reserved.
Robust estimation Problem: we want to determine the displacement (u,v) between pairs of images. We are given 100 points with a correlation score computed.
Edge detection Goal: Identify sudden changes (discontinuities) in an image Intuitively, most semantic and shape information from the image can be encoded.
כמה מהתעשייה? מבנה הקורס השתנה Computer vision.
October 8, 2013Computer Vision Lecture 11: The Hough Transform 1 Fitting Curve Models to Edges Most contours can be well described by combining several.
Computer Vision Spring ,-685 Instructor: S. Narasimhan WH 5409 T-R 10:30 – 11:50am.
Edge Linking & Boundary Detection
Discrete Images (Chapter 7) Fourier Transform on discrete and bounded domains. Given an image: 1.Zero boundary condition 2.Periodic boundary condition.
Edges. Edge detection schemes can be grouped in three classes: –Gradient operators: Robert, Sobel, Prewitt, and Laplacian (3x3 and 5x5 masks) –Surface.
Chapter 10 Image Segmentation.
CS654: Digital Image Analysis Lecture 25: Hough Transform Slide credits: Guillermo Sapiro, Mubarak Shah, Derek Hoiem.
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.
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.
Edge Detection and Geometric Primitive Extraction Jinxiang Chai.
Course 8 Contours. Def: edge list ---- ordered set of edge point or fragments. Def: contour ---- an edge list or expression that is used to represent.
October 16, 2014Computer Vision Lecture 12: Image Segmentation II 1 Hough Transform The Hough transform is a very general technique for feature detection.
Edge Based Segmentation Xinyu Chang. Outline Introduction Canny Edge detector Edge Relaxation Border Tracing.
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.
Image Segmentation Image segmentation (segmentace obrazu)
Edges and Lines Readings: Chapter 10:
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.
Machine Vision Edge Detection Techniques ENT 273 Lecture 6 Hema C.R.
Instructor: Mircea Nicolescu Lecture 7
Chapter 10 Image Segmentation
Digital Image Processing Lecture 16: Segmentation: Detection of Discontinuities Prof. Charlene Tsai.
Detection of discontinuity using
Edge Detection CS 678 Spring 2018.
Edge Detection EE/CSE 576 Linda Shapiro.
Fitting Curve Models to Edges
Jeremy Bolton, PhD Assistant Teaching Professor
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.
ECE 692 – Advanced Topics in Computer Vision
Edge Detection CSE 455 Linda Shapiro.
Lecture 2: Edge detection
Canny Edge Detector.
CS 565 Computer Vision Nazar Khan Lecture 9.
Edge Detection Today’s readings Cipolla and Gee Watt,
Canny Edge Detector Smooth image with a Gaussian
Winter in Kraków photographed by Marcin Ryczek
Introduction to Artificial Intelligence Lecture 22: Computer Vision II
Edge Detection ECE P 596 Linda Shapiro.
Presentation transcript:

Digital Image Processing Lecture 17: Segmentation: Canny Edge Detector & Hough Transform Prof. Charlene Tsai

2 Review Detection of discontinuity using  1 st derivative Providing gradient and magnitude  Zero crossing (2 nd derivative using Laplacian) For edge location No gradient information Sensitive to noise Smoothing using Gaussian filter (LoG)

3 What is missing? Q1: Is a pixel an edge element or not?  Canny Edge Detection Q2: If the edge elements are not connect, how to establish the boundary between regions?  Hough Transform

4 Canny Edge Detector Canny edge detector answers the first question. Characteristics of the edge detector:  Low error rate -- finding all edges and nothing but edges.  Localization of edges – distance between edges found and actual edges should be minimized.  Single response – no multiple edge pixels when only a single edge exists.

5 Steps for Canny Edge Detector Step 1: generating edge image.  Create 1D Gaussian filter g (for smoothing)  Create 1D filter dg (derivative of the Gaussian) What for?  Convolve g with dg to obtain gdg.  Apply gdg to image x producing x1  Apply gdg’ to image x producing x2  Edge magnitude image is

6 (con’d) Step 2: marking the edge element using non- maximum suppression  A pixel p is an edge if its magnitude is greater than its neighbors in direction (edge gradient)  Edge gradient image is

7 Non-maximum Suppression See any difficulty with step2?  Qantization issue 0 degrees 45 degrees 90 degrees 135 degrees

8 (con’d) Any edge direction falling within the yellow range is set to 0. Any edge direction falling in the green range is set to 45. Any edge direction falling in the blue range is set to 90. And any edge direction falling within the red range is set to to to to to to 157.5

9 Hysteresis Thresholding (final step) After non-max suppression, threshold to produce a binary edge image. Hysteresis thresholding has two values:  Low value t L and  High value t H Conditions under which p is marked as edge:  If xe(p) > t H,  If p is adjacent to an edge pixel, and

10 Edge Function in Matlab I intensity image, BW binary image THRESH is a two-element vector in which the first element is the low threshold, and the second element is the high threshold. The Canny method uses 2 thresholds, to detect strong and weak edges, and includes the weak edges in the output only if they are connected to strong edges.  This method is therefore less likely than the others to be "fooled" by noise, and more likely to detect true weak edges. BW = edge(I,'canny') BW = edge(I,'canny',thresh) BW = edge(I,'canny',thresh,sigma) Syntax sensitivity thresholds smoothing

11 I = imread(‘Will.jpg’); bw = edge(I,'canny'); I = imread(‘Lena.tif’); bw = edge(I,'canny');

12

13

14 A =edge(I,'canny',[], 1); B =edge(I,'canny',[], 2); C =edge(I,'canny',[], 3); D =edge(I,'canny',[], 4); E =[A B C D]; imshow(E) sigma

15 Summary of Canny Algorithm The Canny Edge Detection Algorithm has the following steps: Smooth the image with a Gaussian filter, Compute the gradient magnitude and orientation using finite- difference approximations for the partial derivatives, Apply non-maximum suppression to the gradient magnitude, Use the double thresholding algorithm to detect and link edges.

16 Why is Canny so dominant? Still widely used after 20 years. Theory is nice (but end result same). Details good (magnitude of gradient). Hysteresis an important heuristic. Code was distributed. Perhaps this is about all you can do with linear filtering.

17 Hough Transform Results of edge-detection methods may contain sparse points, instead of straight lines or curves. Therefore, need to fit a line to the edge points. Efficient solution: Hough Transform  Originally for finding lines  Easily varied to find other shapes

18 Simple Example Consider a point (x i,y i ) and the general equation of a straight line in slope-intercept form:  Q: How many lines may pass through (x i,y i )? Re-writing the equation in ab-plane  How many lines do we get for a fixed (x i,y i )? slope intercept

19 Finding (a,b) Now given another point (x j, y j ), how to find the parameter (a’,b’) which defines the line that contains both points?

20 (con’d) All points on this line have lines in parameter space that intersect at (a’,b’).

21 What is the problem? How about a vertical line?  Gradient/slope is infinite Need another parameterization scheme. Now consider r is the shortest distance from the line to the origin, and is the angle New parameterization:

22 Computation for Hough Transform Choosing a discrete set of values of r and. Construct an accumulator array, initialized with 0 for each entry. Picture this process as a voting process r min r max r

23 (con’d) For each edge point (x,y) in the image,  we compute for each  Increment the counter for the cell of the resulting (r, ) At the end, the (r, ) with highest count correspond to strongest line in the image.