Edge and Texture. CS 554 Computer Vision Pinar Duygulu Bilkent University

Similar documents
Review of Filtering. Filtering in frequency domain

Edge detection. Goal: Identify sudden. an image. Ideal: artist s line drawing. object-level knowledge)

CS 4495 Computer Vision. Linear Filtering 2: Templates, Edges. Aaron Bobick. School of Interactive Computing. Templates/Edges

Edges and Binary Images

DIGITAL IMAGE PROCESSING

Edge Detection CSC 767

Edge detection. Winter in Kraków photographed by Marcin Ryczek

Edge Detection. Computer Vision Shiv Ram Dubey, IIIT Sri City

Edge detection. Winter in Kraków photographed by Marcin Ryczek

What is an edge? Paint. Depth discontinuity. Material change. Texture boundary

Prof. Feng Liu. Winter /15/2019

Solution: filter the image, then subsample F 1 F 2. subsample blur subsample. blur

Image gradients and edges April 11 th, 2017

Image gradients and edges April 10 th, 2018

Edge and corner detection

Edge Detection. CSC320: Introduction to Visual Computing Michael Guerzhoy. René Magritte, Decalcomania. Many slides from Derek Hoiem, Robert Collins

Edge Detection. CSE 576 Ali Farhadi. Many slides from Steve Seitz and Larry Zitnick

Does everyone have an override code?

Image gradients and edges

CS5670: Computer Vision

Image gradients and edges

Lecture 7: Most Common Edge Detectors

[ ] Review. Edges and Binary Images. Edge detection. Derivative of Gaussian filter. Image gradient. Tuesday, Sept 16

Edge Detection. Today s reading. Cipolla & Gee on edge detection (available online) From Sandlot Science

CS 2770: Computer Vision. Edges and Segments. Prof. Adriana Kovashka University of Pittsburgh February 21, 2017

Digital Image Processing COSC 6380/4393

Image Analysis. Edge Detection

Filtering in frequency domain

2%34 #5 +,,% ! # %& ()% #% +,,%. & /%0%)( 1 ! # %& % %()# +(& ,.+/ +&0%//#/ &

Edge Detection. Announcements. Edge detection. Origin of Edges. Mailing list: you should have received messages

CS4670: Computer Vision Noah Snavely

Lecture 6: Edge Detection

Edge Detection (with a sidelight introduction to linear, associative operators). Images

convolution shift invariant linear system Fourier Transform Aliasing and sampling scale representation edge detection corner detection

Low-level Vision Processing Algorithms Speaker: Ito, Dang Supporter: Ishii, Toyama and Y. Murakami

Image Analysis. Edge Detection

Edges and Binary Image Analysis April 12 th, 2018

CS334: Digital Imaging and Multimedia Edges and Contours. Ahmed Elgammal Dept. of Computer Science Rutgers University

CS534: Introduction to Computer Vision Edges and Contours. Ahmed Elgammal Dept. of Computer Science Rutgers University

Edge Detection. EE/CSE 576 Linda Shapiro

Edges and Binary Image Analysis. Thurs Jan 26 Kristen Grauman UT Austin. Today. Edge detection and matching

Straight Lines and Hough

Previously. Edge detection. Today. Thresholding. Gradients -> edges 2/1/2011. Edges and Binary Image Analysis

Lecture 4: Finding lines: from detection to model fitting

Templates, Image Pyramids, and Filter Banks

Digital Image Processing. Image Enhancement - Filtering

Edge detection. Convert a 2D image into a set of curves. Extracts salient features of the scene More compact than pixels

Computer Vision I. Announcements. Fourier Tansform. Efficient Implementation. Edge and Corner Detection. CSE252A Lecture 13.

Boundaries and Sketches

Computer Vision I. Announcement. Corners. Edges. Numerical Derivatives f(x) Edge and Corner Detection. CSE252A Lecture 11

Multimedia Computing: Algorithms, Systems, and Applications: Edge Detection

Other Linear Filters CS 211A

Computer Vision Course Lecture 04. Template Matching Image Pyramids. Ceyhun Burak Akgül, PhD cba-research.com. Spring 2015 Last updated 11/03/2015

Local Image preprocessing (cont d)

Filters (cont.) CS 554 Computer Vision Pinar Duygulu Bilkent University

