Image gradients and edges

Slides:



Advertisements
Similar presentations
November 12, 2013Computer Vision Lecture 12: Texture 1Signature Another popular method of representing shape is called the signature. In order to compute.
Advertisements

Lecture 2: Convolution and edge detection CS4670: Computer Vision Noah Snavely From Sandlot ScienceSandlot Science.
Motion illusion, rotating snakes. Slide credit Fei Fei Li.
Computational Photography CSE 590 Tamara Berg Filtering & Pyramids.
Edges and Binary Images
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
Edge detection. Edge Detection in Images Finding the contour of objects in a scene.
Announcements Mailing list: –you should have received messages Project 1 out today (due in two weeks)
Edge Detection Today’s reading Forsyth, chapters 8, 15.1
Lecture 2: Image filtering
Edge Detection Today’s readings Cipolla and Gee –supplemental: Forsyth, chapter 9Forsyth Watt, From Sandlot ScienceSandlot Science.
CSE 473/573 Computer Vision and Image Processing (CVIP) Ifeoma Nwogu Lecture 10 – Edges and Pyramids 1.
Edge detection Goal: Identify sudden changes (discontinuities) in an image Intuitively, most semantic and shape information from the image can be encoded.
Local invariant features Cordelia Schmid INRIA, Grenoble.
Lecture 2: Edge detection CS4670: Computer Vision Noah Snavely From Sandlot ScienceSandlot Science.
Image Processing Edge detection Filtering: Noise suppresion.
Lecture 3: Edge detection CS4670/5670: Computer Vision Kavita Bala From Sandlot ScienceSandlot Science.
CS 1699: Intro to Computer Vision Edges and Binary Images Prof. Adriana Kovashka University of Pittsburgh September 15, 2015.
CS 1699: Intro to Computer Vision Matlab Tutorial Prof. Adriana Kovashka University of Pittsburgh September 3, 2015.
Image Filtering Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem 02/02/10.
Image gradients and edges Tuesday, September 1 st 2015 Devi Parikh Virginia Tech Disclaimer: Many slides have been borrowed from Kristen Grauman, who may.
Local invariant features Cordelia Schmid INRIA, Grenoble.
CS654: Digital Image Analysis Lecture 24: Introduction to Image Segmentation: Edge Detection Slide credits: Derek Hoiem, Lana Lazebnik, Steve Seitz, David.
Edge detection Goal: Identify sudden changes (discontinuities) in an image Intuitively, most semantic and shape information from the image can be encoded.
CSE 185 Introduction to Computer Vision Edges. Scale space Reading: Chapter 3 of S.
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.
Edge Detection and Geometric Primitive Extraction Jinxiang Chai.
Brent M. Dingle, Ph.D Game Design and Development Program Mathematics, Statistics and Computer Science University of Wisconsin - Stout Edge Detection.
Mestrado em Ciência de Computadores Mestrado Integrado em Engenharia de Redes e Sistemas Informáticos VC 15/16 – TP7 Spatial Filters Miguel Tavares Coimbra.
CS 691B Computational Photography
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.
Machine Vision Edge Detection Techniques ENT 273 Lecture 6 Hema C.R.
Lecture 8: Edges and Feature Detection
Grauman Today: Image Filters Smooth/Sharpen Images... Find edges... Find waldo…
Finding Boundaries Computer Vision CS 143, Brown James Hays 09/28/11 Many slides from Lana Lazebnik, Steve Seitz, David Forsyth, David Lowe, Fei-Fei Li,
Spatial Filtering (Chapter 3) CS474/674 - Prof. Bebis.
Winter in Kraków photographed by Marcin Ryczek
Miguel Tavares Coimbra
Edge Detection slides taken and adapted from public websites:
Fitting: Voting and the Hough Transform
Digital Image Processing Lecture 16: Segmentation: Detection of Discontinuities Prof. Charlene Tsai.
Edge Detection CS 678 Spring 2018.
Lecture 2: Edge detection
Lecture 1: Images and image filtering
Jeremy Bolton, PhD Assistant Teaching Professor
Edge detection Goal: Identify sudden changes (discontinuities) in an image Intuitively, most semantic and shape information from the image can be encoded.
Image gradients and edges April 11th, 2017
Review: Linear Systems
Dr. Chang Shu COMP 4900C Winter 2008
Computer Vision Lecture 16: Texture II
Edge Detection Today’s reading
a kind of filtering that leads to useful features
Edge Detection CSE 455 Linda Shapiro.
a kind of filtering that leads to useful features
Edge Detection Today’s reading
Motion illusion, rotating snakes
Lecture 2: Edge detection
Edge Detection Today’s reading
CS 565 Computer Vision Nazar Khan Lecture 9.
Edge Detection Today’s readings Cipolla and Gee Watt,
Lecture 1: Images and image filtering
Lecture 2: Edge detection
Winter in Kraków photographed by Marcin Ryczek
IT472 Digital Image Processing
IT472 Digital Image Processing
Presentation transcript:

Image gradients and edges Tues Jan 24, 2017 Kristen Grauman UT-Austin

Announcements Slides are posted for lecture the night before Office hours on homepage Tues 11-12 + appointment (me) Tues 3-4 and Wed 4-5 (Nick) Mon 2:30-3:30 and Thurs 3:30-4:30 (Paul) Reminder: no laptops, phones, tablets, etc. open in class. Class is 100% full with registered students. Please reserve chairs for those on the roster.

Last time Various models for image “noise” Linear filters and convolution useful for Image smoothing, removing noise Box filter Gaussian filter Impact of scale / width of smoothing filter Separable filters more efficient Median filter: a non-linear filter, edge-preserving

f*g=? Review Filter f = 1/9 x [ 1 1 1 1 1 1 1 1 1] original image h filtered Kristen Grauman, UT Austin

