Edges and Lines Readings: Chapter 10: better edge detectors line finding circle finding

Similar documents
Edges and Lines Readings: Chapter 10: better edge detectors line finding circle finding

Example 2: Straight Lines. Image Segmentation. Example 3: Lines and Circular Arcs. Example 1: Regions

Example 1: Regions. Image Segmentation. Example 3: Lines and Circular Arcs. Example 2: Straight Lines. Region Segmentation: Segmentation Criteria

Edge Detection. EE/CSE 576 Linda Shapiro

Types of Edges. Why Edge Detection? Types of Edges. Edge Detection. Gradient. Edge Detection

Announcements. Edges. Last Lecture. Gradients: Numerical Derivatives f(x) Edge Detection, Lines. Intro Computer Vision. CSE 152 Lecture 10

Edge and local feature detection - 2. Importance of edge detection in computer vision

Edge detection. Gradient-based edge operators

Multimedia Computing: Algorithms, Systems, and Applications: Edge Detection

Edge Detection. Announcements. Edge detection. Origin of Edges. Mailing list: you should have received messages

Edge detection. Convert a 2D image into a set of curves. Extracts salient features of the scene More compact than pixels

Lecture 15: Segmentation (Edge Based, Hough Transform)

HOUGH TRANSFORM CS 6350 C V

Lecture 9: Hough Transform and Thresholding base Segmentation

Other Linear Filters CS 211A

Generalized Hough Transform, line fitting

Computer Vision I. Announcement. Corners. Edges. Numerical Derivatives f(x) Edge and Corner Detection. CSE252A Lecture 11

Biomedical Image Analysis. Point, Edge and Line Detection

Edge detection. Stefano Ferrari. Università degli Studi di Milano Elaborazione delle immagini (Image processing I)

Computer Vision 6 Segmentation by Fitting

Segmentation and Grouping

EN1610 Image Understanding Lab # 3: Edges

Lecture 8: Fitting. Tuesday, Sept 25

Edge Detection. CSE 576 Ali Farhadi. Many slides from Steve Seitz and Larry Zitnick

Chapter 11 Arc Extraction and Segmentation

Lecture 7: Most Common Edge Detectors

EECS490: Digital Image Processing. Lecture #20

Introduction. Introduction. Related Research. SIFT method. SIFT method. Distinctive Image Features from Scale-Invariant. Scale.

Image Processing. BITS Pilani. Dr Jagadish Nayak. Dubai Campus

EDGE BASED REGION GROWING

ECG782: Multidimensional Digital Signal Processing

Computer Vision I. Announcements. Fourier Tansform. Efficient Implementation. Edge and Corner Detection. CSE252A Lecture 13.

Lesson 6: Contours. 1. Introduction. 2. Image filtering: Convolution. 3. Edge Detection. 4. Contour segmentation

Anno accademico 2006/2007. Davide Migliore

Straight Lines and Hough

Model Fitting. Introduction to Computer Vision CSE 152 Lecture 11

Fitting: Voting and the Hough Transform April 23 rd, Yong Jae Lee UC Davis

Issues with Curve Detection Grouping (e.g., the Canny hysteresis thresholding procedure) Model tting They can be performed sequentially or simultaneou

Motion Detection. Final project by. Neta Sokolovsky

Digital Image Processing. Image Enhancement - Filtering

Edge Detection. CS664 Computer Vision. 3. Edges. Several Causes of Edges. Detecting Edges. Finite Differences. The Gradient

Announcements. Hough Transform [ Patented 1962 ] Generalized Hough Transform, line fitting. Assignment 2: Due today Midterm: Thursday, May 5 in class

Edge Detection (with a sidelight introduction to linear, associative operators). Images

GENERALIZING THE HOUGH TRANSFORM TO DETECT ARBITRARY SHAPES. D. H. Ballard Pattern Recognition Vol. 13 No

Segmentation I: Edges and Lines

Filtering and Edge Detection. Computer Vision I. CSE252A Lecture 10. Announcement

How and what do we see? Segmentation and Grouping. Fundamental Problems. Polyhedral objects. Reducing the combinatorics of pose estimation

E0005E - Industrial Image Analysis

Image Processing

Fitting: The Hough transform

Laboratory of Applied Robotics

