Edge Detection (with implementation on a GPU) And Text Recognition (if time permits) Jared Barnes Chris Jackson.

Slides:



Advertisements
Similar presentations
Advanced Computer Graphics (Spring 2006) COMS 4162, Lecture 4: Image Processing 1 Ravi Ramamoorthi
Advertisements

Spatial Filtering (Chapter 3)
Edges and Contours– Chapter 7
Advanced Computer Graphics CSE 190 [Spring 2015], Lecture 4 Ravi Ramamoorthi
EDGE DETECTION ARCHANA IYER AADHAR AUTHENTICATION.
Instructor: Mircea Nicolescu Lecture 6 CS 485 / 685 Computer Vision.
Sliding Window Filters and Edge Detection Longin Jan Latecki Computer Graphics and Image Processing CIS 601 – Fall 2004.
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.
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
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)
Canny Edge Detector1 1)Smooth image with a Gaussian optimizes the trade-off between noise filtering and edge localization 2)Compute the Gradient magnitude.
Edge Detection Today’s reading Forsyth, chapters 8, 15.1
1 Image Filtering Readings: Ch 5: 5.4, 5.5, 5.6,5.7.3, 5.8 (This lecture does not follow the book.) Images by Pawan SinhaPawan Sinha formal terminology.
Filters and Edges. Zebra convolved with Leopard.
Lecture 2: Image filtering
The Segmentation Problem
Edge Detection Today’s readings Cipolla and Gee –supplemental: Forsyth, chapter 9Forsyth Watt, From Sandlot ScienceSandlot Science.
Edge detection Goal: Identify sudden changes (discontinuities) in an image Intuitively, most semantic and shape information from the image can be encoded.
3-D Computational Vision CSc Canny Edge Detection.
Multimedia Systems & Interfaces Karrie G. Karahalios Spring 2007.
G52IIP, School of Computer Science, University of Nottingham 1 Edge Detection and Image Segmentation.
CAP 5415 Computer Vision Fall 2004
Discrete Images (Chapter 7) Fourier Transform on discrete and bounded domains. Given an image: 1.Zero boundary condition 2.Periodic boundary condition.
University of Kurdistan Digital Image Processing (DIP) Lecturer: Kaveh Mollazade, Ph.D. Department of Biosystems Engineering, Faculty of Agriculture,
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 From Sandlot ScienceSandlot Science.
G52IVG, School of Computer Science, University of Nottingham 1 Edge Detection and Image Segmentation.
CSC508 What You Should Be Doing Code, code, code –Programming Gaussian Convolution Sobel Edge Operator.
Edge detection Goal: Identify sudden changes (discontinuities) in an image Intuitively, most semantic and shape information from the image can be encoded.
EE 4780 Edge Detection.
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.
October 7, 2014Computer Vision Lecture 9: Edge Detection II 1 Laplacian Filters Idea: Smooth the image, Smooth the image, compute the second derivative.
Digital Image Processing Lecture 16: Segmentation: Detection of Discontinuities Prof. Charlene Tsai.
Edge Based Segmentation Xinyu Chang. Outline Introduction Canny Edge detector Edge Relaxation Border Tracing.
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.
Digital Image Processing Lecture 16: Segmentation: Detection of Discontinuities May 2, 2005 Prof. Charlene Tsai.
Announcements Project 0 due tomorrow night. Edge Detection Today’s readings Cipolla and Gee (handout) –supplemental: Forsyth, chapter 9Forsyth For Friday.
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.
Canny Edge Detection. 5 STEPS 5 STEPS Apply Gaussian filter to smooth the image in order to remove the noise Apply Gaussian filter to smooth the image.
Machine Vision Edge Detection Techniques ENT 273 Lecture 6 Hema C.R.
Digital Image Processing
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.
Sliding Window Filters Longin Jan Latecki October 9, 2002.
Edges Edges = jumps in brightness/color Brightness jumps marked in white.
April 21, 2016Introduction to Artificial Intelligence Lecture 22: Computer Vision II 1 Canny Edge Detector The Canny edge detector is a good approximation.
Winter in Kraków photographed by Marcin Ryczek
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,
Sobel edge detector: Review
Digital Image Processing Lecture 16: Segmentation: Detection of Discontinuities Prof. Charlene Tsai.
Sobel edge detector: Review
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.
Dr. Chang Shu COMP 4900C Winter 2008
Digital Image Processing
Canny Edge Detector.
Canny Edge Detector Smooth image with a Gaussian
Winter in Kraków photographed by Marcin Ryczek
Presentation transcript:

