Edges Implementing 1-D Edge Detection Canny Edge Detector

Total Page:16

File Type:pdf, Size:1020Kb

Edges Implementing 1-D Edge Detection Canny Edge Detector Edges Edge Detection, Corner Detection Lines [Nice to see you again] Introduction to Computer Vision CSE 152 1. Object boundaries Lecture 10 2. Surface normal discontinuities 3. Reflectance (albedo) discontinuities 4. Lighting discontinuities (shadow boundaries) CSE152, Winter 2014 Intro Computer Vision CSE152, Winter 2014 Intro Computer Vision Effects of Noise Edge is Where Change Occurs: 1-D • Change is measured by derivative in 1D • Consider a single row or column of the image – Plotting intensity as a function of position gives a signal Ideal Edge Smoothed Edge First Derivative Second Derivative • Biggest change, derivative has maximum magnitude Where is the edge?? • Or 2nd derivative is zero. CSE152, Winter 2014 (from Srinivasa Narasmihan) Intro Computer Vision CSE152, Winter 2014 Intro Computer Vision Implementing 1-D Edge Detection Canny Edge Detector 1. Filter out noise: convolve with Gaussian 1. Smooth image by filtering with a Gaussian 2. Compute gradient at each point in the image. 2. Take a derivative: convolve with [-1 0 1] 3. At each point in the image, compute the direction – We can combine 1 and 2. of the gradient and the magnitude of the gradient. 4. Perform non-maximal suppression to identify 3. Find the peak of the magnitude of the convolved candidate edgels. image: Two issues: 5. Trace edge chains using hysteresis tresholding. – Should be a local maximum. – Should be sufficiently high. CSE152, Winter 2014 Intro Computer Vision CSE152, Winter 2014 Intro Computer Vision 1 2D Edge Detection: Canny Gradient • Given a function f(x,y) -- e.g., intensity is f 1. Filter out noise • Gradient equation: – Use a 2D Gaussian Filter. J = G * I 2. Take a derivative -- gradient • Represents direction of most rapid change in intensity – Compute the magnitude of the gradient – Compute the direction of the gradient € • Gradient direction: • The edge strength is given by the gradient magnitude CSE152, Winter 2014 Intro Computer Vision CSE152, Winter 2014 Intro Computer Vision Gradients: $∂ I /∂x' ∇I = & ) %∂ I /∂y( Is this dI/dx or dI/dy? € σ = 1 σ = 2 There are three major issues: 1. The gradient magnitude at different scales is different; which scale should we choose? 2. The gradient magnitude is large along thick trail; how do we identify the significant points? y 3. How do we link the relevant points up into curves? x CSE152, Winter 2014 Intro Computer Vision CSE152, Winter 2014 Intro Computer Vision Non-maximum suppression Magnitude of Image Gradient Loop over every point q in the image, decide whether q p is a candidate edge point Tangent: ∇I(p) Orthogonal Using gradient direction at to gradient direction q, find two points p and r on Normal: q adjacent rows (or columns). € In direction ∇I(q) of grad ∇I(q) > ∇I(p) and If ∇I(q) > ∇I(r) We wish to mark points along a curve where the magnitude is biggest. r We can do this by looking for a maximum along a slice orthogonal to the curve € ∇I(r) then q is a candidate edgel (non-maximum suppression). These points should form a curve. € € CSE152, Winter 2014 Intro Computer Vision CSE152, Winter 2014 Intro Computer Vision 2 Non-maximum suppression The Canny Edge Detector Loop over every point q in the image, decide whether q p is a candidate edge point ∇I(p) Using gradient direction at q, find two points p and r on q adjacent rows (or columns). € p & r are found by ∇I(q) interpolation ∇I(q) > ∇I(p) and If r ∇I(q) > ∇I(r) € ∇I(r) then q is a candidate edgel € € original image (Lena) CSE152, Winter 2014 Intro Computer Vision CSE152, Winter 2014 (Example from Srinivasa Narasmihan) Intro Computer Vision The Canny Edge Detector The Canny Edge Detector magnitude of the gradient After non-maximum suppression CSE152, Winter 2014 (Example from Srinivasa Narasmihan) Intro Computer Vision CSE152, Winter 2014 (Example from Srinivasa Narasmihan) Intro Computer Vision An Idea: Single Threshold An OK Idea: Single Threshold T=15 T=5 1. Smooth Image 1. Smooth Image 2. Compute gradients & Magnitude 2. Compute gradients & Magnitude 3. Non-maximal supression 3. Non-maximal supression 4. Compare to a threshold: T 4. Compare to a threshold: T CSE152, Winter 2014 Intro Computer Vision CSE152, Winter 2014 Intro Computer Vision 3 A Better Idea: Linking + Two Tresholds A Better Idea: HysteresisThresholding • Define two thresholds τlow and τhigh. Linking: Assume the • Starting with output of nonmaximal supression, find a marked point q is an point q where ∇ I ( q ) > τ , and ∇ I ( q ) is a local maximum. edge point. Then we 0 o high o • Start tracking an edge chain at pixel location q in one of construct the tangent to 0 the two directions q the edge curve (which is normal to the gradient at • Stop when€ gradient magnitude < τlow. that point) and use this – i.e., use a high threshold to start edge curves and a low to predict the next threshold to continue them. ∇I(q) points (either r or s). q0 τhigh € τlow Position along edge curve CSE152, Winter 2014 Intro Computer Vision CSE152, Winter 2014 Intro Computer Vision Single Threshold T=15 T=5 Hysteresis Th=15 Tl = 5 Hysteresis thresholding CSE152, Winter 2014 Intro Computer Vision CSE152, Winter 2014 Intro Computer Vision coarse scale, fine scale High threshold high threshold CSE152, Winter 2014 Intro Computer Vision CSE152, Winter 2014 Intro Computer Vision 4 Why is Canny so Dominant • Still widely used after 20 years. coarse 1. Theory is nice scale 2. Details good (magnitude of gradient, non-max Low high threshold suppression). 3. Hysteresis thresholding an important heuristic. 4. Code was distributed. CSE152, Winter 2014 Intro Computer Vision CSE152, Winter 2014 Intro Computer Vision Feature extraction: Corners and blobs Corner Detection CSE152, Winter 2014 Intro Computer Vision CSE152, Winter 2014 Intro Computer Vision Why extract features? Why extract features? • Motivation: panorama stitching • Motivation: panorama stitching – We have two images – how do we combine them? – We have two images – how do we combine them? Step 1: extract features Step 2: match features CSE152, Winter 2014 Intro Computer Vision CSE152, Winter 2014 Intro Computer Vision 5 Why extract features? Finding Corners • Motivation: panorama stitching – We have two images – how do we combine them? Step 1: extract features Intuition: Step 2: match features • Right at corner, gradient is ill-defined. Step 3: align images • Near corner, gradient has two different values. CSE152, Winter 2014 Intro Computer Vision CSE152, Winter 2014 Intro Computer Vision The Basic Idea Distribution of gradients for different • We should easily recognize the point by image patches looking through a small window dI/dy dI/dy dI/dy dI/dx dI/dx dI/dx “flat” region: “edge”: “corner”: no change in no change along significant all directions the edge change in all Source: A. Efros CSE152, Winter 2014 direction directions Intro Computer Vision CSE152, Winter 2014 Intro Computer Vision Finding Corners Because C is a symmetric positive definite matrix, it For each image location (x,y), we create a can be factored as: matrix C(x,y): " % " % Gradient with respect to x, −1 λ1 0 T λ1 0 Sum over a small region times gradient with respect to y C = R $ 'R = R $ 'R 0 0 #$ λ2 &' #$ λ2 &' # I 2 I I & ∑ x ∑ x y where R is a 2x2 rotation matrix and λ1 and λ2 C(x,y) = % ( are non-negative. I I I 2 $%∑ x y ∑ y '( 1. λ1 and λ2 are the Eigenvalues of C. 2. The columns of R are the Eigenvectors of C. 3. Eigenvalues can be fond by solving the characteristic equation det(C-λ I) = 0 for λ. Matrix is symmetric WHY THIS? CSE152, Winter 2014 Intro Computer Vision CSE152, Winter 2014 Intro Computer Vision € 6 Example: Assume R=Identity (axis aligned) So, to detect corners What is region like if: • Filter image with a Gaussian. 1. λ1 = 0, λ2 > 0? • Compute the gradient everywhere. 2. λ2 = 0, λ1 > 0? • Move window over image, and for each 3. λ1 = 0 and λ2 = 0? window location: 4. λ1 >> 0 and λ2 >> 0? 1. Construct the matrix C over the window. 2. Use linear algebra to find λ1 and λ2. 3. If they are both big, we have a corner. 1. Let e(x,y) = min(λ1(x,y), λ2(x,y)) 2. (x,y) is a corner if it’s local maximum of e(x,y) and e(x,y) > τ Parameters: Gaussian std. dev, window size, threshold CSE152, Winter 2014 Intro Computer Vision CSE152, Winter 2014 Intro Computer Vision Corner Detection Sample Results Threshold=25,000 Threshold=10,000 Threshold=5,000 CSE152, Winter 2014 Intro Computer Vision 7 .
Recommended publications
  • Fast Image Registration Using Pyramid Edge Images
    Fast Image Registration Using Pyramid Edge Images Kee-Baek Kim, Jong-Su Kim, Sangkeun Lee, and Jong-Soo Choi* The Graduate School of Advanced Imaging Science, Multimedia and Film, Chung-Ang University, Seoul, Korea(R.O.K) *Corresponding author’s E-mail address: [email protected] Abstract: Image registration has been widely used in many image processing-related works. However, the exiting researches have some problems: first, it is difficult to find the accurate information such as translation, rotation, and scaling factors between images; and it requires high computational cost. To resolve these problems, this work proposes a Fourier-based image registration using pyramid edge images and a simple line fitting. Main advantages of the proposed approach are that it can compute the accurate information at sub-pixel precision and can be carried out fast for image registration. Experimental results show that the proposed scheme is more efficient than other baseline algorithms particularly for the large images such as aerial images. Therefore, the proposed algorithm can be used as a useful tool for image registration that requires high efficiency in many fields including GIS, MRI, CT, image mosaicing, and weather forecasting. Keywords: Image registration; FFT; Pyramid image; Aerial image; Canny operation; Image mosaicing. registration information as image size increases [3]. 1. Introduction To solve these problems, this work employs a pyramid-based image decomposition scheme. Image registration is a basic task in image Specifically, first, we use the Gaussian filter to processing to combine two or more images that are remove the noise because it causes many undesired partially overlapped.
    [Show full text]
  • Exploiting Information Theory for Filtering the Kadir Scale-Saliency Detector
    Introduction Method Experiments Conclusions Exploiting Information Theory for Filtering the Kadir Scale-Saliency Detector P. Suau and F. Escolano {pablo,sco}@dccia.ua.es Robot Vision Group University of Alicante, Spain June 7th, 2007 P. Suau and F. Escolano Bayesian filter for the Kadir scale-saliency detector 1 / 21 IBPRIA 2007 Introduction Method Experiments Conclusions Outline 1 Introduction 2 Method Entropy analysis through scale space Bayesian filtering Chernoff Information and threshold estimation Bayesian scale-saliency filtering algorithm Bayesian scale-saliency filtering algorithm 3 Experiments Visual Geometry Group database 4 Conclusions P. Suau and F. Escolano Bayesian filter for the Kadir scale-saliency detector 2 / 21 IBPRIA 2007 Introduction Method Experiments Conclusions Outline 1 Introduction 2 Method Entropy analysis through scale space Bayesian filtering Chernoff Information and threshold estimation Bayesian scale-saliency filtering algorithm Bayesian scale-saliency filtering algorithm 3 Experiments Visual Geometry Group database 4 Conclusions P. Suau and F. Escolano Bayesian filter for the Kadir scale-saliency detector 3 / 21 IBPRIA 2007 Introduction Method Experiments Conclusions Local feature detectors Feature extraction is a basic step in many computer vision tasks Kadir and Brady scale-saliency Salient features over a narrow range of scales Computational bottleneck (all pixels, all scales) Applied to robot global localization → we need real time feature extraction P. Suau and F. Escolano Bayesian filter for the Kadir scale-saliency detector 4 / 21 IBPRIA 2007 Introduction Method Experiments Conclusions Salient features X HD(s, x) = − Pd,s,x log2Pd,s,x d∈D Kadir and Brady algorithm (2001): most salient features between scales smin and smax P.
    [Show full text]
  • Sobel Operator and Canny Edge Detector ECE 480 Fall 2013 Team 4 Daniel Kim
    P a g e | 1 Sobel Operator and Canny Edge Detector ECE 480 Fall 2013 Team 4 Daniel Kim Executive Summary In digital image processing (DIP), edge detection is an important subject matter. There are numerous edge detection methods such as Prewitt, Kirsch, and Robert cross. Two different types of edge detectors are explored and analyzed in this paper: Sobel operator and Canny edge detector. The performance of two edge detection methods are then compared with several input images. Keywords : Digital Image Processing, Edge Detection, Sobel Operator, Canny Edge Detector, Computer Vision, OpenCV P a g e | 2 Table of Contents 1| Introduction……………………………………………………………………………. 3 2|Sobel Operator 2.1 Background……………………………………………………………………..3 2.2 Example………………………………………………………………………...4 3|Canny Edge Detector 3.1 Background…………………………………………………………………….5 3.2 Example………………………………………………………………………...5 4|Comparison of Sobel and Canny 4.1 Discussion………………………………………………………………………6 4.2 Example………………………………………………………………………...7 5|Conclusion………………………………………………………………………............7 6|Appendix 6.1 OpenCV Sobel tutorial code…............................................................................8 6.2 OpenCV Canny tutorial code…………..…………………………....................9 7|Reference………………………………………………………………………............10 P a g e | 3 1) Introduction Edge detection is a crucial step in object recognition. It is a process of finding sharp discontinuities in an image. The discontinuities are abrupt changes in pixel intensity which characterize boundaries of objects in a scene. In short, the goal of edge detection is to produce a line drawing of the input image. The extracted features are then used by computer vision algorithms, e.g. recognition and tracking. A classical method of edge detection involves the use of operators, a two dimensional filter. An edge in an image occurs when the gradient is greatest.
    [Show full text]
  • Topic: 9 Edge and Line Detection
    V N I E R U S E I T H Y DIA/TOIP T O H F G E R D I N B U Topic: 9 Edge and Line Detection Contents: First Order Differentials • Post Processing of Edge Images • Second Order Differentials. • LoG and DoG filters • Models in Images • Least Square Line Fitting • Cartesian and Polar Hough Transform • Mathemactics of Hough Transform • Implementation and Use of Hough Transform • PTIC D O S G IE R L O P U P P A D E S C P I Edge and Line Detection -1- Semester 1 A S R Y TM H ENT of P V N I E R U S E I T H Y DIA/TOIP T O H F G E R D I N B U Edge Detection The aim of all edge detection techniques is to enhance or mark edges and then detect them. All need some type of High-pass filter, which can be viewed as either First or Second order differ- entials. First Order Differentials: In One-Dimension we have f(x) d f(x) dx d f(x) dx We can then detect the edge by a simple threshold of d f (x) > T Edge dx ⇒ PTIC D O S G IE R L O P U P P A D E S C P I Edge and Line Detection -2- Semester 1 A S R Y TM H ENT of P V N I E R U S E I T H Y DIA/TOIP T O H F G E R D I N B U Edge Detection I but in two-dimensions things are more difficult: ∂ f (x,y) ∂ f (x,y) Vertical Edges Horizontal Edges ∂x → ∂y → But we really want to detect edges in all directions.
    [Show full text]
  • Edge Detection Low Level
    Image Processing - Lesson 10 Image Processing - Computer Vision Edge Detection Low Level • Edge detection masks Image Processing representation, compression,transmission • Gradient Detectors • Compass Detectors image enhancement • Second Derivative - Laplace detectors • Edge Linking edge/feature finding • Hough Transform image "understanding" Computer Vision High Level UFO - Unidentified Flying Object Point Detection -1 -1 -1 Convolution with: -1 8 -1 -1 -1 -1 Large Positive values = light point on dark surround Large Negative values = dark point on light surround Example: 5 5 5 5 5 -1 -1 -1 5 5 5 100 5 * -1 8 -1 5 5 5 5 5 -1 -1 -1 0 0 -95 -95 -95 = 0 0 -95 760 -95 0 0 -95 -95 -95 Edge Definition Edge Detection Line Edge Line Edge Detectors -1 -1 -1 -1 -1 2 -1 2 -1 2 -1 -1 2 2 2 -1 2 -1 -1 2 -1 -1 2 -1 -1 -1 -1 2 -1 -1 -1 2 -1 -1 -1 2 gray value gray x edge edge Step Edge Step Edge Detectors -1 1 -1 -1 1 1 -1 -1 -1 -1 -1 -1 -1 -1 -1 1 -1 -1 1 1 -1 -1 -1 -1 1 1 1 1 -1 1 -1 -1 1 1 1 1 1 1 gray value gray -1 -1 1 1 1 -1 1 1 x edge edge Example Edge Detection by Differentiation Step Edge detection by differentiation: 1D image f(x) gray value gray x 1st derivative f'(x) threshold |f'(x)| - threshold Pixels that passed the threshold are -1 -1 1 1 -1 -1 -1 -1 Edge Pixels -1 -1 1 1 -1 -1 -1 -1 -1 -1 1 1 1 1 1 1 -1 -1 1 1 1 -1 1 1 Gradient Edge Detection Gradient Edge - Examples ∂f ∂x ∇ f((x,y) = Gradient ∂f ∂y ∂f ∇ f((x,y) = ∂x , 0 f 2 f 2 Gradient Magnitude ∂ + ∂ √( ∂ x ) ( ∂ y ) ∂f ∂f Gradient Direction tg-1 ( / ) ∂y ∂x ∂f ∇ f((x,y) = 0 , ∂y Differentiation in Digital Images Example Edge horizontal - differentiation approximation: ∂f(x,y) Original FA = ∂x = f(x,y) - f(x-1,y) convolution with [ 1 -1 ] Gradient-X Gradient-Y vertical - differentiation approximation: ∂f(x,y) FB = ∂y = f(x,y) - f(x,y-1) convolution with 1 -1 Gradient-Magnitude Gradient-Direction Gradient (FA , FB) 2 2 1/2 Magnitude ((FA ) + (FB) ) Approx.
    [Show full text]
  • A Comprehensive Analysis of Edge Detectors in Fundus Images for Diabetic Retinopathy Diagnosis
    SSRG International Journal of Computer Science and Engineering (SSRG-IJCSE) – Special Issue ICRTETM March 2019 A Comprehensive Analysis of Edge Detectors in Fundus Images for Diabetic Retinopathy Diagnosis J.Aashikathul Zuberiya#1, M.Nagoor Meeral#2, Dr.S.Shajun Nisha #3 #1M.Phil Scholar, PG & Research Department of Computer Science, Sadakathullah Appa College, Tirunelveli, Tamilnadu, India #2M.Phil Scholar, PG & Research Department of Computer Science, Sadakathullah Appa College, Tirunelveli, Tamilnadu, India #3Assistant Professor & Head, PG & Research Department of Computer Science, Sadakathullah Appa College, Tirunelveli, Tamilnadu, India Abstract severe stage. PDR is an advanced stage in which the Diabetic Retinopathy is an eye disorder that fluids sent by the retina for nourishment trigger the affects the people with diabetics. Diabetes for a growth of new blood vessel that are abnormal and prolonged time damages the blood vessels of retina fragile.Initial stage has no vision problem, but with and affects the vision of a person and leads to time and severity of diabetes it may lead to vision Diabetic retinopathy. The retinal fundus images of the loss.DR can be treated in case of early detection. patients are collected are by capturing the eye with [1][2] digital fundus camera. This captures a photograph of the back of the eye. The raw retinal fundus images are hard to process. To enhance some features and to remove unwanted features Preprocessing is used and followed by feature extraction . This article analyses the extraction of retinal boundaries using various edge detection operators such as Canny, Prewitt, Roberts, Sobel, Laplacian of Gaussian, Kirsch compass mask and Robinson compass mask in fundus images.
    [Show full text]
  • Robust Edge Aware Descriptor for Image Matching
    Robust Edge Aware Descriptor for Image Matching Rouzbeh Maani, Sanjay Kalra, Yee-Hong Yang Department of Computing Science, University of Alberta, Edmonton, Canada Abstract. This paper presents a method called Robust Edge Aware De- scriptor (READ) to compute local gradient information. The proposed method measures the similarity of the underlying structure to an edge using the 1D Fourier transform on a set of points located on a circle around a pixel. It is shown that the magnitude and the phase of READ can well represent the magnitude and orientation of the local gradients and present robustness to imaging effects and artifacts. In addition, the proposed method can be efficiently implemented by kernels. Next, we de- fine a robust region descriptor for image matching using the READ gra- dient operator. The presented descriptor uses a novel approach to define support regions by rotation and anisotropical scaling of the original re- gions. The experimental results on the Oxford dataset and on additional datasets with more challenging imaging effects such as motion blur and non-uniform illumination changes show the superiority and robustness of the proposed descriptor to the state-of-the-art descriptors. 1 Introduction Local feature detection and description are among the most important tasks in computer vision. The extracted descriptors are used in a variety of applica- tions such as object recognition and image matching, motion tracking, facial expression recognition, and human action recognition. The whole process can be divided into two major tasks: region detection, and region description. The goal of the first task is to detect regions that are invariant to a class of transforma- tions such as rotation, change of scale, and change of viewpoint.
    [Show full text]
  • Design of Improved Canny Edge Detection Algorithm
    IJournals: International Journal of Software & Hardware Research in Engineering ISSN-2347-4890 Volume 3 Issue 8 August, 2015 Design of Improved Canny Edge Detection Algorithm Deepa Krushnappa Maladakara; H R Vanamala M.Tech 4th SEM Student; Associate Professor PESIT Bengaluru; PESIT Bengaluru [email protected]; [email protected] ABSTRACT— An improved Canny edge detection detector, Laplacian of Gaussian, etc. Among these, algorithm is implemented to detect the edges with Canny edge detection algorithm is most extensively complexity reduction and without any performance used in industries, as it is highly performance oriented degradation. The existing algorithms for edge detection and provides low error bit rate. are Sobel operator, Robert Operator, Prewitt Operator, The Canny edge detection operator was developed by Laplacian of Gaussian Operator, have various draw John F. Canny in 1986, an approach to derive an backs in edge detection methodologies with respect to optimal edge detector to deal with step edges corrupted noise, performance, etc. Original Canny edge detection by a white Gaussian noise. algorithm based on frame level statistics overcomes the An optimal edge detector should have the flowing 1 drawbacks giving high accuracy but is computationally criteria . more intensive to implement in hardware. Hence a 1) Good Detection: Must have a minimum error novel method is suggested to decrease the complexity detection rate, i.e. there are no significant edges to be without any performance degradation compared to the missed and no false edges are detected. original algorithm. Further enhancements to the 2) Good Localization: The space between actual and proposed algorithm can be made by parallel processing located edges should be minimal.
    [Show full text]
  • Edge Detection
    Edge Detection Outline Part 1 • Introduction Part 2 • Local Edge Operators • Marr-Hildreth Edge Detector – Gradient of image intensity • Multiscale Processing – Robert, Sobel and Prewitt operators – Second Derivative Operators • Canny Edge Detector – Laplacian of Gaussian • Edge Detection Performance References: D. Huttenlocher, “Edge Detection” (http://www.cs.wisc.edu/~cs766-1/readings/edge-detection- huttenlocher.ps) R. Gonzalez, R. Woods, “Digital Image Processing”, Addison Wesley, 1993. D. Marr, E. Hildreth, “Theory of Edge detection”, Proc. R. Soc. Lond., B. 207, 187-217, 1980. Image Processing Applications Edge Detection (by A.Campilho) 1 Edge Detection Introduction Initial considerations Edges are significant local intensity changes in the image and are important features to analyse an image. They are important clues to separate regions within an object or to identify changes in illumination or colour. They are an important feature in the early vision stages in the human eye. There are many different geometric and optical physical properties in the scene that can originate an edge in an image. Geometric: • Object boundary: eg a discontinuity in depth and/or surface colour or texture • Surface boundary: eg a discontinuity in surface orientation and/or colour or texture • Occlusion boundary: eg a discontinuity in depth and/or surface colour or texture Optical: • Specularity: eg direct reflection of light, such as a polished metallic surface • Shadows: from other objects or part of the same object • Interreflections: from other objects or part sof the same object • Surface markings, texture or colour changes Image Processing Applications Edge Detection (by A.Campilho) 2 Edge Detection Introduction Goals of edge detection: Primary To extract information about the two-dimensional projection of a 3D scene.
    [Show full text]
  • Edges and Binary Image Analysis
    1/25/2017 Edges and Binary Image Analysis Thurs Jan 26 Kristen Grauman UT Austin Today • Edge detection and matching – process the image gradient to find curves/contours – comparing contours • Binary image analysis – blobs and regions 1 1/25/2017 Gradients -> edges Primary edge detection steps: 1. Smoothing: suppress noise 2. Edge enhancement: filter for contrast 3. Edge localization Determine which local maxima from filter output are actually edges vs. noise • Threshold, Thin Kristen Grauman, UT-Austin Thresholding • Choose a threshold value t • Set any pixels less than t to zero (off) • Set any pixels greater than or equal to t to one (on) 2 1/25/2017 Original image Gradient magnitude image 3 1/25/2017 Thresholding gradient with a lower threshold Thresholding gradient with a higher threshold 4 1/25/2017 Canny edge detector • Filter image with derivative of Gaussian • Find magnitude and orientation of gradient • Non-maximum suppression: – Thin wide “ridges” down to single pixel width • Linking and thresholding (hysteresis): – Define two thresholds: low and high – Use the high threshold to start edge curves and the low threshold to continue them • MATLAB: edge(image, ‘canny’); • >>help edge Source: D. Lowe, L. Fei-Fei The Canny edge detector original image (Lena) Slide credit: Steve Seitz 5 1/25/2017 The Canny edge detector norm of the gradient The Canny edge detector thresholding 6 1/25/2017 The Canny edge detector How to turn these thick regions of the gradient into curves? thresholding Non-maximum suppression Check if pixel is local maximum along gradient direction, select single max across width of the edge • requires checking interpolated pixels p and r 7 1/25/2017 The Canny edge detector Problem: pixels along this edge didn’t survive the thresholding thinning (non-maximum suppression) Credit: James Hays 8 1/25/2017 Hysteresis thresholding • Use a high threshold to start edge curves, and a low threshold to continue them.
    [Show full text]
  • Lecture 10 Detectors and Descriptors
    This lecture is about detectors and descriptors, which are the basic building blocks for many tasks in 3D vision and recognition. We’ll discuss Lecture 10 some of the properties of detectors and descriptors and walk through examples. Detectors and descriptors • Properties of detectors • Edge detectors • Harris • DoG • Properties of descriptors • SIFT • HOG • Shape context Silvio Savarese Lecture 10 - 16-Feb-15 Previous lectures have been dedicated to characterizing the mapping between 2D images and the 3D world. Now, we’re going to put more focus From the 3D to 2D & vice versa on inferring the visual content in images. P = [x,y,z] p = [x,y] 3D world •Let’s now focus on 2D Image The question we will be asking in this lecture is - how do we represent images? There are many basic ways to do this. We can just characterize How to represent images? them as a collection of pixels with their intensity values. Another, more practical, option is to describe them as a collection of components or features which correspond to “interesting” regions in the image such as corners, edges, and blobs. Each of these regions is characterized by a descriptor which captures the local distribution of certain photometric properties such as intensities, gradients, etc. Feature extraction and description is the first step in many recent vision algorithms. They can be considered as building blocks in many scenarios The big picture… where it is critical to: 1) Fit or estimate a model that describes an image or a portion of it 2) Match or index images 3) Detect objects or actions form images Feature e.g.
    [Show full text]
  • Line Detection by Hough Transformation
    Line Detection by Hough transformation 09gr820 April 20, 2009 1 Introduction When images are to be used in different areas of image analysis such as object recognition, it is important to reduce the amount of data in the image while preserving the important, characteristic, structural information. Edge detection makes it possible to reduce the amount of data in an image considerably. However the output from an edge detector is still a image described by it’s pixels. If lines, ellipses and so forth could be defined by their characteristic equations, the amount of data would be reduced even more. The Hough transform was originally developed to recognize lines [5], and has later been generalized to cover arbitrary shapes [3] [1]. This worksheet explains how the Hough transform is able to detect (imperfect) straight lines. 2 The Hough Space 2.1 Representation of Lines in the Hough Space Lines can be represented uniquely by two parameters. Often the form in Equation 1 is used with parameters a and b. y = a · x + b (1) This form is, however, not able to represent vertical lines. Therefore, the Hough transform uses the form in Equation 2, which can be rewritten to Equation 3 to be similar to Equation 1. The parameters θ and r is the angle of the line and the distance from the line to the origin respectively. r = x · cos θ + y · sin θ ⇔ (2) cos θ r y = − · x + (3) sin θ sin θ All lines can be represented in this form when θ ∈ [0, 180[ and r ∈ R (or θ ∈ [0, 360[ and r ≥ 0).
    [Show full text]