Sobel edge detector: Review

Slides:



Advertisements
Similar presentations
Boundary Detection - Edges Boundaries of objects –Usually different materials/orientations, intensity changes.
Advertisements

Spatial Filtering (Chapter 3)
EDGE DETECTION ARCHANA IYER AADHAR AUTHENTICATION.
Instructor: Mircea Nicolescu Lecture 6 CS 485 / 685 Computer Vision.
October 2, 2014Computer Vision Lecture 8: Edge Detection I 1 Edge Detection.
1Ellen L. Walker Edges Humans easily understand “line drawings” as pictures.
Edge and Corner Detection Reading: Chapter 8 (skip 8.1) Goal: Identify sudden changes (discontinuities) in an image This is where most shape information.
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
Lecture 4 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.
Canny Edge Detector1 1)Smooth image with a Gaussian optimizes the trade-off between noise filtering and edge localization 2)Compute the Gradient magnitude.
Filters and Edges. Zebra convolved with Leopard.
EE663 Image Processing Edge Detection 3 Dr. Samir H. Abdul-Jauwad Electrical Engineering Department King Fahd University of Petroleum & Minerals.
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.
Announcements Send to the TA for the mailing list For problem set 1: turn in written answers to problems 2 and 3. Everything.
Computer Vision P. Schrater Spring 2003
3-D Computational Vision CSc Canny Edge Detection.
Computer Vision Spring ,-685 Instructor: S. Narasimhan WH 5409 T-R 10:30 – 11:50am.
CAP 5415 Computer Vision Fall 2004
Edge Detection (with implementation on a GPU) And Text Recognition (if time permits) Jared Barnes Chris Jackson.
University of Kurdistan Digital Image Processing (DIP) Lecturer: Kaveh Mollazade, Ph.D. Department of Biosystems Engineering, Faculty of Agriculture,
Divide by 8 page – groups of 8 Division Sentence 0 ÷ 8 = 0.
Image Processing Edge detection Filtering: Noise suppresion.
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.
Instructor: S. Narasimhan
Many slides from Steve Seitz and Larry Zitnick
CSC508 Convolution Operators. CSC508 Convolution Arguably the most fundamental operation of computer vision It’s a neighborhood operator –Similar to the.
Edge Based Segmentation Xinyu Chang. Outline Introduction Canny Edge detector Edge Relaxation Border Tracing.
Chapter 9: Image Segmentation
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],
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.
Course 5 Edge Detection. Image Features: local, meaningful, detectable parts of an image. edge corner texture … Edges: Edges points, or simply edges,
Canny Edge Detection Using an NVIDIA GPU and CUDA Alex Wade CAP6938 Final Project.
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.
Lecture 8: Edges and Feature Detection
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.
Spatial Filtering (Chapter 3) CS474/674 - Prof. Bebis.
April 21, 2016Introduction to Artificial Intelligence Lecture 22: Computer Vision II 1 Canny Edge Detector The Canny edge detector is a good approximation.
Concept 1: Computing Weighted Sum. Is an operation between two tables of numbers, usually between an image and weights. Typically, if one table is smaller,
Digital Image Processing (DIP)
Image Filtering Spatial filtering
Sobel edge detector: Review
Digital Image Processing Lecture 16: Segmentation: Detection of Discontinuities Prof. Charlene Tsai.
Fourier Transform: Real-World Images
Edge Detection CS 678 Spring 2018.
Edge Detection The purpose of Edge Detection is to find jumps in the brightness function (of an image) and mark them.
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.
Levi Smith REU Week 1.
Review: Linear Systems
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.
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
Introduction to Artificial Intelligence Lecture 22: Computer Vision II
CAP 5415 Computer Vision Fall 2004
Presentation transcript:

Sobel edge detector: Review First these two masks are applied to the image. The magnitude of the gradient is then calculated using the formula which we have seen before: Then, the two output tables of the masks and image are combined using the magnitude formula. This gives us a smoothened gradient magnitude output.

Algorithms for edge detection: Review Compute gradients Compute magnitude Threshold magnitude Smoothing, followed by Algorithm 1 ie, the Sobel edge detector The association property of convolutions

Sobel vs. Canny edge detectors: Review Smoothing All ones / #ones A Gaussian table/filter Gradients Horizontal & vertical gradients Magnitudes of gradients Directions of gradients n/a tan(dir) = Gy / Gx Flags Non-maximum Suppression Thresholding One threshold Double thresholding

Normally called Hysteresis Thresholding We call it Double Thresholding Canny Part Three Normally called Hysteresis Thresholding We call it Double Thresholding

Double Thresholds Let us first review what we have produced so far: A Magnitude Image A Peaks Image

