Prof. Adriana Kovashka University of Pittsburgh September 14, 2016

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

Interest points CSE P 576 Ali Farhadi Many slides from Steve Seitz, Larry Zitnick.
CS 691 Computational Photography
Pyramids and Texture. Scaled representations Big bars and little bars are both interesting Spots and hands vs. stripes and hairs Inefficient to detect.
Computer Vision University of Illinois Derek Hoiem
Linear Filtering – Part II Selim Aksoy Department of Computer Engineering Bilkent University
Computational Photography CSE 590 Tamara Berg Filtering & Pyramids.
Templates, Image Pyramids, and Filter Banks Slides largely from Derek Hoeim, Univ. of Illinois.
Convolution, Edge Detection, Sampling : Computational Photography Alexei Efros, CMU, Fall 2006 Some slides from Steve Seitz.
Immagini e filtri lineari. Image Filtering Modifying the pixels in an image based on some function of a local neighborhood of the pixels
Interest Points and Corners Computer Vision CS 143, Brown James Hays Slides from Rick Szeliski, Svetlana Lazebnik, Derek Hoiem and Grauman&Leibe 2008 AAAI.
Linear filtering. Overview: Linear filtering Linear filters Definition and properties Examples Gaussian smoothing Separability Applications Denoising.
Texture Reading: Chapter 9 (skip 9.4) Key issue: How do we represent texture? Topics: –Texture segmentation –Texture-based matching –Texture synthesis.
1 Image filtering
2D Fourier Theory for Image Analysis Mani Thomas CISC 489/689.
CSC589 Introduction to Computer Vision Lecture 9 Sampling, Gaussian Pyramid Bei Xiao.
Computer Vision Spring ,-685 Instructor: S. Narasimhan Wean 5409 T-R 10:30am – 11:50am.
Slide credit Fei Fei Li. Image filtering Image filtering: compute function of local neighborhood at each position Really important! – Enhance images.
Applications of Image Filters Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem 02/04/10.
Templates, Image Pyramids, and Filter Banks Computer Vision Derek Hoiem, University of Illinois 01/31/12.
CS 1699: Intro to Computer Vision Texture and Other Uses of Filters Prof. Adriana Kovashka University of Pittsburgh September 10, 2015 Slides from Kristen.
Templates and Image Pyramids Computational Photography Derek Hoiem, University of Illinois 09/03/15.
CS 1699: Intro to Computer Vision Local Image Features: Extraction and Description Prof. Adriana Kovashka University of Pittsburgh September 17, 2015.
Thinking in Frequency Computational Photography University of Illinois Derek Hoiem 09/01/15.
Lecture 7: Features Part 2 CS4670/5670: Computer Vision Noah Snavely.
Computer Vision Spring ,-685 Instructor: S. Narasimhan Wean 5403 T-R 3:00pm – 4:20pm.
Templates, Image Pyramids, and Filter Banks
CS 2750: Machine Learning Bias-Variance Trade-off (cont’d) + Image Representations Prof. Adriana Kovashka University of Pittsburgh January 20, 2016.
Lecture 5: Fourier and Pyramids
Last Lecture photomatix.com. Today Image Processing: from basic concepts to latest techniques Filtering Edge detection Re-sampling and aliasing Image.
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,
Slide credit Fei Fei Li.
Image Resampling & Interpolation
Computer Vision Brown James Hays 09/16/11 Thinking in Frequency Computer Vision Brown James Hays Slides: Hoiem, Efros, and others.
Sampling, Template Matching and Pyramids
Interest Points EE/CSE 576 Linda Shapiro.
Linear Filtering – Part II
Fitting: Voting and the Hough Transform
3D Vision Interest Points.
Corners and interest points
TP12 - Local features: detection and description
Image Sampling Moire patterns
Department of Computer Engineering
Scale and interest point descriptors
Image Pyramids and Applications
Image gradients and edges
Feature description and matching
CS 2770: Computer Vision Linear Algebra and Matlab
CS 1674: Intro to Computer Vision Linear Algebra Review
Image Sampling Moire patterns
Jeremy Bolton, PhD Assistant Teaching Professor
Image gradients and edges April 11th, 2017
More Image Manipulation
Sampling and Reconstruction
CSCE 643 Computer Vision: Thinking in Frequency
Samuel Cheng Slide credits: Noah Snavely
Texture.
Motion illusion, rotating snakes
Filtering Part 2: Image Sampling
Linear filtering.
Image Sampling Moire patterns
Oh, no, wait, sorry, I meant, welcome to the implementation of 20th-century science fiction literature, or a small part of it, where we will learn about.
Department of Computer Engineering
Image Resampling & Interpolation
Feature descriptors and matching
Samuel Cheng Slide credits: Noah Snavely
Thinking in Frequency Computational Photography University of Illinois
Templates and Image Pyramids
Presentation transcript:

Prof. Adriana Kovashka University of Pittsburgh September 14, 2016 CS 1674: Intro to Computer Vision Texture Representation + Image Pyramids Prof. Adriana Kovashka University of Pittsburgh September 14, 2016

Reminders/Announcements HW2P due tonight, 11:59pm HW3W, HW3P out Shuffle!

Plan for today Filtering Detecting interesting content (start) Representing texture Application to subsampling Image pyramids Detecting interesting content (start)

Convolution vs. correlation Cross-correlation

Texture What defines a texture? Kristen Grauman

Includes: more regular patterns Kristen Grauman

Includes: more random patterns Kristen Grauman

Kristen Grauman

Kristen Grauman http://animals.nationalgeographic.com/

Why analyze texture? Important for how we perceive objects Often indicative of a material’s properties Can be important appearance cue, especially if shape is similar across objects To represent objects, we want a feature one step above “building blocks” of filters, edges Adapted from Kristen Grauman

Texture representation Textures are made up of repeated local patterns, so: Find the patterns Use filters that look like patterns (spots, bars, raw patches…) Consider magnitude of response Describe their statistics within each local window Mean, standard deviation Histogram Kristen Grauman

Texture representation: example mean d/dx value mean d/dy value Win. #1 4 10 original image … statistics to summarize patterns in small windows derivative filter responses, squared Kristen Grauman

Texture representation: example mean d/dx value mean d/dy value Win. #1 4 10 Win.#2 18 7 original image … statistics to summarize patterns in small windows derivative filter responses, squared Kristen Grauman

Texture representation: example mean d/dx value mean d/dy value Win. #1 4 10 Win.#2 18 7 Win.#9 20 original image … … statistics to summarize patterns in small windows derivative filter responses, squared Kristen Grauman

Texture representation: example mean d/dx value mean d/dy value Win. #1 4 10 Win.#2 18 7 Win.#9 20 Dimension 2 (mean d/dy value) Dimension 1 (mean d/dx value) … … statistics to summarize patterns in small windows Kristen Grauman

Texture representation: example Windows with primarily horizontal edges Both mean d/dx value mean d/dy value Win. #1 4 10 Win.#2 18 7 Win.#9 20 Dimension 2 (mean d/dy value) Windows with primarily vertical edges Dimension 1 (mean d/dx value) … … Windows with small gradient in both directions statistics to summarize patterns in small windows Kristen Grauman

Texture representation: example original image visualization of the assignment to texture “types” derivative filter responses, squared Kristen Grauman

Texture representation: example mean d/dx value mean d/dy value Win. #1 4 10 Win.#2 18 7 Win.#9 20 Dimension 2 (mean d/dy value) Far: dissimilar textures Close: similar textures Dimension 1 (mean d/dx value) … … statistics to summarize patterns in small windows Kristen Grauman

Computing distances using texture Dimension 2 Dimension 1 Kristen Grauman 19

Texture representation: example Dimension 2 Dimension 1 Distance reveals how dissimilar texture from window a is from texture in window b. Kristen Grauman 20

Filter banks Our previous example used two filters, and resulted in a 2-dimensional feature vector to describe texture in a window. x and y derivatives revealed something about local structure. We can generalize to apply a collection of multiple (d) filters: a “filter bank” Then our feature vectors will be d-dimensional. still can think of nearness, farness in feature space Adapted from Kristen Grauman

Filter banks What filters to put in the bank? “Edges” “Bars” “Spots” orientations scales “Edges” “Bars” “Spots” What filters to put in the bank? Typically we want a combination of scales and orientations, different types of patterns. Matlab code available for these examples: http://www.robots.ox.ac.uk/~vgg/research/texclass/filters.html Kristen Grauman

Filter bank Kristen Grauman

Multivariate Gaussian Kristen Grauman

Image from http://www.texasexplorer.com/austincap2.jpg Kristen Grauman

Showing magnitude of responses Kristen Grauman

2 Kristen Grauman

4 Kristen Grauman

7 Kristen Grauman

8 Kristen Grauman

10 Kristen Grauman

Kristen Grauman

Vectors of texture responses [r1, r2, …, r38] We can form a “feature vector” from the list of responses at each pixel; gives us a representation of the pixel, image. Adapted from Kristen Grauman

You try: Can you match the texture to the response? Filters A B 1 2 C 3 Mean abs responses Derek Hoiem