Finding 2D Shapes and the Hough Transform

Texture. Frequency Descriptors. Frequency Descriptors. Frequency Descriptors. Frequency Descriptors. Frequency Descriptors

EE795: Computer Vision and Intelligent Systems

CAP 5415 Computer Vision Fall 2012

Image Analysis. Edge Detection

Announcements. Edge Detection. An Isotropic Gaussian. Filters are templates. Assignment 2 on tracking due this Friday Midterm: Tuesday, May 3.

Topic 4 Image Segmentation

Practical Image and Video Processing Using MATLAB

Biometrics Technology: Image Processing & Pattern Recognition (by Dr. Dickson Tong)

Computer vision is the analysis of digital images by a computer for such applications as:

CS334: Digital Imaging and Multimedia Edges and Contours. Ahmed Elgammal Dept. of Computer Science Rutgers University

ELEN E4830 Digital Image Processing. Homework 6 Solution

SUMMARY: DISTINCTIVE IMAGE FEATURES FROM SCALE- INVARIANT KEYPOINTS

Filtering Images. Contents

Detection of Edges Using Mathematical Morphological Operators

Image Analysis. Edge Detection

Edge Detection. CMPUT 206: Introduction to Digital Image Processing. Nilanjan Ray. Source:

Pattern recognition systems Lab 3 Hough Transform for line detection

CS534: Introduction to Computer Vision Edges and Contours. Ahmed Elgammal Dept. of Computer Science Rutgers University

Lecture 6: Edge Detection

SIFT - scale-invariant feature transform Konrad Schindler

OBJECT detection in general has many applications

Lecture: Edge Detection

EE795: Computer Vision and Intelligent Systems

COMPUTER AND ROBOT VISION

CS4733 Class Notes, Computer Vision

Local Features: Detection, Description & Matching

2: Image Display and Digital Images. EE547 Computer Vision: Lecture Slides. 2: Digital Images. 1. Introduction: EE547 Computer Vision

Elaborazione delle Immagini Informazione Multimediale. Raffaella Lanzarotti

Lecture 4: Finding lines: from detection to model fitting

Review for the Final

Digital Image Processing COSC 6380/4393

Comparison between Various Edge Detection Methods on Satellite Image

SIFT: SCALE INVARIANT FEATURE TRANSFORM SURF: SPEEDED UP ROBUST FEATURES BASHAR ALSADIK EOS DEPT. TOPMAP M13 3D GEOINFORMATION FROM IMAGES 2014

Circular Hough Transform

Feature descriptors. Alain Pagani Prof. Didier Stricker. Computer Vision: Object and People Tracking

Digital Image Processing (CS/ECE 545) Lecture 5: Edge Detection (Part 2) & Corner Detection

Filtering Applications & Edge Detection. GV12/3072 Image Processing.

Feature Selection. Ardy Goshtasby Wright State University and Image Fusion Systems Research

Chapter 11 Image Processing

Announcements, schedule. Lecture 8: Fitting. Weighted graph representation. Outline. Segmentation by Graph Cuts. Images as graphs

High Level Computer Vision. Basic Image Processing - April 26, 2o17. Bernt Schiele - Mario Fritz -

COMPARATIVE STUDY OF IMAGE EDGE DETECTION ALGORITHMS

School of Computing University of Utah

Shape Modeling and Geometry Processing

An edge is not a line... Edge Detection. Finding lines in an image. Finding lines in an image. How can we detect lines?

Classification of objects from Video Data (Group 30)

EE795: Computer Vision and Intelligent Systems

Feature Detectors and Descriptors: Corners, Lines, etc.

Transcription:

Edges and Lines Readings: Chapter 10: 10.2.3-10.3 better edge detectors line finding circle finding 1

Lines and Arcs Segmentation In some image sets, lines, curves, and circular arcs are more useful than regions or helpful in addition to regions. Lines and arcs are often used in object recognition stereo matching document analysis 2

Zero Crossing Operators Motivation: The zero crossings of the second derivative of the image function are more precise than the peaks of the first derivative. step edge smoothed 1st derivative zero crossing 2nd derivative 3

