Edges and Lines Readings: Chapter 10:

Slides:



Advertisements
Similar presentations
Edge Detection Selim Aksoy Department of Computer Engineering Bilkent University
Advertisements

November 12, 2013Computer Vision Lecture 12: Texture 1Signature Another popular method of representing shape is called the signature. In order to compute.
Dynamic Occlusion Analysis in Optical Flow Fields
Edge Detection Selim Aksoy Department of Computer Engineering Bilkent University
Image Segmentation Image segmentation (segmentace obrazu) –division or separation of the image into segments (connected regions) of similar properties.
Department of Computer Engineering
Department of Computer Engineering
Segmentation (2): edge detection
1Ellen L. Walker Edges Humans easily understand “line drawings” as pictures.
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
1 Image Segmentation Image segmentation is the operation of partitioning an image into a collection of connected sets of pixels. 1. into regions, which.
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)
EE663 Image Processing Edge Detection 2 Dr. Samir H. Abdul-Jauwad Electrical Engineering Department King Fahd University of Petroleum & Minerals.
Edge Detection Today’s reading Forsyth, chapters 8, 15.1
CS 376b Introduction to Computer Vision 04 / 14 / 2008 Instructor: Michael Eckmann.
Stockman MSU/CSE Fall 2009 Finding region boundaries.
Edge Detection Today’s readings Cipolla and Gee –supplemental: Forsyth, chapter 9Forsyth Watt, From Sandlot ScienceSandlot Science.
© 2010 Cengage Learning Engineering. All Rights Reserved.
Edge Detection.
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.
October 8, 2013Computer Vision Lecture 11: The Hough Transform 1 Fitting Curve Models to Edges Most contours can be well described by combining several.
Curve Modeling Bézier Curves
MASKS © 2004 Invitation to 3D vision Lecture 3 Image Primitives andCorrespondence.
Chapter 2. Image Analysis. Image Analysis Domains Frequency Domain Spatial Domain.
Chapter 10: Image Segmentation
October 14, 2014Computer Vision Lecture 11: Image Segmentation I 1Contours How should we represent contours? A good contour representation should meet.
Discrete Images (Chapter 7) Fourier Transform on discrete and bounded domains. Given an image: 1.Zero boundary condition 2.Periodic boundary condition.
Intelligent Vision Systems ENT 496 Object Shape Identification and Representation Hema C.R. Lecture 7.
Generalized Hough Transform
Edges. Edge detection schemes can be grouped in three classes: –Gradient operators: Robert, Sobel, Prewitt, and Laplacian (3x3 and 5x5 masks) –Surface.
CSSE463: Image Recognition Day 25 This week This week Today: Finding lines and circles using the Hough transform (Sonka 6.26) Today: Finding lines and.
CSC508 What You Should Be Doing Code, code, code –Programming Gaussian Convolution Sobel Edge Operator.
COMP322/S2000/L171 Robot Vision System Major Phases in Robot Vision Systems: A. Data (image) acquisition –Illumination, i.e. lighting consideration –Lenses,
CSC508 Convolution Operators. CSC508 Convolution Arguably the most fundamental operation of computer vision It’s a neighborhood operator –Similar to the.
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.
October 1, 2013Computer Vision Lecture 9: From Edges to Contours 1 Canny Edge Detector However, usually there will still be noise in the array E[i, j],
Image Segmentation Image segmentation (segmentace obrazu)
Edges and Lines Readings: Chapter 10:
Digital Image Processing Lecture 17: Segmentation: Canny Edge Detector & Hough Transform Prof. Charlene Tsai.
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
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.
MASKS © 2004 Invitation to 3D vision Lecture 3 Image Primitives andCorrespondence.
1 Edge Operators a kind of filtering that leads to useful features.
Image Segmentation Image segmentation is the operation of partitioning an image into a collection of connected sets of pixels. 1. into regions, which usually.
Detection of discontinuity using
Introduction Computer vision is the analysis of digital images
Image Primitives and Correspondence
Edge Detection EE/CSE 576 Linda Shapiro.
Fitting Curve Models to Edges
Computer Vision Lecture 9: Edge Detection II
Introduction Computer vision is the analysis of digital images
ECE 692 – Advanced Topics in Computer Vision
a kind of filtering that leads to useful features
Edge Detection CSE 455 Linda Shapiro.
a kind of filtering that leads to useful features
Image Segmentation Image analysis: First step:
Digital Image Processing
CSSE463: Image Recognition Day 26
Morphological Operators
Edge Detection Today’s readings Cipolla and Gee Watt,
Introduction Computer vision is the analysis of digital images
Finding Line and Curve Segments from Edge Images
Introduction to Artificial Intelligence Lecture 22: Computer Vision II
Edge Detection ECE P 596 Linda Shapiro.
Presentation transcript:

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

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

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

How do we estimate the Second Derivative? Laplacian Filter:  f =  f / x +  f / y 2 2 2 2 2 0 1 0 1 -4 1 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.

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

and in 2D f(0,1) f(-1,0) f(0,0) f(1,0) f/x(1/2) = f(1,0)-f(0,0) f/x2 = f(1,0)-2f(0,0)+f(-1,0) f/y2 = f(0,1)-2f(0,0)+f(0,-1) 2f = f/x2 + f/y2 = 1f(1,0) -4f(0,0)+1f((-1,0)+1f(0,1)+1f(0,-1) 0 1 0 -4 1 0 1 0

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.

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.

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.

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.

Canny on Kidney

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.

Finding Lines Parameter Estimation Methods Tracking Methods

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. accumulator image b m y = mx + b

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

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) } }

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

Chalmers University of Technology

Chalmers University of Technology

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 }

Line segments from Hough Transform

A Nice Hough Variant The Burns Line Finder 45 3 2 3 4 2 4 1 +22.5 5 1 5 8 6 8 -22.5 6 7 7 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.

Burns Example 1

Burns Example 2

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

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)

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?

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.

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.

Strider The measure of asymmetry is the angle between two line segments. 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)) angle 0 here Longer spiders allow less of an angle.

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.

Ort finds line segments for building detection

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

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

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!

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) }}

Finding lung nodules (Kimme & Ballard)

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.