Texture Texture Edge detectors find differences in overall

  • Slides: 46
Download presentation
Texture

Texture

Texture • Edge detectors find differences in overall intensity. • Average intensity is only

Texture • Edge detectors find differences in overall intensity. • Average intensity is only simplest difference. many slides from David Jacobs

Issues: 1) Discrimination/Analysis (Freeman)

Issues: 1) Discrimination/Analysis (Freeman)

2) Synthesis

2) Synthesis

Other texture applications 3. Texture boundary detection. Segmentation 4. Shape from texture.

Other texture applications 3. Texture boundary detection. Segmentation 4. Shape from texture.

Gradient in the spacing of the barrels (Gibson 1957)

Gradient in the spacing of the barrels (Gibson 1957)

Texture gradient associated to converging lines (Gibson 1957)

Texture gradient associated to converging lines (Gibson 1957)

What is texture? • Something that repeats with variation. • Must separate what repeats

What is texture? • Something that repeats with variation. • Must separate what repeats and what stays the same. • Model as repeated trials of a random process – The probability distribution stays the same. – But each trial is different.

Simplest Texture • Each pixel independent, identically distributed (iid). • Examples: – Region of

Simplest Texture • Each pixel independent, identically distributed (iid). • Examples: – Region of constant intensity. – Gaussian noise pattern. – Speckled pattern

Texture Discrimination is then Statistics • Two sets of samples. • Do they come

Texture Discrimination is then Statistics • Two sets of samples. • Do they come from the same random process?

Simplest Texture Discrimination • Compare histograms. – Divide intensities into discrete ranges. – Count

Simplest Texture Discrimination • Compare histograms. – Divide intensities into discrete ranges. – Count how many pixels in each range. 0 -25 26 -50 51 -75 76 -100 225 -250

How/why to compare • Simplest comparison is SSD, many others. • Can view probabilistically.

How/why to compare • Simplest comparison is SSD, many others. • Can view probabilistically. – Histogram is a set of samples from a probability distribution. – With many samples it approximates distribution. – Test probability samples drawn from same distribution. Ie. , is difference greater than expected when two samples come from same distribution?

Chi square distance between texton histograms Chi-square i 0. 1 j k 0. 8

Chi square distance between texton histograms Chi-square i 0. 1 j k 0. 8 (Malik)

More Complex Discrimination • Histogram comparison is very limiting – Every pixel is independent.

More Complex Discrimination • Histogram comparison is very limiting – Every pixel is independent. – Everything happens at a tiny scale. • Use output of filters of different scales.

Origin: First-order gray-level statistics: characterized by histogram Second-order gray-level statistics: described by co-occurrence matrix

Origin: First-order gray-level statistics: characterized by histogram Second-order gray-level statistics: described by co-occurrence matrix Autocorrelation function I(i, j)*I(-i, -j) Power spectrum of I(i, j) is square of magnitude of Fourier Transform Power spectrum of a function is Fourier transform of autocorrelation Various methods use Fourier transform (in polar representation)

Example (Forsyth & Ponce)

Example (Forsyth & Ponce)

classification

classification

What are Right Filters? • Multi-scale is good, since we don’t know right scale

What are Right Filters? • Multi-scale is good, since we don’t know right scale a priori. • Easiest to compare with naïve Bayes: Filter image one: (F 1, F 2, …) Filter image two: (G 1, G 2, …) S means image one and two have same texture. Approximate: P(F 1, G 1, F 2, G 2, …| S) By P(F 1, G 1|S)*P(F 2, G 2|S)*…

What are Right Filters? • The more independent the better. – In an image,

What are Right Filters? • The more independent the better. – In an image, output of one filter should be independent of others. – Because our comparison assumes independence. – Wavelets seem to be best.

Difference of Gaussian Filters

Difference of Gaussian Filters

Spots and Oriented Bars (Malik and Perona)

Spots and Oriented Bars (Malik and Perona)

Gabor Filters Gabor filters at different scales and spatial frequencies top row shows anti-symmetric

Gabor Filters Gabor filters at different scales and spatial frequencies top row shows anti-symmetric (or odd) filters, bottom row the symmetric (or even) filters.

Gabor filters are examples of Wavelets • We know two bases for images: –

Gabor filters are examples of Wavelets • We know two bases for images: – Pixels are localized in space. – Fourier are localized in frequency. • Wavelets are a little of both. • Good for measuring frequency locally.

Markov Model • Captures local dependencies. – Each pixel depends on neighborhood. • Example,

Markov Model • Captures local dependencies. – Each pixel depends on neighborhood. • Example, 1 D first order model P(p 1, p 2, …pn) = P(p 1)*P(p 2|p 1)*P(p 3|p 2, p 1)*… = P(p 1)*P(p 2|p 1)*P(p 3|p 2)*P(p 4|p 3)*…

Markov Chains • Markov Chain – a sequence of random variables – is the

Markov Chains • Markov Chain – a sequence of random variables – is the state of the model at time t – Markov assumption: each state is dependent only on the previous one • dependency given by a conditional probability: – The above is actually a first-order Markov chain – An N’th-order Markov chain:

Markov Random Field A Markov random field (MRF) • generalization of Markov chains to

Markov Random Field A Markov random field (MRF) • generalization of Markov chains to two or more dimensions. First-order MRF: • probability that pixel X takes a certain value given the values of neighbors A, B, C, and D: A D X B C • Higher order MRF’s have larger neighborhoods * * * * * X * * *

Texture Synthesis [Efros & Leung, ICCV 99] • Can apply 2 D version of

Texture Synthesis [Efros & Leung, ICCV 99] • Can apply 2 D version of text synthesis

Synthesizing One Pixel SAMPLE x sample image Generated image – What is ? –

Synthesizing One Pixel SAMPLE x sample image Generated image – What is ? – Find all the windows in the image that match the neighborhood • consider only pixels in the neighborhood that are already filled in – To synthesize x • pick one matching window at random • assign x to be the center pixel of that window

Really Synthesizing One Pixel SAMPLE x sample image Generated image – An exact neighbourhood

Really Synthesizing One Pixel SAMPLE x sample image Generated image – An exact neighbourhood match might not be present – So we find the best matches using SSD error and randomly choose between them, preferring better matches with higher probability

Growing Texture – Starting from the initial image, “grow” the texture one pixel at

Growing Texture – Starting from the initial image, “grow” the texture one pixel at a time

Window Size Controls Regularity

Window Size Controls Regularity

More Synthesis Results Increasing window size

More Synthesis Results Increasing window size

More Results reptile skin aluminum wire

More Results reptile skin aluminum wire

Failure Cases Growing garbage Verbatim copying

Failure Cases Growing garbage Verbatim copying

Image-Based Text Synthesis

Image-Based Text Synthesis

Synthesis with Gabor filter Representation (Bergen and Heeger)

Synthesis with Gabor filter Representation (Bergen and Heeger)

There are dependencies in Filter Outputs • Edge – Filter responds at one scale,

There are dependencies in Filter Outputs • Edge – Filter responds at one scale, often does at other scales. – Filter responds at one orientation, often doesn’t at orthogonal orientation. • Synthesis using wavelets and Markov model for dependencies: – De. Bonet and Viola – Portilla and Simoncelli

Conclusions • Model texture as generated from random process. • Discriminate by seeing whether

Conclusions • Model texture as generated from random process. • Discriminate by seeing whether statistics of two processes seem the same. • Synthesize by generating image with same statistics.