Image Gradients and Gradient Filtering Computer Vision

Similar documents
Machine vision. Summary # 4. The mask for Laplacian is given

Machine vision, spring 2018 Summary 4

Edge Detection. Image Processing - Computer Vision

Laplacian Filters. Sobel Filters. Laplacian Filters. Laplacian Filters. Laplacian Filters. Laplacian Filters

Edge Detection. Introduction to Computer Vision. Useful Mathematics Funcs. The bad news

Lecture 6: Edge Detection. CAP 5415: Computer Vision Fall 2008

ECE Digital Image Processing and Introduction to Computer Vision. Outline

Introduction to Computer Vision

Filtering and Edge Detection

Roadmap. Introduction to image analysis (computer vision) Theory of edge detection. Applications

8 Basics of Hypothesis Testing

Lecture 7: Edge Detection

Filtering, Frequency, and Edges

Edge Detection. CS 650: Computer Vision

Lecture 04 Image Filtering

Local Enhancement. Local enhancement

CAP 5415 Computer Vision Fall 2011

Local enhancement. Local Enhancement. Local histogram equalized. Histogram equalized. Local Contrast Enhancement. Fig 3.23: Another example

CAP 5415 Computer Vision

Reading. 3. Image processing. Pixel movement. Image processing Y R I G Q

Vectors [and more on masks] Vector space theory applies directly to several image processing/ representation problems

Edge Detection in Computer Vision Systems

Kalman Filter Computer Vision (Kris Kitani) Carnegie Mellon University

Advanced Edge Detection 1

Today s lecture. Local neighbourhood processing. The convolution. Removing uncorrelated noise from an image The Fourier transform

Review Smoothing Spatial Filters Sharpening Spatial Filters. Spatial Filtering. Dr. Praveen Sankaran. Department of ECE NIT Calicut.

Lecture 8: Interest Point Detection. Saad J Bedros

Digital Image Processing. Lecture 6 (Enhancement) Bu-Ali Sina University Computer Engineering Dep. Fall 2009

Video and Motion Analysis Computer Vision Carnegie Mellon University (Kris Kitani)

Feature detection.

Lesson Objectives: we will learn:

LIMITS AT INFINITY MR. VELAZQUEZ AP CALCULUS

Basics on 2-D 2 D Random Signal

PDEs in Image Processing, Tutorials

UNIT 3. Rational Functions Limits at Infinity (Horizontal and Slant Asymptotes) Infinite Limits (Vertical Asymptotes) Graphing Rational Functions

TRACKING and DETECTION in COMPUTER VISION Filtering and edge detection

Image preprocessing in spatial domain

Intensity Transformations and Spatial Filtering: WHICH ONE LOOKS BETTER? Intensity Transformations and Spatial Filtering: WHICH ONE LOOKS BETTER?

Open Access Measuring Method for Diameter of Bearings Based on the Edge Detection Using Zernike Moment

Edge Detection. Computer Vision P. Schrater Spring 2003

Edges and Scale. Image Features. Detecting edges. Origin of Edges. Solution: smooth first. Effects of noise

Blobs & Scale Invariance

Computer Vision & Digital Image Processing

Chapter 5: Integrals

15. LECTURE 15. I can calculate the dot product of two vectors and interpret its meaning. I can find the projection of one vector onto another one.

5.9 Representations of Functions as a Power Series

Why does a lower resolution image still make sense to us? What do we lose? Image:

I Chen Lin, Assistant Professor Dept. of CS, National Chiao Tung University. Computer Vision: 4. Filtering

Edge Detection PSY 5018H: Math Models Hum Behavior, Prof. Paul Schrater, Spring 2005

Mathematics 1a, Section 4.3 Solutions

Outline. Convolution. Filtering

Aim: How do we prepare for AP Problems on limits, continuity and differentiability? f (x)

CHAPTER ONE FUNCTIONS AND GRAPHS. In everyday life, many quantities depend on one or more changing variables eg:

Image Filtering. Slides, adapted from. Steve Seitz and Rick Szeliski, U.Washington

Linear Diffusion and Image Processing. Outline

Robert Collins CSE586, PSU Intro to Sampling Methods

