Scaled representations

Similar documents
CS 534: Computer Vision Texture

CS 534: Computer Vision Texture

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

Frequency analysis, pyramids, texture analysis, applications (face detection, category recognition)

FOURIER TRANSFORM GABOR FILTERS. and some textons

Texture. Texture. 2) Synthesis. Objectives: 1) Discrimination/Analysis

Image pyramids and their applications Bill Freeman and Fredo Durand Feb. 28, 2006

Filtering, scale, orientation, localization, and texture. Nuno Vasconcelos ECE Department, UCSD (with thanks to David Forsyth)

CPSC 425: Computer Vision

Texture. D. Forsythe and J. Ponce Computer Vision modern approach Chapter 9 (Slides D. Lowe, UBC)

Texture. D. Forsythe and J. Ponce Computer Vision modern approach Chapter 9 (Slides D. Lowe, UBC) Previously

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

Applications of Image Filters

Texture. D. Forsythe and J. Ponce Computer Vision modern approach Chapter 9 (Slides D. Lowe, UBC) Texture

Analysis and Synthesis of Texture

Schedule for Rest of Semester

Final Exam Schedule. Final exam has been scheduled. 12:30 pm 3:00 pm, May 7. Location: INNOVA It will cover all the topics discussed in class

Texture. Outline. Image representations: spatial and frequency Fourier transform Frequency filtering Oriented pyramids Texture representation

Lecture 2: 2D Fourier transforms and applications

Texture and Other Uses of Filters

Multiresolution Image Processing

Median filter. Non-linear filtering example. Degraded image. Radius 1 median filter. Today

Non-linear filtering example

Texture. Announcements. 2) Synthesis. Issues: 1) Discrimination/Analysis

Texture Representation + Image Pyramids

EEM 561 Machine Vision. Week 3: Fourier Transform and Image Pyramids

Today: non-linear filters, and uses for the filters and representations from last time. Review pyramid representations Non-linear filtering Textures

288 Texture Chapter 11

Filters and Pyramids. CSC320: Introduction to Visual Computing Michael Guerzhoy. Many slides from Steve Marschner, Alexei Efros

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

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

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

CPSC 425: Computer Vision

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

Segmentation. (template) matching

Advanced Computer Graphics. Aliasing. Matthias Teschner. Computer Science Department University of Freiburg

Lecture 6: Edge Detection

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

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

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

2D Image Processing INFORMATIK. Kaiserlautern University. DFKI Deutsches Forschungszentrum für Künstliche Intelligenz

Fourier analysis and sampling theory

Announcements. Image Matching! Source & Destination Images. Image Transformation 2/ 3/ 16. Compare a big image to a small image

Aliasing. Can t draw smooth lines on discrete raster device get staircased lines ( jaggies ):

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

Sampling, Aliasing, & Mipmaps

Digital Image Processing. Prof. P. K. Biswas. Department of Electronic & Electrical Communication Engineering

Straight Lines and Hough

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

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

Sampling and Reconstruction. Most slides from Steve Marschner

ME/CS 132: Introduction to Vision-based Robot Navigation! Low-level Image Processing" Larry Matthies"

Texture. This isn t described in Trucco and Verri Parts are described in:

Image Processing and Analysis

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

Reading. 2. Fourier analysis and sampling theory. Required: Watt, Section 14.1 Recommended:

Sampling, Aliasing, & Mipmaps

CS1114 Section 8: The Fourier Transform March 13th, 2013

Templates, Image Pyramids, and Filter Banks

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

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

Edge Detection Lecture 03 Computer Vision

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

Digital Image Processing COSC 6380/4393

Theoretically Perfect Sensor

Announcements. Edges. Last Lecture. Gradients: Numerical Derivatives f(x) Edge Detection, Lines. Intro Computer Vision. CSE 152 Lecture 10

Other Linear Filters CS 211A

Sampling, Aliasing, & Mipmaps

Pop Quiz 1 [10 mins]

SECTION 5 IMAGE PROCESSING 2

Computer Vision and Graphics (ee2031) Digital Image Processing I

Lecture 4: Spatial Domain Transformations

Computer Vision. Fourier Transform. 20 January Copyright by NHL Hogeschool and Van de Loosdrecht Machine Vision BV All rights reserved

Texture and Shape for Image Retrieval Multimedia Analysis and Indexing

Aliasing and Antialiasing. ITCS 4120/ Aliasing and Antialiasing