f*g=? Review Filter f = 1/9 x [ 1 1 1 1 1 1 1 1 1]T original image h filtered Kristen Grauman, UT Austin

Image filtering Compute a function of the local neighborhood at each pixel in the image Function specified by a “filter” or mask saying how to combine values from neighbors. Uses of filtering: Enhance an image (denoise, resize, etc) Extract information (texture, edges, etc) Detect patterns (template matching) Today Adapted from Derek Hoiem

Edge detection Goal: map image from 2d array of pixels to a set of curves or line segments or contours. Why? Main idea: look for strong gradients, post-process Figure from J. Shotton et al., PAMI 2007 Kristen Grauman, UT Austin

What causes an edge? Depth discontinuity: object boundary Reflectance change: appearance information, texture Cast shadows Change in surface orientation: shape Kristen Grauman, UT Austin

Edges/gradients and invariance Kristen Grauman, UT Austin

Derivatives and edges An edge is a place of rapid change in the image intensity function. intensity function (along horizontal scanline) image first derivative edges correspond to extrema of derivative Source: L. Lazebnik

Derivatives with convolution For 2D function, f(x,y), the partial derivative is: For discrete data, we can approximate using finite differences: To implement above as convolution, what would be the associated filter? Kristen Grauman, UT Austin

Partial derivatives of an image ? -1 1 1 -1 -1 1 or Which shows changes with respect to x? (showing filters for correlation)

Image gradient The gradient of an image: The gradient points in the direction of most rapid change in intensity The gradient direction (orientation of edge normal) is given by: The edge strength is given by the gradient magnitude Slide credit Steve Seitz 13

Effects of noise Consider a single row or column of the image Plotting intensity as a function of position gives a signal Where is the edge? Slide credit Steve Seitz

Solution: smooth first Where is the edge? Look for peaks in

Derivative theorem of convolution Differentiation property of convolution. Slide credit Steve Seitz

Derivative of Gaussian filters 0.0030 0.0133 0.0219 0.0133 0.0030 0.0133 0.0596 0.0983 0.0596 0.0133 0.0219 0.0983 0.1621 0.0983 0.0219

Derivative of Gaussian filters x-direction y-direction Source: L. Lazebnik

Laplacian of Gaussian Consider Laplacian of Gaussian operator Where is the edge? Zero-crossings of bottom graph Slide credit: Steve Seitz

2D edge detection filters Laplacian of Gaussian Gaussian derivative of Gaussian is the Laplacian operator: Slide credit: Steve Seitz 20

Smoothing with a Gaussian Recall: parameter σ is the “scale” / “width” / “spread” of the Gaussian kernel, and controls the amount of smoothing. … Kristen Grauman, UT Austin

Effect of σ on derivatives σ = 1 pixel σ = 3 pixels The apparent structures differ depending on Gaussian’s scale parameter. Larger values: larger scale edges detected Smaller values: finer features detected Kristen Grauman, UT Austin

So, what scale to choose? It depends what we’re looking for. Kristen Grauman, UT Austin

Mask properties Smoothing Derivatives Values positive Sum to 1  constant regions same as input Amount of smoothing proportional to mask size Remove “high-frequency” components; “low-pass” filter Derivatives ___________ signs used to get high response in regions of high contrast Sum to ___  no response in constant regions High absolute value at points of high contrast Kristen Grauman, UT Austin

Seam carving: main idea [Shai & Avidan, SIGGRAPH 2007]

Seam carving: main idea Content-aware resizing Traditional resizing [Shai & Avidan, SIGGRAPH 2007]

Real image example Kristen Grauman, UT Austin

Seam carving: main idea Content-aware resizing Intuition: Preserve the most “interesting” content  Prefer to remove pixels with low gradient energy To reduce or increase size in one dimension, remove irregularly shaped “seams”  Optimal solution via dynamic programming. Kristen Grauman, UT Austin

Seam carving: main idea Want to remove seams where they won’t be very noticeable: Measure “energy” as gradient magnitude Choose seam based on minimum total energy path across image, subject to 8-connectedness. Kristen Grauman, UT Austin

Seam carving: algorithm Let a vertical seam s consist of h positions that form an 8-connected path. Let the cost of a seam be: Optimal seam minimizes this cost: Compute it efficiently with dynamic programming.

How to identify the minimum cost seam? First, consider a greedy approach: Energy matrix (gradient magnitude) Kristen Grauman, UT Austin

Seam carving: algorithm Compute the cumulative minimum energy for all possible connected seams at each entry (i,j): Then, min value in last row of M indicates end of the minimal connected vertical seam. Backtrack up from there, selecting min of 3 above in M. Energy matrix (gradient magnitude) row i-1 M matrix: cumulative min energy (for vertical seams) j-1 j j+1 j row i Kristen Grauman, UT Austin

Example Energy matrix M matrix (gradient magnitude) (for vertical seams) Kristen Grauman, UT Austin

Example Energy matrix M matrix (gradient magnitude) (for vertical seams) Kristen Grauman, UT Austin

Real image example Blue = low energy Red = high energy Original Image Energy Map Blue = low energy Red = high energy Kristen Grauman, UT Austin

Real image example Kristen Grauman, UT Austin

Other notes on seam carving Analogous procedure for horizontal seams Can also insert seams to increase size of image in either dimension Duplicate optimal seam, averaged with neighbors Other energy functions may be plugged in E.g., color-based, interactive,… Can use combination of vertical and horizontal seams Kristen Grauman, UT Austin

Summary Image gradients Seam carving – gradients as “energy” Gradients  edges and contours Template matching Image patch as a filter Chamfer matching Distance transform

Coming up A1 out tonight, due in 2 weeks Thursday: binary image analysis Friday: A0 due