Representing texture by mean abs response Filters Mean abs responses Derek Hoiem

Vectors of texture responses The frequency of image patch responses in an image tells us something about the image If my patches tend to respond strongly to blobs, and another image’s patches respond strongly to vertical edges, then that image and I are probably of different materials How to capture? One idea: Concatenate [r1, …, r38] from the previous slide, for all image pixels Problems?

Means or histograms of feature responses Instead of concatenating, compute the mean across all image pixels to each of the filters Instead of concatenating, count: Assume all responses between 0 and 1 How many times within the image did I see an r1 response between 0 and 0.1? … between 0.1 and 0.2? How many times did I see r2 response between 0 and 0.1? … Concatenate these counts into a histogram Tradeoffs?

Classifying materials, “stuff” Figure by Varma & Zisserman Kristen Grauman

1-minute break

Plan for today Filtering Detecting interesting content (start) Representing texture Application to subsampling Image pyramids Detecting interesting content (start)

Sampling Why does a lower resolution image still make sense to us? What do we lose? Derek Hoiem Image: http://www.flickr.com/photos/igorms/136916757/

Subsampling by a factor of 2 Throw away every other row and column to create a 1/2 size image Derek Hoiem

Aliasing problem 1D example (sinewave): Source: S. Marschner

Aliasing problem 1D example (sinewave): Source: S. Marschner

Aliasing problem Sub-sampling may be dangerous…. Characteristic errors may appear: “Wagon wheels rolling the wrong way in movies” “Striped shirts look funny on color television” Source: D. Forsyth

Sampling and aliasing Derek Hoiem

Nyquist-Shannon Sampling Theorem When sampling a signal at discrete intervals, the sampling frequency must be  2  fmax fmax = max frequency of the input signal This will allows to reconstruct the original perfectly from the sampled version v v v good bad Derek Hoiem

Anti-aliasing Solutions: Sample more often Get rid of all frequencies that are greater than half the new sampling frequency Will lose information But it’s better than aliasing Apply a smoothing filter Derek Hoiem

Algorithm for downsampling by factor of 2 Start with image(h, w) Apply low-pass filter im_blur = imfilter(image, fspecial(‘gaussian’, 7, 1)) Sample every other pixel im_small = im_blur(1:2:end, 1:2:end); Low-Pass Filtered Image Image Gaussian Filter Sample Low-Res Image Derek Hoiem

Anti-aliasing Forsyth and Ponce 2002

Subsampling without pre-filtering 1/2 1/4 (2x zoom) 1/8 (4x zoom) Slide by Steve Seitz

Subsampling with Gaussian pre-filtering Slide by Steve Seitz

Subsampling away… h2 = f2 Why would we want to do this? {f0 , f1 , …, fn} = Gaussian pyramid f1 – l1 = h1 f0 – l0 = h0 {h0 , h1 , …, hn} = Laplacian pyramid h2 = f2 Why would we want to do this? Can we reconstruct the original from the Laplacian pyramid? Derek Hoiem http://sepwww.stanford.edu/~morgan/texturematch/paper_html/node3.html

Gaussian pyramid Source: Forsyth

Laplacian pyramid Source: Forsyth

Laplacian filter unit impulse Gaussian Laplacian of Gaussian Source: Lazebnik

Plan for today Filtering Detecting interesting content (start) Representing texture Application to subsampling Image pyramids Detecting interesting content (start)

An image is a set of pixels… What we see What a computer sees Source: S. Narasimhan Adapted from S. Narasimhan

Problems with pixel representation Not invariant to small changes Translation Illumination etc. Some parts of an image are more important than others What do we want to represent?

Human eye movements Yarbus eye tracking Your eyes don’t see everything at once, but they jump around. You see only about 2 degrees with high resolution Yarbus eye tracking D. Hoiem

Choosing distinctive interest(ing) points If you wanted to meet a friend would you say “Let’s meet on campus.” “Let’s meet on Green street.” “Let’s meet at Green and Wright.” Corner detection Or if you were in a secluded area: “Let’s meet in the Plains of Akbar.” “Let’s meet on the side of Mt. Doom.” “Let’s meet on top of Mt. Doom.” Blob (valley/peak) detection D. Hoiem

Choosing interest(ing) points Where would you tell your friend to meet you? Corners! D. Hoiem

Choosing interest(ing) points Where would you tell your friend to meet you? Blobs! D. Hoiem

Interest points original Suppose you have to click on some point, go away and come back after I deform the image, and click on the same points again. Which points would you choose? deformed D. Hoiem