Double Thresholds Two thresholds will be used Will be applied to Magnitude image, but only to places that have shown up as peaks Two thresholds, a HIGH and a LOW If Mag exceeds HI, definitely pass pixel to Final If Mag lower than LO, definitely never be in final If Mag is between HI and LO, then check if geographically adjacent to a position (pixel) that has made it in to Final; if yes, then pass pixel to Final

Double Thresholds The typical way to write this is using Recursion. Simply scan the image, looking only at Peaks, and at each Peak, ask if Mag exceeds HI; if No, do nothing (go on to next peak); if Yes, then call a recursive procedure on each of the 8 neighbors The recursive procedure must use LO to determine if it should call itself again on the 8 neighbors of the peak it was given. If exceeds LO, call recursion.

Double Thresholds Since we do NOT assume that all students in class know how to write recursion, here is an iterative, simple-to-follow, but inefficient procedure: For i, For j if peaks(ij) == ON if mag(ij)> HI peaks(ij) = OFF, flags(ij) = ON else if mag(ij)< LO peaks(ij)=flags(ij)= OFF. Then, do the WHILE-LOOP from next slide.

Simple, inefficient cont’d moretodo=ON While moretodo==ON moretodo= OFF For i, For j if peaks(ij) == ON For p (-1 to +1), For q (-1 to +1) if flags(i+p,j+q) == ON peaks(ij) = OFF, flags(ij) = ON, moretodo=ON ALL DONE

Simple, inefficient : All on One slide For i, For j if peaks(ij) == ON if mag(ij)> HI peaks(ij) = OFF, final(ij) = ON else if mag(ij)< LO peaks(ij)=flags(ij)= OFF. moretodo=ON While moretodo==ON moretodo= OFF For p (-1 to +1), For q (-1 to +1) if flags(i+p,j+q) == ON peaks(ij) = OFF, flags(ij) = ON, moretodo=ON ALL DONE

Simple, inefficient cont’d inefficient Case: LLLLLLLL L L MMMMMMMMMMMMMMM L M M L M HHHH M L M M M L M M M L MMMMMMMM M M M M M MMMMMMMMMMMMMMMMMM Thankfully, most M-chains are small.

Automatically get HI (and hence LO) Canny Part Four Automatically get HI (and hence LO)

Automatically Get HI Use Percent as input Then apply it to histogram of scaled mags In the histogram of scaled mags, find the Point that exceeds Percent of all, mark that as HI. Then, LO is 0.35 of HI

Details of Automatically Get HI Read Percent as input Compute Histogram of scaled magnitudes CutOff = Percent*Rows*Cols for (i= HistogramSize downto 1, i--) AreaOfTops += Histogram[i] if (AreaOfTops>CutOff) Break out of for-loop HI=I LO= .35*HI Histogram of scaled magnitudes obtained by: for i, for j (Histogram[Magnitude[I,j]])++

Details of Automatically Get HI In the histogram of scaled mags, find the Point that exceeds Percent of all, mark that as HI. x xxx x xx xxxxx xx xx x xx xxx xxxxxx xxx xx xx xxx xxxx x xxxxx xxxxxxx xxxx xxx xx xxxx xxxxxx xxx xxxxxx x xxxxxxxx xxxxx xxxx xxxx xxxxxxxxxxxxxxxx x xxxxxxx xxx xxxxxxxxxxxxxxx xxxxx xxxx xxxxxxxxxxxxxxxxxx xxx xxxxxxxxx xxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx -------------------------------------…-----------------

Complete Canny Algorithm Part One: Compute Gradient Magnitude Part Two: Compute Peaks Part Four: Automatically Computer HI and LO Part Three: Double Threshold

Sobel Canny Smoothing All ones / #ones A Gaussian table/filter Gradients Horizontal & vertical gradients Magnitudes of gradients Directions of gradients n/a tan(dir) = Gy / Gx Flags Non-maximum Suppression Thresholding One threshold Double thresholding Automatically choose thresholds Applicable

About the example code marrh.c -- Marrh.c uses flexible size masks (which we need), we will keep this part of the code. -- Marrh.c uses second derivatives, whereas we need only first derivatives (we need first x- and y- derivatives), so we will change the equation in the marrh.c line to be the first x-derivative. Read and delete this part -- Then, because we need two derivatives, we will double up on that line, i.e., make a copy of it to compute the y-derivative, finally ending up with two masks (xmask and ymask). See sobel.c for reference.

Canny Algorithm, Part One -- Then use the convolution code from marrh but remember to double up on it, to get two outputs. A good example showing how to do convolution. -- Then delete the code in marrh that is below the convolution code. -- Then bring in the sqrt (of squares) code from sobel. This will compute the magnitude, will scale it for output, and will print it out. -- At this point, you are done with Canny part One, and your code should produce output very similar to the Sobel magnitude image.

Notetaker Needed for CAP 4453 Notetaker Needed for CAP 4453.0001 - Earn up to 40 hours of community service