KEMBAR78
Image Texture Analysis | PDF | Matrix (Mathematics) | Texture Mapping
0% found this document useful (0 votes)
28 views51 pages

Image Texture Analysis

Image processing lesson

Uploaded by

yesn8218
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views51 pages

Image Texture Analysis

Image processing lesson

Uploaded by

yesn8218
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 51

Computer Vision and Image Processing

– Fundamentals and Applications

Image Texture Analysis

n
ay
hu
.B
.K
M

Course Instructor: Dr. M.K. Bhuyan


Professor

Department of Electronics and Electrical Engineering,


Indian Institute of Technology Guwahati, India.
What is Texture?

Repeating pattern of local variations in image intensity.

Characterized by the spatial distribution of intensity levels in a


neighborhood.

n
ay
hu
.B
.K
M
Cannot be defined for a point.

A feature used to partition images into regions of interest and to


classify those regions.

Provides information in the spatial arrangement of colours or


intensities in an image.
What is Texture?

• Texture is a repeating pattern of local variations in


image intensity:

n
ay
hu
.B
.K
M
What is Texture?
For example, an image has a 50% black and 50%
white distribution of pixels.

n
ay
hu
.B
.K
M

Three different images with the same intensity


distribution, but with different textures.
Texture
Texture consists of texture primitives or texture
elements, sometimes called texels (a group of pixels
having homogenous property)

– Texture can be described as fine, coarse, grained, smooth, etc.

n
ay
– Such features are found in the tone and structure of a texture.

hu
.B
.K
M
– Tone is based on pixel intensity properties in the texel,
while structure represents the spatial relationship between texels.

– If texels are small and tonal differences between texels are large
a fine texture results.

– If texels are large and consist of several pixels, a coarse texture


results.
Texture Analysis
Four primary issues in texture analysis:

- texture classification
- texture segmentation
- texture synthesis

n
- shape from texture

ay
hu
.B
.K
M
Texture classification is concerned with identifying a given textured region
from a given set of texture classes.
Each of these regions has unique texture characteristics.
Statistical methods are extensively used.
(e.g. GLCM, contrast, entropy, homogeneity)

Texture segmentation is concerned with automatically determining the


boundaries between various texture regions in an image. Partition into
different regions where the texture is homogenous.

n
ay
hu
.B
.K
Texture synthesis is the process of algorithmically constructing a large
M
digital image from a small digital sample image by taking advantage of its
structural content. Given a finite sample of some textures, the goal is to
synthesize other samples from that texture.

Shape from texture: Texture pattern variations give cue to estimate shape
of a surface.
M
.K
.B
hu
ay
n
M
.K
.B
hu
ay
n
The Goal of Texture Synthesis

n
ay
hu
.B
.K
M

Given a finite sample of some texture, the goal is to synthesize


other samples from that same texture
M
.K
.B
hu
ay
n
M
.K
.B
hu
ay
n
M
.K
.B
hu
ay
n
M
.K
.B
hu
ay
n
M
.K
.B
hu
ay
n
M
.K
.B
hu
ay
n
M
.K
.B
hu
ay
n
n
ay
hu
.B
.K
M

Texture Synthesis, Daniel Cohen-Or


M
.K
.B
hu
ay
n
M
.K
.B
hu
ay
n
M
.K
.B
hu
ay
n
M
.K
.B
hu
ay
n
M
.K
.B
hu
ay
n
M
.K
.B
hu
ay
n
Defining Texture
There are three approaches to defining exactly what
texture is:
Structural : texture is a set of primitive texels in some
regular or repeated relationship. When the size of the
texture primitive is large, first determine the shape and properties
of the basic primitive and the rules which govern the placement of
these primitives, forming macrotextures.

n
ay
hu
.B
.K
M
Statistical : texture is a quantitative measure of the
arrangement of intensities in a region.
This set of measurements is called a feature vector.
Statistical methods are particularly useful when the texture
primitives are small, resulting in microtextures.

Spectral: Fourier Transform for texture representation.


Texture Descriptors
Purpose: to describe “texture” of the region.
Examples: optical microscope images:

B C

n
ay
hu
.B
.K
M

Superconductor Cholesterol Microprocessor