Edge Detection (with implementation on a GPU) And Text Recognition (if time permits) Jared Barnes Chris Jackson

 Edge Detection ◦ Wikipedia: Identifying points in a digital image at which the image has discontinuities.

 John Canny  “A Computational Approach to Edge Detection” 

1. Noise Removal 2. Image Gradient Computation 3. Non-Maximum Suppression 4. Hysteresis Thresholding

 Gaussian Smoothing or Blurring  A pixel is changed based on a weighted average of itself and its neighbors  The number of neighbors (3x3, 5x5) and the relative weights can vary 3D Gaussian Distribution Normalized 2D Gaussian Approximation ages/articles/article-9/2d_distribution.gif s/spring08-22C251/homework/canny.pdf

Too much About right /tumblr_inline_mhcv1l0EZB1qz4rgp.png content/uploads/2013/03/gaussian-blur-thumbnail.jpg SpottySmooth

GxGx GyGy Sobel Operator (2 kernels) Then round to: 0° =←→ 90°=↑↓ 45°=↗↙ 135°=↘↖

X Gradient (Horizontal Edges) Y Gradient (Vertical Edges)

 Make edges exactly one pixel thick  Look at the gradient magnitude of your 2 neighbors in the direction of your angle Example 2 Angle = 0° ←→ Example 1 Angle = 135° ↘↖ Keep it! Kill it!

Thick Edges (Gradient Magnitude) Thin Edges (Gradient Magnitude)

 Two thresholds are better than one!  If a pixel’s value is above T high, it’s an edge.  If a pixel’s value is below T low, it’s not an edge.  If a pixel’s value is between T high and T low, it might be an edge (provided it is connected to an actual edge) T high = 45T low =

1. Smooth image to reduce noise 2. Calculate X & Y derivatives to get edges 3. Thin all edge widths to 1 pixel 4. Remove weak, unconnected edges (ta da!)

 How do we parallelize the Canny Edge Detector?

 Convolution – Independent of order ImageKernel Element-wise Multiplication 230 Sum All Values 11 Divide by Kernel Sum 11

 Convolve a Gaussian Kernel with the image  Each GPU core can convolve each pixel in the image individually with the Gaussian Kernel  One thread per pixel, each performing 9 multiplies, 9 adds, and 1 division  Embarrassingly Parallel with huge speedup

 Convolve two Sobel Kernels with the image  Wait, convolution again?  Same as previous step – we can even reuse the convolution function!

 Comparing 3 pixel gradient magnitudes and clearing the middle pixel or leaving it alone  Similar to convolution… but simpler!  Each GPU thread owns a pixel: 1.Check gradient angle of pixel 2.Compare this pixel’s magnitude with two neighbors in the direction of its angle 3.If I’m greater than those neighbors, leave me alone; otherwise, mark me as “not an edge”  Less speedup than steps 1 and 2

 Mark pixels > T high as strong edges  Mark pixels < T low as not edges  Mark remaining pixels as weak edges if they connect to a strong edge  Typically implemented with recursion  Each thread with a weak-edge pixel looks at nearest 2 neighbors to find a strong-edge pixel  With identical algorithms on CPU and GPU, speedup is marginal (memory accesses, not much processing)

Wikipedia: The mechanical or electronic conversion of images of printed text into computer-readable text.

 Label Connected Components  Look For Letters  Adjust for disconnected letters HELLO WORLD HELLOWORLDHELLOWORLD E F ? ü j i

 Create a list of components in the image  A component is simply a set of connected edges 1. Label each edge pixel with a unique component ID 2. Examine each pixel’s 8 touching neighbors and set that pixel’s ID to the smallest neighbor ID 3. Repeat step 2 until no pixel IDs are changed

 Uhh… what’s a letter?  How do we know it’s a letter?  How does the computer know it’s a letter?

 Letters are represented by a vector of numbers indicating the ratio of black pixels to white pixels in each division of the letter-image. A

 Compute how closely each labelled component matches each letter in your alphabet  The component is then marked with whichever letter it most closely matches

 Letters like ‘i’ and ‘j’ have floating parts  Sometimes edge detection may accidentally break up a letter  A letter vector should then get an additional property indicating vertical discontinuity T E R V EL EO R………C T 0/1