Exercise 4: Intensity and distance (and color) The method of standard candles and the inverse-square law of brightness

UNIT 3. Recall From Unit 2 Rational Functions

f (t) K(t, u) d t. f (t) K 1 (t, u) d u. Integral Transform Inverse Fourier Transform

Spectral Processing. Misha Kazhdan

AP Calculus Summer Packet

Logarithmic Functions and Their Graphs

Completion Date: Monday February 11, 2008

Graphing Linear Inequalities

Blob Detection CSC 767

Image Segmentation: Definition Importance. Digital Image Processing, 2nd ed. Chapter 10 Image Segmentation.

19 : Slice Sampling and HMC

Total Variation Image Edge Detection

Math Vector Calculus II

Suppose we have a one-dimensional discrete signal f(x). The convolution of f with a kernel g is defined as h(x) = f(x)*g(x) = w 1. f(i)g(x i), (3.

Feature extraction: Corners and blobs

Math 233. Directional Derivatives and Gradients Basics

DIFFERENTIATION AND INTEGRATION PART 1. Mr C s IB Standard Notes

1.1 Introduction to Limits

Multimedia Databases. Previous Lecture. 4.1 Multiresolution Analysis. 4 Shape-based Features. 4.1 Multiresolution Analysis

Lecture Outline. Basics of Spatial Filtering Smoothing Spatial Filters. Sharpening Spatial Filters

Multimedia Databases. 4 Shape-based Features. 4.1 Multiresolution Analysis. 4.1 Multiresolution Analysis. 4.1 Multiresolution Analysis

Multimedia Databases. Wolf-Tilo Balke Philipp Wille Institut für Informationssysteme Technische Universität Braunschweig

Instructor Quick Check: Question Block 12

Used to extract image components that are useful in the representation and description of region shape, such as

Image Filtering, Edges and Image Representation

Medical Image Analysis

Math (P)Review Part II:

CSC321 Lecture 9: Generalization

Functions Functions and Modeling A UTeach/TNT Course

Energy Tensors: Quadratic, Phase Invariant Image Operators

Additional Pointers. Introduction to Computer Vision. Convolution. Area operations: Linear filtering

Differentiation of x n.

Robert Collins CSE598G Mean-Shift Blob Tracking through Scale Space

Notes on the Z-transform, part 4 1

Lecture 7: The wave equation: higher dimensional case

Exercise 8: Intensity and distance (and color) The method of standard candles and the inverse-square law of brightness

Chapter 2 Derivatives

CEE598 - Visual Sensing for Civil Infrastructure Eng. & Mgmt.

MAT389 Fall 2016, Problem Set 4

Multiple Choice. Circle the best answer. No work needed. No partial credit available. is continuous.

Gaussian derivatives

(z 0 ) = lim. = lim. = f. Similarly along a vertical line, we fix x = x 0 and vary y. Setting z = x 0 + iy, we get. = lim. = i f

Image enhancement. Why image enhancement? Why image enhancement? Why image enhancement? Example of artifacts caused by image encoding

Transcription:

Image Gradients and Gradient Filtering 16-385 Computer Vision

What is an image edge?

Recall that an image is a 2D function f(x)

edge edge How would you detect an edge? What kinds of filter would you use?

The Sobel filter 2 0-2 a derivative filter (with some smoothing) Filter returns large response on vertical or horizontal lines?

The Sobel filter 1 2 1 0 0 0-1 -2-1 a derivative filter (with some smoothing) Filter returns large response on vertical or horizontal lines? Is the output always positive?

The Sobel filter 1 2 1 0 0 0-1 -2-1 a derivative filter (with some smoothing) Responds to horizontal lines Output can be positive or negative

Output of which Sobel filter? Output of which Sobel filter? How do you visualize negative derivatives/gradients?

Derivative in X direction Derivative in Y direction Visualize with scaled absolute value

The Sobel filter 2 0-2 Where does this filter come?

Do you remember this from high school? f 0 (x) = lim h!0 f(x + h) f(x) h

Do you remember this from high school? The derivative of a function f at a point x is defined by the limit f 0 (x) = lim h!0 f(x + h) f(x) h Approximation of the derivative when h is small This definition is based on the forward difference but...

it turns out that using the central difference is more accurate f 0 (x) = lim h!0 f(x +0.5h) f(x 0.5h) h How do we compute the derivative of a discrete signal? 10 20 10 200 210 250 250

it turns out that using the central difference is more accurate f 0 (x) = lim h!0 f(x +0.5h) f(x 0.5h) h How do we compute the derivative of a discrete signal? 10 20 10 200 210 250 250 f 0 (x) = f(x + 1) f(x 1) 2 = 210 10 2 = 100-1 0 1 1D derivative filter

Decomposing the Sobel filter 2 0-2 = 1 2 1 Sobel What this?

Decomposing the Sobel filter 2 0-2 = 1 2 1 Sobel weighted average and scaling

Decomposing the Sobel filter What this? 2 0-2 = 1 2 1 Sobel weighted average and scaling

Decomposing the Sobel filter What this? 2 0-2 = 1 2 1 x-derivative Sobel weighted average and scaling

The Sobel filter only returns the x and y edge responses. How can you compute the image gradient?

How do you compute the image gradient? Choose a derivative filter S x = 2 0-2 S y = 1 2 1 0 0 0-1 -2-1 What is this filter called? Run filter over image @f @x = S x f @f @y = S y f What are the dimensions? Image gradient rf = apple @f @x, @f @y What are the dimensions?

Matching that Gradient! (a) (1) rf = apple 0, f y (b) (2) rf = apple f x, 0 (c) (3) rf = apple f x, f y

Image Gradient Gradient in x only Gradient in y only Gradient in both x and y rf = apple f x, 0 rf = apple 0, f y rf = apple f x, f y Gradient direction Gradient magnitude??

Image Gradient Gradient in x only Gradient in y only Gradient in both x and y rf = apple f x, 0 rf = apple 0, f y rf = apple f x, f y Gradient direction = tan 1 f y / f x How does the gradient direction relate to the edge? Gradient magnitude f = s f x 2 + f y 2 What does a large magnitude look like in the image?

Common derivative filters Sobel 2 0-2 1 2 1 0 0 0 Scharr 3 0-3 10 0-10 3 10 3 0 0 0-1 -2-1 3 0-3 -3-10 -3 Prewitt 1 1 1 0 0 0-1 -1-1 Roberts 0 1-1 0 1 0 0-1

Intensity plot How do you find the edge from this signal?

How do you find the edge from this signal? Intensity plot Use a derivative filter!

How do you find the edge from this signal? Intensity plot Use a derivative filter! Derivative plot What happened?

How do you find the edge from this signal? Intensity plot Use a derivative filter! Derivative plot Derivative filters are sensitive to noise

Input Gaussian Smoothed input Derivative Output Don t forget to smooth before running derivative filters!

Laplace filter A.K.A. Laplacian, Laplacian of Gaussian (LoG), Marr filter, Mexican Hat Function

Laplace filter A.K.A. Laplacian, Laplacian of Gaussian (LoG), Marr filter, Mexican Hat Function

Laplace filter A.K.A. Laplacian, Laplacian of Gaussian (LoG), Marr filter, Mexican Hat Function

first-order finite difference f 0 (x) = lim h!0 f(x +0.5h) f(x 0.5h) h derivative filter second-order finite difference Laplace filter???

first-order finite difference f 0 (x) = lim h!0 f(x +0.5h) f(x 0.5h) h derivative filter second-order finite difference Laplace filter 1-2 1

Input Laplacian Output?

Input Laplacian Output Zero crossings are more accurate at localizing edges Second derivative is noisy

2D Laplace filter 1-2 1 1D Laplace filter????????? 2D Laplace filter

2D Laplace filter 1-2 1 1D Laplace filter????????? 2D Laplace filter hint

2D Laplace filter 1-2 1 1D Laplace filter 0 1 0 1-4 1 0 1 0 2D Laplace filter If the Sobel filter approximates the first derivative, the Laplace filter approximates...?

Laplace filter Laplace filter with smoothing without smoothing

Laplace filter Sobel filter What s different between the two results?

zero-crossing peak Laplace Sobel Zero crossings are more accurate at localizing edges (but not very convenient)

Gaussian Derivative of Gaussian 2D Gaussian Filters Laplacian of Gaussian