Comparison between Various Edge Detection Methods on Satellite Image

Edge Detection. CS664 Computer Vision. 3. Edges. Several Causes of Edges. Detecting Edges. Finite Differences. The Gradient

Applications of Image Filters

SIFT - scale-invariant feature transform Konrad Schindler

EN1610 Image Understanding Lab # 3: Edges

Filtering Images. Contents

Edge detection. Gradient-based edge operators

Image Processing

Texture Representation + Image Pyramids

Announcements. Edge Detection. An Isotropic Gaussian. Filters are templates. Assignment 2 on tracking due this Friday Midterm: Tuesday, May 3.

Anno accademico 2006/2007. Davide Migliore

Segmentation and Grouping

Edge Detection Lecture 03 Computer Vision

Edge detection. Stefano Ferrari. Università degli Studi di Milano Elaborazione delle immagini (Image processing I)

Biometrics Technology: Image Processing & Pattern Recognition (by Dr. Dickson Tong)

Biomedical Image Analysis. Point, Edge and Line Detection

Motion illusion, rotating snakes

Filtering Applications & Edge Detection. GV12/3072 Image Processing.

Concepts in. Edge Detection

Neighborhood operations

Topic 4 Image Segmentation

What Are Edges? Lecture 5: Gradients and Edge Detection. Boundaries of objects. Boundaries of Lighting. Types of Edges (1D Profiles)

SIFT: SCALE INVARIANT FEATURE TRANSFORM SURF: SPEEDED UP ROBUST FEATURES BASHAR ALSADIK EOS DEPT. TOPMAP M13 3D GEOINFORMATION FROM IMAGES 2014

CPSC 425: Computer Vision

Feature descriptors. Alain Pagani Prof. Didier Stricker. Computer Vision: Object and People Tracking

Computer Vision. Recap: Smoothing with a Gaussian. Recap: Effect of σ on derivatives. Computer Science Tripos Part II. Dr Christopher Town

Lecture 4: Image Processing

High Level Computer Vision. Basic Image Processing - April 26, 2o17. Bernt Schiele - Mario Fritz -

SURVEY ON IMAGE PROCESSING IN THE FIELD OF DE-NOISING TECHNIQUES AND EDGE DETECTION TECHNIQUES ON RADIOGRAPHIC IMAGES

Ulrik Söderström 16 Feb Image Processing. Segmentation

Practical Image and Video Processing Using MATLAB

CS 558: Computer Vision 3 rd Set of Notes

Edges, interpolation, templates. Nuno Vasconcelos ECE Department, UCSD (with thanks to David Forsyth)

Segmentation Computer Vision Spring 2018, Lecture 27

Feature Matching and Robust Fitting

Robust Zero Watermarking for Still and Similar Images Using a Learning Based Contour Detection

CAP 5415 Computer Vision Fall 2012

Edge and local feature detection - 2. Importance of edge detection in computer vision

Local Features: Detection, Description & Matching

Image features. Image Features

2D Image Processing Feature Descriptors

Image processing. Reading. What is an image? Brian Curless CSE 457 Spring 2017

Perception. Autonomous Mobile Robots. Sensors Vision Uncertainties, Line extraction from laser scans. Autonomous Systems Lab. Zürich.

CS 534: Computer Vision Texture

CS 4495 Computer Vision A. Bobick. CS 4495 Computer Vision. Features 2 SIFT descriptor. Aaron Bobick School of Interactive Computing

Transcription:

Edge and Texture CS 554 Computer Vision Pinar Duygulu Bilkent University

Filters for features Previously, thinking of filtering as a way to remove or reduce noise Now, consider how filters will allow us to abstract higher-level features. Map raw pixels to an intermediate representation that will be used for subsequent processing Goal: reduce amount of data, discard redundancy, preserve what s useful Source: Darrell, Berkeley

Edge detection Goal: Identify sudden changes (discontinuities) in an image Intuitively, most semantic and shape information from the image can be encoded in the edges More compact than pixels Ideal: artist s line drawing (but artist is also using object-level knowledge) Source: D. Lowe

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

Why do we care about edges? Extract information, recognize objects Recover geometry and viewpoint Vanishing line Vanishing point Vertical vanishing point (at infinity) Vanishing point