CS143 Introduction to Computer Vision Homework assignment 1.

Chapter 3: Intensity Transformations and Spatial Filtering

Image Filtering, Warping and Sampling

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

Coarse-to-fine image registration

Feature Tracking and Optical Flow

Anno accademico 2006/2007. Davide Migliore

COMPUTER VISION > OPTICAL FLOW UTRECHT UNIVERSITY RONALD POPPE

Classification and Detection in Images. D.A. Forsyth

Image Pyramids and Applications

An Intuitive Explanation of Fourier Theory

Sampling and Reconstruction

Peripheral drift illusion

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

Biomedical Image Analysis. Spatial Filtering

Fourier Transform and Texture Filtering

Anti-aliasing and sampling

Edge and corner detection

Computer Graphics. Sampling Theory & Anti-Aliasing. Philipp Slusallek

Digital Image Processing. Image Enhancement - Filtering

Why study Computer Vision?

Digital Image Processing. Image Enhancement in the Frequency Domain

Aliasing And Anti-Aliasing Sampling and Reconstruction

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

Image processing in frequency Domain

Transcription:

Scaled representations Big bars (resp. spots, hands, etc.) and little bars are both interesting Stripes and hairs, say Inefficient to detect big bars with big filters And there is superfluous detail in the filter kernel Alternative: Apply filters of fixed size to images of different sizes Typically, a collection of images whose edge length changes by a factor of 2 (or root 2) This is a pyramid (or Gaussian pyramid) by visual analogy A bar in the big images is a hair on the zebra s nose; in smaller images, a stripe; in the smallest, the animal s nose 1

Aliasing Can t shrink an image by taking every second pixel If we do, characteristic errors appear In the next few slides Typically, small phenomena look bigger; fast phenomena can look slower Common phenomenon Wagon wheels rolling the wrong way in movies Checkerboards misrepresented in ray tracing Striped shirts look funny on color television Resample the checkerboard by taking one sample at each circle. In the case of the top left board, new representation is reasonable. Top right also yields a reasonable representation. Bottom left is all black (dubious) and bottom right has checks that are too big. 2

Constructing a pyramid by taking every second pixel leads to layers that badly misrepresent the top layer Open questions What causes the tendency of differentiation to emphasize noise? In what precise respects are discrete images different from continuous images? How do we avoid aliasing? General thread: a language for fast changes The Fourier Transform 3

The Fourier Transform Represent function on a new basis Think of functions as vectors, with many components We now apply a linear transformation to transform the basis dot product with each basis element In the expression, u and v select the basis element, so a function of x and y becomes a function of u and v basis elements have the form -i2p ux +vy e ( ) F( g( x, y) )( u,v) = g x, y ÚÚ R 2 ( )e ( ) dxdy -i2p ux +vy To get some sense of what basis elements look like, we plot a basis element --- or rather, its real part --- as a function of x,y for some fixed u, v. We get a function that is constant when (ux+vy) is constant. The magnitude of the vector (u, v) gives a frequency, and its direction gives an orientation. The function is a sinusoid with this frequency along the direction, and constant perpendicular to the direction. 4

Here u and v are larger than in the previous slide. And larger still... 5

Phase and Magnitude Fourier transform of a real function is complex difficult to plot, visualize instead, we can think of the phase and magnitude of the transform Phase is the phase of the complex transform Magnitude is the magnitude of the complex transform Curious fact all natural images have about the same magnitude transform hence, phase seems to matter, but magnitude largely doesn t Demonstration Take two pictures, swap the phase transforms, compute the inverse - what does the result look like? 6

This is the magnitude transform of the cheetah pic This is the phase transform of the cheetah pic 7

This is the magnitude transform of the zebra pic 8

This is the phase transform of the zebra pic Reconstruction with zebra phase, cheetah magnitude 9

Reconstruction with cheetah phase, zebra magnitude Various Fourier Transform Pairs Important facts The Fourier transform is linear There is an inverse FT if you scale the function s argument, then the transform s argument scales the other way. This makes sense --- if you multiply a function s argument by a number that is larger than one, you are stretching the function, so that high frequencies go to low frequencies The FT of a Gaussian is a Gaussian. The convolution theorem The Fourier transform of the convolution of two functions is the product of their Fourier transforms The inverse Fourier transform of the product of two Fourier transforms is the convolution of the two inverse Fourier transforms There s a table in the book. 10