How do we estimate the Second Derivative? Laplacian Filter: 2 f = f / x + f / y 2 2 2 2 0 1 0 1-4 1 0 1 0 Standard mask implementation Derivation: In 1D, the first derivative can be computed with mask [-1 0 1] The 1D second derivative is [1-2 1] The Laplacian mask estimates the 2D second derivative. 4

How did you get those masks? 1D function f(x) [f(-1) f(0) f(1)] pixel values f(0)-f(-1) f(1)-f(0) first difference (f(1)-f(0))-(f(0)-f(-1)) second difference 1f(-1)-2f(0)+1f(1) simplify [ 1-2 1] mask 5

and in 2D f(0,1) f(-1,0) f(0,0) f(0,-1) f(1,0) f/ x(1/2) = f(1,0)-f(0,0) f/ x(-1/2) = f(0,0)-f(-1,0) f/ x 2 f/ y 2 = f(1,0)-2f(0,0)+f(-1,0) = f(0,1)-2f(0,0)+f(0,-1) 2 f = f/ x 2 + f/ y 2 = 1f(1,0) -4f(0,0)+1f((-1,0)+1f(0,1)+1f(0,-1) 0 1 0 1-4 1 0 1 0 6

Properties of Derivative Masks Coordinates of derivative masks have opposite signs in order to obtain a high response in regions of high contrast. The sum of coordinates of derivative masks is zero, so that a zero response is obtained on constant regions. First derivative masks produce high absolute values at points of high contrast. Second derivative masks produce zero-crossings at points of high contrast. 7

History: Marr/Hildreth Operator First smooth the image via a Gaussian convolution. Apply a Laplacian filter (estimate 2nd derivative). Find zero crossings of the Laplacian of the Gaussian. This can be done at multiple resolutions. 8

History: Haralick Operator Fit the gray-tone intensity surface to a piecewise cubic polynomial approximation. Use the approximation to find zero crossings of the second directional derivative in the direction that maximizes the first directional derivative. The derivatives here are calculated from direct mathematical expressions wrt the cubic polynomial. 9

Reality: Canny Edge Detector Smooth the image with a Gaussian filter with spread σ. Compute gradient magnitude and direction at each pixel of the smoothed image. Zero out any pixel response the two neighboring pixels on either side of it, along the direction of the gradient. This is called nonmaximum suppression. Track high-magnitude contours. Keep only pixels along these contours, so weak little segments go away. 10

Canny on Kidney 11

Canny Characteristics The Canny operator gives single-pixel-wide images with good continuation between adjacent pixels It is the most widely used edge operator today; no one has done better since it came out in the late 80s. Many implementations are available. It is very sensitive to its parameters, which need to be adjusted for different application domains. 12

Finding Lines Parameter Estimation Methods Tracking Methods 13

1. Parameter Estimation Methods Hough Transform The Hough transform is a method for detecting lines or curves specified by a parametric function. If the parameters are p1, p2, pn, then the Hough procedure uses an n-dimensional accumulator array in which it accumulates votes for the correct parameters of the lines or curves found on the image. image b accumulator y = mx + b m 14

Finding Straight Line Segments y = mx + b is not suitable (why?) The equation generally used is: d = r sin θ + c cos θ θ d c d is the distance from the line to origin r θ is the angle the perpendicular makes with the column axis 15

Procedure to Accumulate Lines Set accumulator array A to all zero. Set point list array PTLIST to all NIL. For each pixel (R,C) in the image { compute gradient magnitude GMAG if GMAG > gradient_threshold { compute quantized tangent angle THETAQ compute quantized distance to origin DQ increment A(DQ,THETAQ) update PTLIST(DQ,THETAQ) } } 16

Example gray-tone image DQ THETAQ 0 0 0 100 100 0 0 0 100 100 0 0 0 100 100 100 100 100 100 100 100 100 100 100 100 - - 3 3 - - - 3 3-3 3 3 3-3 3 3 3 - - - - - - - - 0 0 - - - 0 0-90 90 40 20-90 90 90 40 - - - - - - 360. 6 3 0 distance angle Accumulator A - - - - - - - - - - - - - - - - - - - - - 4-1 - 2-5 - - - - - - - 0 10 20 30 40 90 360. 6 3 0 PTLIST - - - - - - - - - - - - - - - - - - - - - * - * - * - * - - - - - - - (1,3)(1,4)(2,3)(2,4) (3,1) (3,2) (4,1) (4,2) (4,3) 17

Chalmers University of Technology 18

Chalmers University of Technology 19

How do you extract the line segments from the accumulators? pick the bin of A with highest value V while V > value_threshold { order the corresponding pointlist from PTLIST merge in high gradient neighbors within 10 degrees create line segment from final point list zero out that bin of A pick the bin of A with highest value V } 20

Line segments from Hough Transform 21

A Nice Hough Variant The Burns Line Finder 45 3 2 3 4 1 4 2 5 6 7 8 0 5 1 6 7 8 +22.5-22.5 1. Compute gradient magnitude and direction at each pixel. 2. For high gradient magnitude points, assign direction labels to two symbolic images for two different quantizations. 3. Find connected components of each symbolic image. Each pixel belongs to 2 components, one for each symbolic image. Each pixel votes for its longer component. Each component receives a count of pixels who voted for it. The components that receive majority support are selected. 22

Burns Example 1 23

Burns Example 2 24

2. Tracking Methods Mask-based Approach Use masks to identify the following events: 1. start of a new segment junction 2. interior point continuing a segment 3. end of a segment 4. junction between multiple segments corner 5. corner that breaks a segment into two 25

Edge Tracking Procedure for each edge pixel P { classify its pixel type using masks case 1. isolated point : ignore it 2. start point : make a new segment 3. interior point : add to current segment 4. end point : add to current segment and finish it 5. junction or corner : add to incoming segment finish incoming segment make new outgoing segment(s) 26

A Good Tracking Package: the ORT toolkit Part of the C software available on the class web page Updated versions are available How does it work? 27

How ORT finds segments (Communicated by Ata Etemadi who designed it; this is really what he said.) The algorithm is called Strider and is like a spider striding along pixel chains of an image. The spider is looking for local symmetries. When it is moving along a straight or curved segment with no interruptions, its legs are symmetric about its body. When it encounters an obstacle (ie. a corner or junction) its legs are no longer symmetric. If the obstacle is small (compared to the spider), it soon becomes symmetrical. If the obstacle is large, it will take longer. 28

Strider Strider tracks along a pixel chain, looking for junctions and corners. It identifies them by a measure of assymmetry. The accuracy depends on the length of the spider and the size of its stride. The larger they are, the less sensitive it becomes. 29

Strider The measure of asymmetry is the angle between two line segments. angle 0 here L1: the line segment from pixel 1 of the spider to pixel N-2 of the spider L2: the line segment from pixel 1 of the spider to pixel N of the spider The angle must be <= arctan(2/length(l2)) Longer spiders allow less of an angle. 30

Strider The parameters are the length of the spider and the number of pixels per step. These parameters can be changed to allow for less sensitivity, so that we get longer line segments. The algorithm has a final phase in which adjacent segments whose angle differs by less than a given angle are joined. 31

Ort finds line segments for building detection 32

33

Advantages of Strider works on pixel chains of arbitrary complexity can be implemented in parallel no assumptions and the effects of the parameters are well understood 34

Hough Transform for Finding Circles Equations: r = r0 + d sin θ c = c0 - d cos θ r, c, d are parameters Main idea: The gradient vector at an edge pixel points to the center of the circle. d *(r,c) 35

Why it works Filled Circle: Outer points of circle have gradient direction pointing to center. Circular Ring: Outer points gradient towards center. Inner points gradient away from center. The points in the away direction don t accumulate in one bin! 36

Procedure to Accumulate Circles Set accumulator array A to all zero. Set point list array PTLIST to all NIL. For each pixel (R,C) in the image { For each possible value of D { - compute gradient magnitude GMAG - if GMAG > gradient_threshold {. Compute THETA(R,C,D). R0 := R - D*sin(THETA). C0 := C + D* cos(theta). increment A(R0,C0,D). update PTLIST(R0,C0,D) }} 37

38

Finding lung nodules (Kimme & Ballard) 39

Summary The Canny edge operators is still the best one. The Hough transform and its variants can be used to find line segments or circles. It has also been generalized to find other shapes The original Hough method does not work well for line segments, but works very well for circles. The Burns method improves the Hough for line segments and is easy to code. The Srider algorithm in the ORT package gives excellent line and curve segments by tracking. 40