Download presentation
Presentation is loading. Please wait.
1
Texture
2
What is Texture?
3
What is Texture No formal definition
There is significant variation in intensity levels between nearby pixels Texture is a homogeneous property at some spatial scale A characteristic of the human visual system is that textures are perceived as homogeneous regions by a human observer even though textures do not have uniform intensity
4
Texture Apparent homogeneous regions: Sand on a beach A brick wall
In both cases the HVS will interpret areas of sand or bricks as a ‘region’ in an image But, close inspection will reveal strong variations in pixel intensity
5
Texture A single pixel does not have texture.
Texture is the property of a ‘group of pixels’ The ‘group of pixels’ can define a Texture Primitive Texture Element Texture is scale dependent – at different scales texture will take on different properties
6
Scale Dependency Scale is important – consider sand Close up -
“small rocks, sharp edges” “rough looking surface” “smoother” Far Away “one object brown/tan color”
7
Terms (Properties) Used to Describe Texture
Coarseness Roughness Direction Frequency Uniformity Density How would describe dog fur, cat fur, grass, wood grain, pebbles, cloth, steel??
8
“The object has a fine grain and a smooth surface”
Can we define these terms precisely in order to develop a computer vision recognition algorithm?
9
Features Tone – based on pixel intensity in the texture primitive
Structure – spatial relationships between primitives A pixel can be characterized by its Tonal/Structural properties of the group of pixels it belongs to
10
Spatial Relationship of Primitives:
Tonal: Average intensity Maximum intensity Minimum intensity Size, shape Spatial Relationship of Primitives: Random Pair-wise dependent
11
Artificial Texture OO OX OX OX XX OOOOOOOOXXXXXXXXXXX
12
Artificial Texture OO OX OX OX XX OOOOOOOOXXXXXXXXXXX
Segmenting into regions based on texture
13
Color Can Play an Important role in Texture
OO OX OX OX XX OOOOOOOOXXXXXXXXXXX
14
Color Can Play an Important Role in Texture
OO OX OX OX XX OOOOOOOOXXXXXXXXXXX
15
Statistical and Structural Texture
Consider a brick wall: Statistical Pattern – close up pattern in bricks Structural (Syntactic) Pattern – brick pattern OX on previous slides can be represented by a grammar, such as, ababab )
16
Most current research focuses on statistical texture
Edge density is a simple texture measure - edges per unit distance Segment object based on edge density HOW DO WE ESTIMATE EDGE DENSITY??
17
Move a window across the image
and count the number of edges in the window ISSUE – window size? How large should the window be? What are the tradeoffs? How does window size affect accuracy of segmentation? Segment object based on edge density
18
Move a window across the image
and count the number of edges in the window ISSUE – window size? How large should the window be? Large enough to get a good estimate Of edge density What are the tradeoffs? Larger windows result in larger overlap between textures How does window size affect Accuracy of segmentation? Smaller windows result in better region segmentation accuracy, but poorer Estimate of edge density Segment object based on edge density
19
Average Edge Density Algorithm
Smooth image to remove noise Detect edges by thresholding image Count edges in n x n window Assign count to edge window Feature Vector [gray level value, edge density] Segment image using feature vector
20
Run Length Coding Statistics
Runs of ‘similar’ gray level pixels Measure runs in the directions 0,45,90,135 1 2 3 Y( L, LEV, d) Where L is the number of runs of length L LEV is for gray level value and d is for direction d Image
21
1 2 3 1 2 3 4 1 2 3 4 Image 45 degrees 0 degrees Run Length, L
1 2 3 Image 45 degrees 0 degrees Run Length, L Run Length, L 1 2 3 4 1 2 3 4 Gray Level, LEV Gray Level, LEV
22
1 2 3 1 2 3 4 1 2 3 4 Image 45 degrees 0 degrees Run Length, L
1 2 3 Image 45 degrees 0 degrees Run Length, L Run Length, L 1 2 3 4 1 2 3 4 Gray Level, LEV Gray Level, LEV
23
Run Length Coding For gray level images with 8 bits 256 shades of gray 256 rows 1024x1024 1024 columns Reduce size of matrix by quantizing: Instead of 256 shades of gray, quantize each 8 levels into one resulting in 256/8 = 32 rows Quantize runs into ranges; run 1-8 first column, 9-16 the second…. Results in 128 columns
24
Gray Level Co-occurrence Matrix, P[i,j]
Specify displacement vector d = (dx,dy) Count all pairs of pixels separated by d having gray level values i and j Consider simple image with gray level values 0,1,2 Let d = (1,1) One pixel right One pixel down 2 1 x y
25
2 1 Count all pairs of pixels in which the first pixel has value i and the second value j displaced by d. P(1,0) 1 P(2,1) 2 1 Etc. There are 16 pairs, so normalize by 16
26
Co-occurrence Matrix, P[i,j]
2 1 1 2 3 i P[i,j]
27
Uniform Texture x d=(1,1) y Let Black = 1, White = 0 P[i,j] P(0,0)=
28
Uniform Texture x d=(1,1) y Let Black = 1, White = 0 P[i,j] P(0,0)= 24
29
Uniform Texture x d=(1,0) y Let Black = 1, White = 0 P[i,j] P(0,0)= ?
30
Uniform Texture x d=(1,0) y Let Black = 1, White = 0 P[i,j] P(0,0)= 0
31
Randomly Distributed Texture
What if the Black and white pixels where randomly distributed? What will matrix P look like??
32
Randomly Distributed Texture
What if the Black and white pixels where randomly distributed? What will matrix P look like?? No preferred set of gray level pairs, matrix P will have approximately a uniform population
33
Co-occurrence Features
Gray level co-occurrence matrices are referred to as GLCM Typically GLCM are calculated at four different angles, 0, 45,90 and 135 degrees For each angles different distances can be used, d=1,2,3, etc. Each matrix will be 256x256 for an 8 bit image. Quantizing the image will result in smaller matrices. A six bit image will result in 64x64 matrices 14 features can be calculated from each GLCM. The features are used for texture calculations
34
Co-occurrence Features
P(ga,gb,d,t) : ga gray level pixel ‘a’ gb gray level pixel ‘b’ d distance d t angle t (0, 45,90,135 In many applications the transition ga to gb and gb to ga are both counted. This results in symmetric GLCMs: For P(0,0,1,0) results in an entry of 2 for the ‘0 0’ entry
35
Co-occurrence Features
The data in the GLCM are used to derive the features, not the original image data Contrast = Pi,j * (i-j)2 How do you interpret the contrast equation?
36
Co-occurrence Features
The data in the GLCM are used to derive the features, not the original image data Contrast = Pi,j * (i-j)2 How do you interpret the contrast equation? The (i-j)2 term is a weighing factor, values along the diagonal where i=j are multiplied by zero. These values represent adjacent image pixels that do not have a gray level difference. Entries further away from the diagonal represent pixels that have a greater gray level difference, that is more contrast, and are multiplied by a larger weighing factor. NOTE: The weighing factor is a squared term
37
Co-occurrence Features
Dissimilarity = Pi,j * |i-j| Dissimilarity is similar to contrast, except the weights increase linearly
38
Co-occurrence Features
Inverse Difference Moment IDM = Pi,j / [ 1+(i-j)2 ] IDM has smaller numbers for images with high contrast, larger numbers for images low contrast
39
Co-occurrence Features
Angular Second Moment measures orderliness. Orderliness measures how regular or orderly the pixel values are in the window ASM = Pi,j 2 Energy is the square root of ASM, E = Pi,j 2 Entropy = Pi,j 2 * ( -ln Pi,j ) with the assumption ln(0)=0
40
Regional Descriptors Texture
41
Random texture is analyzed by statistical methods.
Regional Descriptors Texture Texture is usually defined as the smoothness or roughness of a surface. In computer vision, it is the visual appearance of the uniformity or lack of uniformity of brightness and color. There are two types of texture: random and regular. Random texture cannot be exactly described by words or equations; it must be described statistically. The surface of a pile of dirt or rocks of many sizes would be random. Regular texture can be described by words or equations or repeating pattern primitives. Clothes are frequently made with regularly repeating patterns. Random texture is analyzed by statistical methods. Regular texture is analyzed by structural or spectral (Fourier) methods.
42
Statistical Approaches
Regional Descriptors Statistical Approaches Let z be a random variable denoting gray levels and let p(zi), i=0,1,…,L-1, be the corresponding histogram, where L is the number of distinct gray levels. The nth moment of z: The measure R: The uniformity: The average entropy:
43
Statistical Approaches
Regional Descriptors Statistical Approaches Smooth Coarse Regular
44
Structural Approaches
Regional Descriptors Structural Approaches Structural concepts: Suppose that we have a rule of the form S→aS, which indicates that the symbol S may be rewritten as aS. If a represents a circle [Fig (a)] and the meaning of “circle to the right” is assigned to a string of the form aaaa… [Fig (b)] .
45
Regional Descriptors Spectral Approaches For non-random primitive spatial patterns, the 2-dimensional Fourier transform allows the patterns to be analyzed in terms of spatial frequency components and direction. It may be more useful to express the spectrum in terms of polar coordinates, which directly give direction as well as frequency. Let is the spectrum function, and r and are the variables in this coordinate system. For each direction , may be considered a 1-D function For each frequency r, is a 1-D function. A global description:
46
Regional Descriptors Spectral Approaches
47
Regional Descriptors Spectral Approaches
48
Moments of Two-Dimensional Functions
Regional Descriptors Moments of Two-Dimensional Functions For a 2-D continuous function f(x,y), the moment of order (p+q) is defined as The central moments are defined as
49
Moments of Two-Dimensional Functions
Regional Descriptors Moments of Two-Dimensional Functions If f(x,y) is a digital image, then The central moments of order up to 3 are
50
Moments of Two-Dimensional Functions
Regional Descriptors Moments of Two-Dimensional Functions The central moments of order up to 3 are
51
Moments of Two-Dimensional Functions
Regional Descriptors Moments of Two-Dimensional Functions The normalized central moments are defined as
52
Moments of Two-Dimensional Functions
Regional Descriptors Moments of Two-Dimensional Functions A seven invariant moments can be derived from the second and third moments:
53
Moments of Two-Dimensional Functions
Regional Descriptors Moments of Two-Dimensional Functions This set of moments is invariant to translation, rotation, and scale change.
54
Moments of Two-Dimensional Functions
Regional Descriptors Moments of Two-Dimensional Functions
55
Moments of Two-Dimensional Functions
Regional Descriptors Moments of Two-Dimensional Functions Table Moment invariants for the images in Figs (a)-(e).
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.