CSC508 What You Should Be Doing Code, code, code –Programming Gaussian Convolution Sobel Edge Operator.

Slides:



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

Edges and Contours– Chapter 7
EDGE DETECTION ARCHANA IYER AADHAR AUTHENTICATION.
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
CSSE463: Image Recognition Day 6 Yesterday: Yesterday: Local, global, and point operators all operate on entire image, changing one pixel at a time!! Local,
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.
Image processing. Image operations Operations on an image –Linear filtering –Non-linear filtering –Transformations –Noise removal –Segmentation.
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.
Computer Vision - A Modern Approach
Edge Detection Phil Mlsna, Ph.D. Dept. of Electrical Engineering
Edge Detection Today’s reading Forsyth, chapters 8, 15.1
Introduction to Computer Vision CS / ECE 181B Thursday, April 22, 2004  Edge detection (HO #5)  HW#3 due, next week  No office hours today.
EE663 Image Processing Edge Detection 3 Dr. Samir H. Abdul-Jauwad Electrical Engineering Department King Fahd University of Petroleum & Minerals.
Lecture 4: Edge Based Vision Dr Carole Twining Thursday 18th March 2:00pm – 2:50pm.
Edge Detection Today’s readings Cipolla and Gee –supplemental: Forsyth, chapter 9Forsyth Watt, From Sandlot ScienceSandlot Science.
3-D Computational Vision CSc Canny Edge Detection.
Computer Vision Spring ,-685 Instructor: S. Narasimhan WH 5409 T-R 10:30 – 11:50am.
G52IIP, School of Computer Science, University of Nottingham 1 Edge Detection and Image Segmentation.
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.
Edge Detection Today’s reading Cipolla & Gee on edge detection (available online)Cipolla & Gee on edge detection Szeliski, Ch 4.1.2, From Sandlot.
Detection of nerves in Ultrasound Images using edge detection techniques NIRANJAN TALLAPALLY.
Lecture 6: Edge Detection CAP 5415: Computer Vision Fall 2008.
G52IVG, School of Computer Science, University of Nottingham 1 Edge Detection and Image Segmentation.
Instructor: S. Narasimhan
Edge detection Goal: Identify sudden changes (discontinuities) in an image Intuitively, most semantic and shape information from the image can be encoded.
CSC508 Convolution Operators. CSC508 Convolution Arguably the most fundamental operation of computer vision It’s a neighborhood operator –Similar to the.
Digital Image Processing Lecture 16: Segmentation: Detection of Discontinuities Prof. Charlene Tsai.
Edges.
CSSE463: Image Recognition Day 6 Yesterday: Local, global, and point operators use different context, but all Yesterday: Local, global, and point operators.
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.
Announcements Project 0 due tomorrow night. Edge Detection Today’s readings Cipolla and Gee (handout) –supplemental: Forsyth, chapter 9Forsyth For Friday.
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.
Canny Edge Detection Using an NVIDIA GPU and CUDA Alex Wade CAP6938 Final Project.
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
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.
Detection of nerves in Ultrasound Images using edge detection techniques NIRANJAN TALLAPALLY.
1 Edge Operators a kind of filtering that leads to useful features.
Edge Detection slides taken and adapted from public websites:
Edge Detection Phil Mlsna, Ph.D. Dept. of Electrical Engineering Northern Arizona University.
Chapter 10 Image Segmentation
Linear Filters and Edges Chapters 7 and 8
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.
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.
Dr. Chang Shu COMP 4900C Winter 2008
Edge Detection Today’s reading
a kind of filtering that leads to useful features
a kind of filtering that leads to useful features
Edge Detection Today’s reading
Canny Edge Detector.
Edge Detection Today’s reading
Edge Detection Today’s readings Cipolla and Gee Watt,
IT472 Digital Image Processing
IT472 Digital Image Processing
CAP 5415 Computer Vision Fall 2004
Presentation transcript:

CSC508 What You Should Be Doing Code, code, code –Programming Gaussian Convolution Sobel Edge Operator

CSC508 Effects of Threshold Selection

CSC508 Effects of Threshold Selection The preceding images were edge-detected with a Sobel operator then binarized with various thresholds The overall trend is predictable but the individual results are not This threshold dependency is the curse of computer vision We need smarter algorithms

CSC508 Scale-Space Processing One method of dealing with the threshold dependency is through scale-space processing –An image is processed at various scales revealing different sets of features at each scale –Features common to all [or many] sets are deemed “important”

CSC508 Gaussian Pyramid Selection of the “appropriate” parameters (sigma and width) of a Gaussian filter is analogous to setting a binarization threshold The Gaussian Pyramid helps in such a situation

CSC508 Gaussian Pyramid Formation 1.Select a sigma and width 2.Filter the image 3.Subsample the image by removing every other line and sample –Resultant image is ¼ the size of the original 4.Repeat on the subsampled image

CSC508 Gaussian Pyramid Formation You end up with a series of images (a pyramid) each exposing different features –Coarse features at the top of the pyramid –Fine features at the bottom You can now use the coarse features to select where to concentrate your processing of the fine features

CSC508 Effects of Threshold Selection Another method of dealing with the threshold dependency is through more complex algorithms

CSC508 A Better Kernel The Sobel mask is a derivative mask (computes the weighted difference of neighborhood pixels) So is the Laplacian From calculus: the 2 nd derivative of a signal is zero when the derivative magnitude is extremal

CSC508 A Better Edge Detector Combining these observations we can derive the Laplacian-Gaussian filter due to Marr and Hildreth –Also known as a DoG (Difference of Gaussians) because it can be approximated by subtracting two Gaussian kernels of same width and differing sigmas

CSC508 Laplacian-Gaussian Filter Bypassing the math and jumping to the results of applying the rules of calculus… Similar in form to the Gaussian kernel

CSC508 Laplacian-Gaussian Filter In 1 dimension it looks like this…

Laplacian-Gaussian Filter In 2 dimensions it looks like this… CSC508

Laplacian-Gaussian Filter Convolution with this kernel results in edge magnitudes of both positive and negative values We’re interested in where the sign changes occur These are where the edges are (recall the calculus result)

Zero-Crossing Detection For each pixel, look at it’s 4 previous (in scan line order) neighbors If the sign is different in the edge detected image, there is an edge at pixel I(i, j) in the original image Why don’t we look at the other 4 neighbors? CSC i j i j

Width = 15, Sigma = 1.6

CSC508 Comparable Sobel vs. Laplacian-Gaussian

CSC508 Width = 15, Sigma = 2.6

CSC508 Comparable Sobel vs. Laplacian-Gaussian

CSC508 Improvement Results of the Marr-Hildreth method are better than those of the Sobel/Binarization method –Edge placement accuracy –Removal of edges due to noise But, there’s still something missing…

CSC508 What Else Can We Do? What are we ignoring in the following edge detection processes? 1.Gaussian filter 2.Sobel edge detection 3.Threshold based binarization of Sobel magnitude And 1.Laplacian-Gaussian filter 2.Zero crossing detection

CSC508 Context! We merely selected each edge based on its magnitude and zero-crossing We completely ignored its immediate surroundings Why is this bad? –Detects edges we don’t want Prone to noise Prone to clutter –Doesn’t detect edges we do want Weak magnitude edges are thresholded (thresheld?) away We need a smarter algorithm!

CSC508 Canny Edge Detector John Canny – MIT 1986 Developed a process (series of steps) for extracting edges from an image –Gaussian smoothing of input image –Basic derivative operator to detect edge candidates –Removal of edges that are clustered around a single location –Adaptive thresholding algorithm for final edge selection

CSC508 Canny Edge Detector Gaussian smooth original image –Reduce the effects of noise –In the code I posted the implementation is somewhat strange Broken up based on filter size Some odd scaling goes on –This is due to constraints of the original system on which the implementation was created

CSC508 Canny Edge Detector Select two thresholds –The high threshold is used to identify large magnitude (strong) edges This is applied first –The low threshold is used to identify small (weak) magnitude edges that are spatially connected to large (strong) magnitude edges –My code accepts these as percentages of the total range of edge magnitudes

CSC508 Canny Edge Detector Non-maximal Suppression –This process thins out clusters of edge points –Ideal step edges rarely occur in natural images

CSC508 Non-Maximal Suppression Life would be grand if edges looked like this (1 dimension) But, in reality they usually look like this (1 dimension) This is why our Sobel magnitude images look so awful

CSC508 Non-Maximal Suppression We need to employ an algorithm that eliminates all the weak edges (due to noise) and retains the strong edges (due to signal) The basic algorithm is given on page 180 of the textbook (this actually combines two steps) –The implementation in the posted code is somewhat cryptic but follows the basic philosophy which is

CSC508 Non-Maximal Suppression Find an intermediate or strong edge Search a neighborhood along the direction of the gradient (perpendicular to the edge) for stronger edges Eliminate those that are of lesser magnitude than the strongest found The result is the removal of [relatively] weak edges in the neighborhood of a [relatively] strong edge Notice that we have not applied any thresholds to this point in the process (other than Gaussian kernel parameters)

Non-Maximal Suppression Assume the “boldness” of the arrow represents the magnitude of the edge Assume the direction of the arrow represents the direction of the edge (perpendicular to the direction of the gradient) CSC508

Non-Maximal Suppression

CSC508 Contour Following We now have a set of “reasonable” candidate edges –We used some local context to eliminate some candidates (non-maximal suppression) Next we use global context to eliminate additional candidates

CSC508 Contour Following Find a strong edge –Apply the high threshold –This isn’t so bad as we can set it very high with the expectation that some real edges will meet this criteria

CSC508 Strong Edges

CSC508 Contour Following Compute the gradient direction of the edge –Similar to the computation done in Sobel Search for a neighboring edge in the direction of the edge (perpendicular to the gradient) that is above the weak threshold –We’re using a strong edge as an anchor point for a contour of weak and strong edges – known as Hysteresis Repeat the process until we have no more connected weak edges Find the next disconnected strong edge and repeat the entire contour following process

CSC508 Final Thinning An additional thinning step is performed This is similar to the non-maximal suppression step Just one last clean-up operation

CSC508 Final Results

CSC508 Canny Summary All edgesWeak edges Strong edges Contours

CSC508 Canny Summary Through more complex processing we arrive at a set of edges in which we have confidence –Minimal reliance on thresholds The cost is complex (slow, memory intensive) processing We must trade resources for accuracy!

CSC508 Things To Do Reading for Next (few) Week(s) –Chapter 9 – Texture 9.1 – 9.3 describe one approach I’ll describe a second approach –Chapter 14 – Segmentation by Clustering We’ll consider various clustering methods –Chapter 15 – Segmentation by Models We’ll analyze the Hough Transform

CSC508 Things To Do Additions to current programming assignment –Use your Gaussian filter code to create a Gaussian Pyramid of Lenna of 4 levels Resultant image sizes: (512x512), (256x256), (128x128), (64x64) –Use your Sobel filter code to create edge images of the Gaussian Pyramid images –Turn in your resultant image files –Comment on the results