Origin of Edges surface normal discontinuity depth discontinuity surface color discontinuity illumination discontinuity Edges are caused by a variety of factors Source: Steve Seitz

What can cause an edge? Reflectance change: appearance information, texture Depth discontinuity: object boundary Cast shadows Change in surface orientation: shape Source: Darrell, Berkeley

Source: Darrell, Berkeley Contrast and invariance

Closeup of edges Source: D. Hoiem

Closeup of edges Source: D. Hoiem

Closeup of edges Source: D. Hoiem

Closeup of edges Source: D. Hoiem

Characterizing edges An edge is a place of rapid change in the image intensity function image intensity function (along horizontal scanline) first derivative edges correspond to extrema of derivative

Differentiation and 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? ), ( ), ( lim ), ( 0 y x f y x f x y x f 1 ), ( ) 1, ( ), ( y x f y x f x y x f Source: Darrell, Berkeley

Partial derivatives of an image f ( x, y) x f ( x, y) y -1 1-1 1? or 1-1 Which shows changes with respect to x? Source: Darrell, Berkeley (showing flipped filters)

Assorted finite difference filters >> My = fspecial( sobel ); >> outim = imfilter(double(im), My); >> imagesc(outim); >> colormap gray; Source: Darrell, Berkeley

The gradient of an image: Image gradient 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 Source: Darrell, Berkeley Slide credit S. Seitz

Intensity profile Source: D. Hoiem

With a little Gaussian noise Gradient Source: D. Hoiem

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? Source: S. Seitz

Effects of noise Difference filters respond strongly to noise Image noise results in pixels that look very different from their neighbors Generally, the larger the noise the stronger the response What can we do about it? Source: D. Forsyth

Solution: smooth first f g f * g d dx ( f g) To find edges, look for peaks in ( f g) d dx Source: S. Seitz

Derivative theorem of convolution d d Differentiation is convolution, ( f g) fand convolution g is dx dx associative: This saves us one operation: f d dx g f d dx g Source: S. Seitz

Derivative of Gaussian filter * [1-1] =

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

Consider Laplacian of Gaussian Laplacian of Gaussian operator Where is the edge? Source: Darrell, Berkeley Zero-crossings of bottom graph

2D edge detection filters Laplacian of Gaussian Gaussian derivative of Gaussian is the Laplacian operator: Source: Darrell, Berkeley

Smoothing with a Gaussian Recall: parameter σ is the scale / width / spread of the Gaussian kernel, and controls the amount of smoothing. Source: Darrell, Berkeley

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 Source: Darrell, Berkeley

So, what scale to choose? It depends what we re looking for. Too fine of a scale can t see the forest for the trees. Too coarse of a scale can t tell the maple grain from the cherry. Source: Darrell, Berkeley

Thresholding Choose a threshold value t Set any pixels less than t to zero (off) Set any pixels greater than or equal to t to one (on) Source: Darrell, Berkeley

Source: Darrell, Berkeley Original image

Source: Darrell, Berkeley Gradient magnitude image

Thresholding gradient with a lower threshold Source: Darrell, Berkeley

Thresholding gradient with a higher threshold Source: Darrell, Berkeley

Tradeoff between smoothing and localization 1 pixel 3 pixels 7 pixels Smoothed derivative removes noise, but blurs edge. Also finds edges at different scales. Source: D. Forsyth

Designing an edge detector Criteria for a good edge detector: Good detection: the optimal detector should find all real edges, ignoring noise or other artifacts Good localization the edges detected must be as close as possible to the true edges the detector must return one point only for each true edge point Cues of edge detection Differences in color, intensity, or texture across the boundary Continuity and closure High-level knowledge Source: L. Fei-Fei

Canny edge detector This is probably the most widely used edge detector in computer vision Theoretical model: step-edges corrupted by additive Gaussian noise Canny has shown that the first derivative of the Gaussian closely approximates the operator that optimizes the product of signal-to-noise ratio and localization J. Canny, A Computational Approach To Edge Detection, IEEE Trans. Pattern Analysis and Machine Intelligence, 8:679-714, 1986. Source: L. Fei-Fei

Example original image (Lena)

Derivative of Gaussian filter x-direction y-direction

The Canny edge detector original image (Lena) Source: Darrell, Berkeley

Compute Gradients (DoG) X-Derivative of Gaussian Y-Derivative of Gaussian Gradient Magnitude

The Canny edge detector norm of the gradient Source: Darrell, Berkeley

The Canny edge detector thresholding Source: Darrell, Berkeley

The Canny edge detector How to turn these thick regions of the gradient into curves? thresholding Source: Darrell, Berkeley

Non-maximum suppression Check if pixel is local maximum along gradient direction, select single max across width of the edge requires checking interpolated pixels p and r Source: Darrell, Berkeley

Get Orientation at Each Pixel Threshold at minimum level Get orientation theta = atan2(gy, gx)

Non-maximum suppression for each orientation At q, we have a maximum if the value is larger than those at both p and at r. Interpolate to get these values. Source: Source: Hays, D. Brown Forsyth

Before Non-max Suppression

After non-max suppression

The Canny edge detector Problem: pixels along this edge didn t survive the thresholding thinning (non-maximum suppression) Source: Darrell, Berkeley

Hysteresis thresholding Check that maximum value of gradient value is sufficiently large drop-outs? use hysteresis use a high threshold to start edge curves and a low threshold to continue them. Source: Darrell, Berkeley Source: S. Seitz

Hysteresis thresholding Threshold at low/high levels to get weak/strong edge pixels Do connected components, starting from strong edge pixels

Hysteresis thresholding original image high threshold (strong edges) Source: Darrell, Berkeley low threshold (weak edges) hysteresis threshold Source: L. Fei-Fei

Final Canny Edges

Canny edge detector 1. Filter image with x, y derivatives of Gaussian 2. Find magnitude and orientation of gradient 3. Non-maximum suppression: Thin multi-pixel wide ridges down to single pixel width 4. Thresholding and linking (hysteresis): Define two thresholds: low and high Use the high threshold to start edge curves and the low threshold to continue them MATLAB: edge(image, canny ) Source: D. Lowe, L. Fei-Fei

Effect of (Gaussian kernel spread/size) original Canny with Canny with The choice of depends on desired behavior large detects large scale edges small detects fine features Source: S. Seitz

Object boundaries vs. edges Source: Darrell, Berkeley Background Texture Shadows

Edge detection is just the beginning image human segmentation gradient magnitude Berkeley segmentation database: http://www.eecs.berkeley.edu/research/projects/cs/vision/grouping/segbench/ Much more on segmentation later in term Source: Darrell, Berkeley Source: L. Lazebnik

Representing Texture Source: Forsyth

Texture and Material http://www-cvr.ai.uiuc.edu/ponce_grp/data/texture_database/samples/

Texture and Orientation http://www-cvr.ai.uiuc.edu/ponce_grp/data/texture_database/samples/

Texture and Scale http://www-cvr.ai.uiuc.edu/ponce_grp/data/texture_database/samples/

What is texture? Regular or stochastic patterns caused by bumps, grooves, and/or markings

How can we represent texture? Compute responses of blobs and edges at various orientations and scales

Overcomplete representation: filter banks LM Filter Bank Code for filter banks: www.robots.ox.ac.uk/~vgg/research/texclass/filters.html

Filter banks Process image with each filter and keep responses (or squared/abs responses)

How can we represent texture? Measure responses of blobs and edges at various orientations and scales Idea 1: Record simple statistics (e.g., mean, std.) of absolute filter responses

Can you match the texture to the Filters response? A 1 B 2 C 3 Mean abs responses

Representing texture Idea 2: take vectors of filter responses at each pixel and cluster them, then take histograms.

Building Visual Dictionaries 1. Sample patches from a database E.g., 128 dimensional SIFT vectors 2. Cluster the patches Cluster centers are the dictionary 3. Assign a codeword (number) to each new patch, according to the nearest cluster

pb boundary detector Martin, Fowlkes, Malik 2004: Learning to Detect Natural Boundaries http://www.eecs.berkeley.edu/research/projects/cs/vi sion/grouping/papers/mfm-pami-boundary.pdf Figure from Fowlkes

pb Boundary Detector Figure from Fowlkes

Brightness Color Texture Combined Human

Global pb boundary detector Figure from Fowlkes

45 years of boundary detection Source: Arbelaez, Maire, Fowlkes, and Malik. TPAMI 2011 (pdf)