(smooth texture) (coarse texture) (regular texture)
Statistical Approaches for Texture Descriptors
We can use statistical moments computed from an image histogram:
L −1
z = intensity
n ( z ) =  ( zi − m) p( zi ) n
p(z) = PDF or histogram of z
i =0

where L −1
m =  zi p( zi )
i =0

n
Example: The 2nd moment = variance → measure “smoothness”

ay
hu
.B
The 3rd moment → measure “skewness”
.K
M
The 4th moment → measure “uniformity” (flatness)
L −1
1
Variance  =  ( zi − m)2 p( zi ) Roughness factor R = 1 −
2

i =0 1+ 2
[Information of Smoothness R=0 & Coarseness R=1]
L −1
Skewness parameter 3 ( z ) =  ( zi − m)3 p( zi ) Direction of intensity change.
i =0
L −1
Average entropy e( z ) = −  p( zi ) log 2 p( zi ) [Measure of variability]
i =0
Statistical Approaches for Texture Descriptors

n
ay
hu
.B
.K
M
Smooth texture Coarse texture Regular texture

A
B
C
Gray Level Co-occurrence
The statistical measures described so far are easy to
calculate, but do not provide any information about the
repeating nature of texture.

n
ay
hu
.B
.K
M
A gray level co-occurrence matrix (GLCM)
contains information about the positions of pixels having
similar gray level values.
M
.K
.B
hu
ay
n
GLCM

A co-occurrence matrix is a two-dimensional array, P,


in which both the rows and the columns represent a
set of possible image values.

n
ay
hu
.B
.K
A GLCM Pd[i,j] is defined by first specifying a
M
displacement vector d=(dx,dy) and counting all pairs
of pixels separated by d having gray levels i and j.
GLCM

The GLCM is defined by:

Pd [i, j ] = nij

n
ay
– where nij is the number of occurrences of the pixel

hu
.B
.K
M
values (i,j) lying at distance d in the image.

– The co-occurrence matrix Pd has dimension n× n,


where n is the number of gray levels in the image.
GLCM
For example, if d=(1,1)

n
ay
hu
.B
.K
M

there are 16 pairs of pixels in the image which satisfy


this spatial separation. Since there are only three gray
levels, P[i,j] is a 3×3 matrix.
GLCM
Algorithm:

• Count all pairs of pixels in which the first pixel has a value
i, and its matching pair displaced from the first pixel by d
has a value of j.

n
ay
hu
.B
.K
M
• This count is entered in the ith row and jth column of the
matrix Pd[i,j]

• Note that Pd[i,j] is not symmetric, since the number of


pairs of pixels having gray levels [i,j] does not necessarily
equal the number of pixel pairs having gray levels [j,i].
Normalized GLCM

• The elements of Pd[i,j] can be normalized by dividing


each entry by the total number of pixel pairs i.e., total no. of point
pairs (n) in the image that satisfies Pd [i,j] . Divide each & every
element of Pd [i,j] by n to get the matrix N(i,j) .
Normalized GLCM N[i,j], defined by:

n
ay
hu
.B
.K
Pd [i, j ]
M
N [i, j ] =
 Pd [i, j ]
i j

which normalizes the co-occurrence values to lie between 0 and 1,


and allows them to be thought of as probabilities i.e., N(i,j) is an
estimate of the joint probability distribution.
Numeric Features of GLCM

• Gray level co-occurrence matrices capture properties of a


texture but they are not directly useful for further analysis,
such as the comparison of two textures.

n
ay
• Numeric features are computed from the co-occurrence

hu
.B
.K
M
matrix that can be used to represent the texture more
compactly.
➢Maximum probability.
➢Moments.

➢Contrast.

➢Uniformity & Homogeneity.

➢Entropy
Quantitative Texture Measures
➢ Numeric quantities or statistics that describe a texture
can be calculated from the intensities (or colors)
themselves
➢ One problem with deriving texture measures from co-

n
ay
occurrence matrices is how to choose the displacement

hu
.B
.K
M
vector d.
➢ The choice of the displacement vector is an important
parameter in the definition of the GLCM.
➢ Occasionally the GLCM is computed from several values
of d and the one which maximizes a statistical measure
computed from P[i,j] is used.
Maximum Probability
This is simply the largest entry in the matrix, and
corresponds to the strongest response of Pd [i, j ] . This
could be the maximum in any of the matrices or the
maximum overall.

