texture analysis - pushkin.faculty.unlv.edu
TRANSCRIPT
3
5554 - Packet 18 - Page 5
Even very simple textures can convey depth information
5554 - Packet 18 - Page 6
Different textures can indicate different 3D objects
Texture 1
Texture 3
Texture 4
Texture 5
Texture 2
4
5554 - Packet 18 - Page 7
Main topics in texture analysis
• Definitions• Applications• Texture primitives• Statistical texture analysis• Structural texture analysis• Shape from texture
5554 - Packet 18 - Page 8
What is texture?
• Visual texture is something that everyone understands, but it is difficult to define– "Despite its importance and ubiquity in image data, a formal
approach or precise definition of texture does not exist."(R. M. Haralick, 1979)
– Texture is "something composed of closely interwoven elements."(Webster's dictionary)
• Texture is "repeating patterns of local variations in image intensitywhich are too fine to be distinguished as separate objects at the observed resolution."(Jain, Kasturi, and Schunck, 1995)
5
5554 - Packet 18 - Page 9
Why should we study texture?
• Texture analysis has been used in– industrial inspection– image segmentation
(especially satellite imagery, for such applications as distinguishing forests from urban areas, etc.)
– shape analysis– estimation of object range and orientation
• Texture holds important information about image content(but that information can be difficult to extract!)
5554 - Packet 18 - Page 10
Application: find the defects in this image
6
5554 - Packet 18 - Page 11
Application: recognize different types of wood
maple
oak
oak
oak
5554 - Packet 18 - Page 12
• Humans often use qualitative descriptions of texture:– "coarse texture" or "fine texture"– "regular texture" or "irregular texture"– "uniform" or "nonuniform"– "granular"– "periodic"– . . .
• We need to perform a quantitative analysis, but how?
• (The relationship between texture and image intensity is complicated, much like particles and waves in physics)
7
5554 - Packet 18 - Page 13
Texture primitives
• One approach is to identify texture primitives(sometimes called "texels", or "texture elements")and then describe the spatial relations between them
• Examples using circular disks as the texture primitives:
Example of regular texture Example of irregular texture
5554 - Packet 18 - Page 14
Example with nonuniform size and nonuniform positioning of circular texture elements
8
5554 - Packet 18 - Page 15
Texture can exist at different scales
5554 - Packet 18 - Page 16
Statistical texture analysis
• Try to characterize the texture of an image region using statistical measures
• Common examples of this capture information about intensity levels in the image:– mean– standard deviation– moments– . . .– histogram– Gray-Level Co-occurrence Matrix (GLCM)– . . .– Fourier transform– autocorrelation . . .
9
5554 - Packet 18 - Page 17
Histograms for different surfaces
5554 - Packet 18 - Page 18
Notice that all 3 images belowhave the same histogram Is that a problem?
10
5554 - Packet 18 - Page 19
Higher-order statistics
• In a histogram, information about one pixel value is independent of all other pixel values
• We call it a "first-order statistic", and it is similar to the marginal probability
• It is possible to consider n pixels simultaneously, and these are called "nth-order statistics"
• A common second-order statistic resembles the following joint probability
( )( )icrI =,Pr
( ) ( )( )� jccrrIicrI =∆+∆+= ,,Pr
5554 - Packet 18 - Page 20
GLCM
• The Gray-Level Co-occurrence Matrix (GLCM)captures intensity information about pairs of pixels
• First, one needs to specify a particular distance and direction between pixel pairs; usually this is done with a displacement vector
• Example: to capture information about each pixel and its neighbor at the right, use displacement vector d= (0, 1)
• The GLCM contains information about all pixel pairs that lie at p=(r, c) and
( )cr ∆∆= ,d
( )ccrr ∆+∆+=+ ,dp
11
5554 - Packet 18 - Page 21
• The GLCM is defined as
where M is the number of different pixel pairs in the image(based on displacement vector d), and is the number of times that
and
( )���
�
�
���
�
�
=�
�
ijM ajiC 1,
( ) jccrrI =∆+∆+ ,( ) icrI =,ija
5554 - Packet 18 - Page 22
Simple GLCM example
������
�
�
������
�
�
2332022321322103320033110
Original image
201
3200420012100221
3210
⋅
����
�
�
����
�
�
GLCM C(i, j), using d=(0, 1)
3210i =
j =
12
5554 - Packet 18 - Page 23
Compute the GLCM for each of the 3 images shown below.Use displacement vector d = (0, 1)
5554 - Packet 18 - Page 24
Some observations
• If the original image has randomly distributed intensity values, then the GLCM is will tend to have a constant value (1/M) in every cell
• But if the original image has pixel pairs that correspond to the chosen displacement vector, then the GLCM will contain a large "spike"
• An image with coarse texture will tend to have large valuesalong the diagonal of the GLCM,whereas fine texture will often cause values to spread out from the diagonal
13
5554 - Packet 18 - Page 25
Texture measures based on the GLCM
• Energy
• Entropy
• Contrast
• Homogeneity
• etc.
( ) ( )��−i j
jiCjiC ,log,
( )��i j
jiC ,2
( ) ( )�� −i j
jiCji ,2
( )�� −+i j ji
jiC1
,
5554 - Packet 18 - Page 26
• Notice that the GLCM is not necessarily symmetric• Suppose we wish to consider these 2 cases as being
equivalent
• The symmetric GLCM is defined as
( ) ( ) ( )[ ]dd −+= jiCjiCjiCs ,,, 21
( ) ( )[ ]dd jiCjiC T ,,21 +=
a
b a
b
14
5554 - Packet 18 - Page 27
Structural texture analysis
• For statistical texture analysis, we simply used pixel values as the texture elements
• For a higher-level structural texture analysis, the usual approach is to detect texture elements, and then try to find a compact description of their spatial distribution
• Structural analysis is difficult, and is a topic of on-going research
5554 - Packet 18 - Page 28
Shape from texture
• Consider the following situation
• It seems that we should be able to extract information about the orientation of the flat object by analyzing the image texture
16
5554 - Packet 18 - Page 31
5554 - Packet 18 - Page 32
Shape from texture: the basic idea
• Identify texture elements ("texels")• If they lie on a regular grid, then
– Fit lines through the texel centers (possibly using the Hough transform)
– Locate vanishing points in the image– Calculate surface orientation using the vanishing points
• If they do not lie on a grid, then– Compute a "texture gradient" (which indicates the direction and
rate of change of a texel parameter, such as size)– Estimate the surface orientation using the texture gradient
(a greater rate of change suggests a surface that is more steeply inclined with respect to the camera)
17
5554 - Packet 18 - Page 33
Summary
• Visual texture is an important aspect of image analysis• Several statistical texture measures have been defined
(but none of them is perfect)– Image histograms are very common for many image-analysis
tasks – GLCMs are commonly used to characterize texture
• Structural texture measures seem like a good idea, and research is in progress in this area
• Shape from texture is also an important research area