You are on page 1of 34

CS6825: Texture

Why Texture?
1. Texture based matching
2. Texture segmentation
key issue: representing texture
3. Texture synthesis
graphics
4. Shape from texture
other techniques possibly more robust

1. Texture Discrimination/Analysis
(Freeman)
2. Synthesis
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.
Gradient in the spacing of the barrels (Gibson 1957)
Different Textures are
present at different
scales!!!!

1. Spacing of barrels is
a larger (more
global) texture.
2. Look at the wood
grain on each barrel
that is another
texture
Texture gradient associated to converging lines (Gibson1957)
Simplest Texture
Each pixel
independent,
identically
distributed (iid).
Examples:
Region of constant
intensity.
Gaussian noise
pattern.
Speckled pattern

One way to model Texture is then
Statistics
Given Two samples.ask the
following:
Texture Matching: Do they come from
the same random process?
Simplest Texture Matching
Compare histograms.
Divide intensities into discrete ranges.
Count how many pixels in each range.
0-25 26-50 225-250 51-75 76-100
Histogram comparison cont.
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?


i
j
k
Chi-square
0.1
0.8
}
}

=
+

=
K
m
j i
j i
j i
m h m h
m h m h
h h
1
2
2
) ( ) (
)] ( ) ( [
2
1
) , ( _
Chi square distance between text on
histograms

Some Easy to Calculate Texture
Measures straight from image
values
Energy


Entropy



( )

= =

=
M
x
N
y
i i
y x I
N M
e
1 1
2
,
1
( ) ( ) y x I y x I
N M
Entropy
i
M
x
N
y
i i
, log ,
1
1 1

= =

=
Continued.texture metrics
Kurtosis


Skew

Variance

( ) | |
3
,
4
1 1
4

= =
o

N M
y x I
k
M
x
N
y
i
( ) | |
3
1 1
3
,
o

= =
N M
y x I
Skew
M
x
N
y
i
( ) | |
N M
y x I
M
x
N
y
i

=

= = 1 1
2
2
,
o
More Complex Matching
Histogram comparison is very limiting
Every pixel is independent.
Everything happens at a tiny scale.

Use output of filters of different scales.
Markov models also can be used: idea
here is that each pixel depends (unlike
assumption with histogram where we
assumed independent) on neighborhood

Markov Model
Captures local dependencies.
Each pixel depends on neighborhood.
Example, 1D first order model
P(p1, p2, pn) =
P(p1)*P(p2|p1)*P(p3|p2,p1)*
=
P(p1)*P(p2|p1)*P(p3|p2)*P(p4|p3)*

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 Nth-order Markov chain:
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:
D
C
X
A
B
X
- - -
- -
- - -
X
- - -
- -
- - -
-
-
-
-
Higher order MRFs have larger neighborhoods
Texture Synthesis
Synthesis using Markov model for
dependenciesexamples in literature:
DeBonet and Viola
Portilla and Simoncelli
Example of texture synthesis with Markov
Random Field models
Original image- water
Synthesized using
MRF
Synthesized using
multi resolution MRF
Images taken from www.ghcc.msfc.nasa.gov/
landncrst/infoextract.html
Texture Synthesis
Many proposals do a search
Multi-resolution techniques (as last
slide showed) can be more
successful
Texture Analysis
We can use the techniques to
synthesize to analyze/recognize
textures.
Measuring Texture
Many techniques proposedhere are
a few
GLCM (Gray level Co-occurrence Matrices)
Laws Texture Energy Measures
Wavelets
Steerable Pyramids

Texture Measuring Grey Level
Co-occurrence Matrix
2D histogram of image intensities
P(i,j,d, u ) = Number of pixels with
grey level i with another pixel with
grey level j with the distance
between them d and in direction u

grey level i
grey level j
d
u
These P(i,j,d, u)
give occurrence of
such patterned separations
.it is a form of texture
measurement
Grey Level Co-occurrence
Matrix Example
Here is an example (toy) image and
its GLCM
50 51 52 50
53 51 51 52
51 50 51 52
52 53 53 52


Intensity image
50 51 52 53
50 0 2 0 0
51 1 1 3 0
52 1 0 0 1
53 0 1 1 1


P(i,j) only where
d=1, u=0
o
so we c see
it.cant show you
easily 4D for 4
parameters i,j,d, u
grey level i grey level j
d =1
Pattern we are
capturing
i
j
What is wrong with GLCM
A lot of values.too many?
Takes a while to
compute.computations.
Doesnt work too well for coarse
textures (far apart)
Noise can through things for a loop.

Derive measures from GLCM
Idea reduce size of GLCM (N
d
in
equations below )by creating some
smaller number of metrics from the
GLCMlike Energy, Entropy, Contrast
and Homgeneity

Another Texture Measure
Laws Texture Energy Filters
Based on different filters/ masks
(edge oriented) you apply to image.
25 Masks by convolution of 5 1-D
vectors
Level L5 = [ 1 4 6 4 1]
Edge E5 = [-1 -2 0 2 1]
Spot S5 = [-1 0 2 0 -1]
Wave W5= [-1 2 0 -2 1]
Ripple R5= [ 1 -4 6 -4 1]

Laws Texture Energy Filter
Results
Here are some results of applying these filters
picking up different spatial patterns,
Wavelets and Texture
Another comment measurement of
texture is through the use of a
Wavelet Transform.
Idea:
Captures different resolutions (scales) of
texture.
Has information at different scales.
Works in both the spatial and frequency
domain

Wavelet Transform Result
There is more than 1 wavelet transform (like there was
more than one kind of frequency transform we learned
about).
We will discuss the math behind wavelets later in class (see
future lecture)
Here are some resultslook at the different scales.
Bottom resolution
captures DC frequency..
the grey values themself
Steerable Pyramids
Apply a series of Low Pass and then
band pass filters to capture different
scales of texture.
In this sense like wavelets
multiresolution.
Steerable Pyramids
Image
High Pass Filter
Low Pass 1
Band Pass 1
Band Pass 2
Band Pass 3
Band Pass n
Low Pass
2
(Recursive)
2

Steerable Pyramids

You might also like