n
ay
hu
Cm = max N [i, j ]

.B
.K
M
i, j
Moments

• The order k element difference moment can be defined as:

Momk =  (i − j ) N [i, j ]
k

i j

n
ay
hu
.B
.K
M
• This descriptor has small values in cases where the
largest elements in N are along the principal diagonal.
The opposite effect can be achieved using the inverse
moment.
N [i, j ]
Momk =  , i j
j (i − j )
k
i
Contrast
• Contrast is a measure of the local variations present in
an image (a measure of intensity contrast between a
pixel and its neighbor over the entire image).

Contrast =  (i − j ) N [i, j ]
k

n
ay
hu
.B
.K
i j

• If there is a large amount of variation in an image, the


N[i,j]’s will be concentrated away from the main diagonal
and contrast will be high.
Homogeneity
• A homogeneous image will result in a co-occurrence
matrix with a combination of high and low N[i,j]’s.

N [i, j ]
Ch = 
j 1+ i − j

n
ay
hu
i

.B
.K
M
– Where the range of gray levels is small, the N[i,j] will
tend to be clustered around the main diagonal.
– A heterogeneous image will result in an even spread
of N[i,j]’s.
Uniformity
• A measure of uniformity in the range [0,1]. Uniformity is
1 for a constant image. It is highest when N[i, j]’s are all
equal.

Uniformity =  N 2 [i, j ]

n
ay
hu
i j

.B
.K
M

.
Entropy
• Entropy is a measure of information content. It measures
the randomness of intensity distribution.

Ce = − N [i, j ]ln N [i, j ]


i j

n
ay
hu
.B
.K
– Such a matrix corresponds to an image in which there are no
M
preferred gray level pairs for the distance vector d.
– Entropy is highest when all entries in N[i,j] are of similar
magnitude, and small when the entries in N[i,j] are unequal.
Correlation
• Correlation is a measure of image linearity

[ijN [i, j ]] −   i j

Cc = i j

 i j

n
ay
hu
.B
.K
M
i =  iN [i, j ],  i2 =  i 2 N [i, j ] − i2

• Correlation will be high if an image contains a considerable


amount of linear structure.
Fourier Approach for Texture Descriptor
Concept: convert 2D spectrum into 1D graphs

Fourier
Original FFT2D coefficient Divide into areas
image +FFTSHIFT by angles
image

n
ay
Divide into areas

hu
Sum all pixels

.B
.K
M
by radius in each area

R0
S (r ) =  S (r )
r =1


Sum all pixels S ( ) =  Sr ( )
in each area  =0
Fourier Approach for Texture Descriptor

Original 2D Spectrum
image (Fourier Tr.)

n
S(r) S()

ay
hu
.B
.K
M

Another Another S()


image
A 2D Gabor function consists of a sinusoidal plane wave of a certain frequency and orientation modulated
by a Gaussian envelope.

n
ay
hu
.B
.K
M
M
.K
.B
hu
ay
n
Filtering Approach
A 2D Gabor function consists of a sinusoidal plane wave of a certain frequency and orientation
modulated by a Gaussian envelope.

 1  x2 y 2  
f ( x, y ) = exp  −  2 + 2   cos(2 u0 x +  )
 2  x  y  
  
where u0 and  are the frequency and phase of the sinusoidal wave.

The value of  x and  y are the sizes of the Gaussian envelope in x and y directions. The Gabor function
at an arbitrary orientation0 can be obtained from the above equation by a rigid rotation of the x-y plane
by 0 .

n
ay
hu
Gabor filter is a frequency and orientation selective filter.

.B
.K
M
For phase  = 0, FT of Gabor function is
  1  (u − u0 ) 2 v 2      1  (u − u0 ) 2 v 2   
F (u, v) = A  exp  −  + 2    + exp   −  + 2  
  2  2
    2  2
 v   
   u v     u

 u = 1 ( 2 x ) ,  v = 1 ( 2 y ) , A = 2 x y

This function is real-valued and has two lobes in the spatial frequency domain.
For a Gabor filter of a particular orientation, the lobes in the frequency domain
are also approximately rotated.
M
.K
.B
hu
ay
n
Use a bank of Gabor filters at multiple scales and orientations to obtain filtered images.

n
ay
hu
.B
.K
M

You might also like