Sampling in 1D takes a continuous function and replaces it with a vector of values, consisting of the function s values at a set of sample points. We ll assume that these sample points are on a regular grid, and can place one at each integer for convenience. Sampling in 2D does the same thing, only in 2D. We ll assume that these sample points are on a regular grid, and can place one at each integer point for convenience. 11

A continuous model for a sampled function We want to be able to approximate integrals sensibly Leads to the delta function model on right Sample 2D f (x, y) ( ) =   f (x, y)d (x - i, y - j) i=- i=- = f (x, y) d (x - i, y - j)   i=- i=- The Fourier transform of a sampled signal Ê F( Sample 2D ( f (x, y) )) = FÁ f (x, y)  d(x - i, y - j) Ë Â i=- i=- Ê ˆ = F( f (x, y) )**FÁ   d(x - i, y - j) Ë i=- i=- = F u - i, v - j   i=- j=- ( ) ˆ 12

13

Smoothing as low-pass filtering The message of the FT is that high frequencies lead to trouble with sampling. Solution: suppress high frequencies before sampling multiply the FT of the signal with something that suppresses high frequencies or convolve with a low-pass filter A filter whose FT is a box is bad, because the filter kernel has infinite support Common solution: use a Gaussian multiplying FT by Gaussian is equivalent to convolving image with Gaussian. Sampling without smoothing. Top row shows the images, sampled at every second pixel to get the next; bottom row shows the magnitude spectrum of these images. 14

Sampling with smoothing. Top row shows the images. We get the next image by smoothing the image with a Gaussian with sigma 1 pixel, then sampling at every second pixel to get the next; bottom row shows the magnitude spectrum of these images. Sampling with smoothing. Top row shows the images. We get the next image by smoothing the image with a Gaussian with sigma 1.4 pixels, then sampling at every second pixel to get the next; bottom row shows the magnitude spectrum of these images. 15

Applications of scaled representations Search for correspondence look at coarse scales, then refine with finer scales Edge tracking a good edge at a fine scale has parents at a coarser scale Control of detail and computational cost in matching e.g. finding stripes terribly important in texture representation The Gaussian pyramid Smooth with gaussians, because a gaussian*gaussian=another gaussian Synthesis smooth and sample Analysis take the top image Gaussians are low pass filters, so representation is redundant 16

Texture Key issue: representing texture Texture based matching little is known Texture segmentation key issue: representing texture Texture synthesis useful; also gives some insight into quality of representation Shape from texture cover superficially 17

Representing textures Textures are made up of quite stylized subelements, repeated in meaningful ways Representation: find the subelements, and represent their statistics But what are the subelements, and how do we find them? recall normalized correlation find subelements by applying filters, looking at the magnitude of the response What filters? experience suggests spots and oriented bars at a variety of different scales details probably don t matter What statistics? within reason, the more the merrier. At least, mean and standard deviation better, various conditional histograms. 18

19

20

Gabor filters at different scales and spatial frequencies top row shows anti-symmetric (or odd) filters, bottom row the symmetric (or even) filters. The Laplacian Pyramid Synthesis preserve difference between upsampled Gaussian pyramid level and Gaussian pyramid level band pass filter - each level represents spatial frequencies (largely) unrepresented at other levels Analysis reconstruct Gaussian pyramid, take top layer 21

22

Oriented pyramids Laplacian pyramid is orientation independent Apply an oriented filter to determine orientations at each layer by clever filter design, we can simplify synthesis this represents image information at a particular scale and orientation 23

Reprinted from Shiftable MultiScale Transforms, by Simoncelli et al., IEEE Transactions on Information Theory, 1992, copyright 1992, IEEE Analysis 24

synthesis Final texture representation Form an oriented pyramid (or equivalent set of responses to filters at different scales and orientations). Square the output Take statistics of responses e.g. mean of each filter output (are there lots of spots) std of each filter output mean of one scale conditioned on other scale having a particular range of values (e.g. are the spots in straight rows?) 25

Texture synthesis Use image as a source of probability model Choose pixel values by matching neighborhood, then filling in Matching process look at pixel differences count only synthesized pixels Figure from Texture Synthesis by Non-parametric Sampling, A. Efros and T.K. Leung, Proc. Int. Conf. Computer Vision, 1999 copyright 1999, IEEE 26

Variations Texture synthesis at multiple scales Texture synthesis on surfaces Texture synthesis by tiles Analogous texture synthesis 27