texture analysis using gabor filterssdas/courses/cv_dip/pdf/lect-gabor_filt.pdf · some properties...

38
TEXTURE ANALYSIS USING GABOR FILTERS

Upload: others

Post on 12-May-2020

25 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: TEXTURE ANALYSIS USING GABOR FILTERSsdas/courses/CV_DIP/PDF/Lect-Gabor_filt.pdf · Some properties of Gabor filters: • A tunable bandpass filter • Similar to a STFT or windowed

TEXTURE ANALYSIS

USING

GABOR FILTERS

Page 2: TEXTURE ANALYSIS USING GABOR FILTERSsdas/courses/CV_DIP/PDF/Lect-Gabor_filt.pdf · Some properties of Gabor filters: • A tunable bandpass filter • Similar to a STFT or windowed
Page 3: TEXTURE ANALYSIS USING GABOR FILTERSsdas/courses/CV_DIP/PDF/Lect-Gabor_filt.pdf · Some properties of Gabor filters: • A tunable bandpass filter • Similar to a STFT or windowed

• Definition of Texture

• Texture types

Texture Types

Next >< Prev

Synthetic Natural Stochastic

Page 4: TEXTURE ANALYSIS USING GABOR FILTERSsdas/courses/CV_DIP/PDF/Lect-Gabor_filt.pdf · Some properties of Gabor filters: • A tunable bandpass filter • Similar to a STFT or windowed

Texture Definition

• Purpose of texture analysis:– To identify different textured and non-

textured regions in an image.– To classify/segment different texture regions in

an image.– To extract boundaries between major texture

regions.– To describe the texel unit.– 3-D shape from texture

Texture: the regular repetition of an element or pattern on a surface.

Ref: [Forsyth2003, Raghu95]

Page 5: TEXTURE ANALYSIS USING GABOR FILTERSsdas/courses/CV_DIP/PDF/Lect-Gabor_filt.pdf · Some properties of Gabor filters: • A tunable bandpass filter • Similar to a STFT or windowed

Texture Regions & Edges

Next >< Prev

Page 6: TEXTURE ANALYSIS USING GABOR FILTERSsdas/courses/CV_DIP/PDF/Lect-Gabor_filt.pdf · Some properties of Gabor filters: • A tunable bandpass filter • Similar to a STFT or windowed

IIT Madras

VP LAB

Image histograms

R1 R2

R3

R1 R2

R3R4 R4

Textured image

Page 7: TEXTURE ANALYSIS USING GABOR FILTERSsdas/courses/CV_DIP/PDF/Lect-Gabor_filt.pdf · Some properties of Gabor filters: • A tunable bandpass filter • Similar to a STFT or windowed

Input Image

FILTERING

SMOOTHING

CLASSIFIER

Segmented Image

Flow-chart of a typical method of texture classification

Page 8: TEXTURE ANALYSIS USING GABOR FILTERSsdas/courses/CV_DIP/PDF/Lect-Gabor_filt.pdf · Some properties of Gabor filters: • A tunable bandpass filter • Similar to a STFT or windowed

Synthetic TextureImage

Horizontal intensity profile

Filtered output

Nonlinear transform Smoothing

Segmented image

Page 9: TEXTURE ANALYSIS USING GABOR FILTERSsdas/courses/CV_DIP/PDF/Lect-Gabor_filt.pdf · Some properties of Gabor filters: • A tunable bandpass filter • Similar to a STFT or windowed

Processing of Texture-like Images2-D Gabor Filter

A typical Gaussian filter with σ=30

A typical Gabor filter with

σ=30, ω=3.14 and θ=45°

⎥⎦⎤

⎢⎣⎡ +++

−= )sincos(

21exp

21),,,,,( ))()(( 22 θθω

σσσπσσσθω yxjyxyxf

yxyxyx

Next >< Prev

Page 10: TEXTURE ANALYSIS USING GABOR FILTERSsdas/courses/CV_DIP/PDF/Lect-Gabor_filt.pdf · Some properties of Gabor filters: • A tunable bandpass filter • Similar to a STFT or windowed

Gabor filters with different combinations of spatial width σ, frequency ω and orientation θ.

Page 11: TEXTURE ANALYSIS USING GABOR FILTERSsdas/courses/CV_DIP/PDF/Lect-Gabor_filt.pdf · Some properties of Gabor filters: • A tunable bandpass filter • Similar to a STFT or windowed

)2

exp(21),,(

2

2 xjxxf ωσσπ

σω +−

=

⎥⎦⎤

⎢⎣⎡ +++

−= )sincos())()((

21exp

21),,,,,( 22 θθω

σσσπσσσθω yxjyxyxf

yxyxyx

⎟⎟⎠

⎞⎜⎜⎝

⎛ −= 2

2

1 2exp

21)(

σσπxxg

2-D Gabor filter:

1-D Gabor filter:

1-D Gaussian function:

whereσ is the spatial spreadω is the frequencyθ is the orientation

Page 12: TEXTURE ANALYSIS USING GABOR FILTERSsdas/courses/CV_DIP/PDF/Lect-Gabor_filt.pdf · Some properties of Gabor filters: • A tunable bandpass filter • Similar to a STFT or windowed

)2

exp(21),,(

2

2 xjxxf ωσσπ

σω +−

=⎟⎟⎠

⎞⎜⎜⎝

⎛ −= 2

2

1 2exp

21)(

σσπxxg

Processing of Texture-like Images1-D Gabor Filter

1-D Gaussian Filter

Odd Component

Even Component

Next >< Prev

Page 13: TEXTURE ANALYSIS USING GABOR FILTERSsdas/courses/CV_DIP/PDF/Lect-Gabor_filt.pdf · Some properties of Gabor filters: • A tunable bandpass filter • Similar to a STFT or windowed

• K : Scales the magnitude of the Gaussian envelop.• (a, b) : Scale the two axis of the Gaussian envelop.• θ : (Rotation) angle of the Gaussian envelop.• (x0, y0) : Location of the peak of the Gaussian envelop.• (u0, v0) : Spatial frequencies of the sinusoidal carrier in Cartesiancoordinates. It can also be expressed in polar coordinates as (F0, ω0).• P : Phase of the sinusoidal carrier.

))sincos(2(exp( )))()((exp(),(

000

20

220

2

PyxFjyybxxaKyxg

++−+−−=ωωπ

π θθ

))(2())()((exp(),(

002

022

02 PyvxujyybxxaK

yxg+++−+−−

=

ππ θθ

Page 14: TEXTURE ANALYSIS USING GABOR FILTERSsdas/courses/CV_DIP/PDF/Lect-Gabor_filt.pdf · Some properties of Gabor filters: • A tunable bandpass filter • Similar to a STFT or windowed

Asymmetric 2-D Gaussian function

Page 15: TEXTURE ANALYSIS USING GABOR FILTERSsdas/courses/CV_DIP/PDF/Lect-Gabor_filt.pdf · Some properties of Gabor filters: • A tunable bandpass filter • Similar to a STFT or windowed

Asymmetrical Gaussian of 128×128 pixels. The parameters are as follows:

x0 = y0 = 0; a = 1/50 pixels; b = 1/40 pixels; θ = −45 deg.

The real and imaginary parts of a complex Gabor function in space domain, with

F0 = sqrt(2)/80 cycles/pixel, ω0 = 45 deg, P = 0 deg.

Page 16: TEXTURE ANALYSIS USING GABOR FILTERSsdas/courses/CV_DIP/PDF/Lect-Gabor_filt.pdf · Some properties of Gabor filters: • A tunable bandpass filter • Similar to a STFT or windowed

at

exf2

)( −=

42

)(

)(ω

π

ωa

ea

F−

=

Gaussian and its integral

Fourier transform of the Gaussian

Fourier transform of the GABOR ??

Page 17: TEXTURE ANALYSIS USING GABOR FILTERSsdas/courses/CV_DIP/PDF/Lect-Gabor_filt.pdf · Some properties of Gabor filters: • A tunable bandpass filter • Similar to a STFT or windowed

The frequency response of a typical dyadic bank of Gabor filters. One center-symmetric pair of lobes in the illustration

represents each filter.

Page 18: TEXTURE ANALYSIS USING GABOR FILTERSsdas/courses/CV_DIP/PDF/Lect-Gabor_filt.pdf · Some properties of Gabor filters: • A tunable bandpass filter • Similar to a STFT or windowed

Some properties of Gabor filters:

• A tunable bandpass filter

• Similar to a STFT or windowed Fourier transform

• Satisfies the lower-most bound of the time-spectrum resolution (uncertainty principle)

• It’s a multi-scale, multi-resolution filter

• Has selectivity for orientation, spectral bandwidth and spatial extent.

• Has response similar to that of the Human visual cortex (first few layers of brain cells)

• Used in many applications – texture segmentation; iris, face and fingerprint recognition.

• Computational cost often high, due to the necessity of using alarge bank of filters in most applications

Page 19: TEXTURE ANALYSIS USING GABOR FILTERSsdas/courses/CV_DIP/PDF/Lect-Gabor_filt.pdf · Some properties of Gabor filters: • A tunable bandpass filter • Similar to a STFT or windowed

TextureImage

Magnitude of theGabor Responses

SmoothedFeatures

Page 20: TEXTURE ANALYSIS USING GABOR FILTERSsdas/courses/CV_DIP/PDF/Lect-Gabor_filt.pdf · Some properties of Gabor filters: • A tunable bandpass filter • Similar to a STFT or windowed

TextureImage

Magnitude of theGabor Responses

SmoothedFeatures

Page 21: TEXTURE ANALYSIS USING GABOR FILTERSsdas/courses/CV_DIP/PDF/Lect-Gabor_filt.pdf · Some properties of Gabor filters: • A tunable bandpass filter • Similar to a STFT or windowed

Natural Textures Initial Classification Final Classification

< Back

Page 22: TEXTURE ANALYSIS USING GABOR FILTERSsdas/courses/CV_DIP/PDF/Lect-Gabor_filt.pdf · Some properties of Gabor filters: • A tunable bandpass filter • Similar to a STFT or windowed

Segmentation using Gabor based features of a texture image containing five regions.

Page 23: TEXTURE ANALYSIS USING GABOR FILTERSsdas/courses/CV_DIP/PDF/Lect-Gabor_filt.pdf · Some properties of Gabor filters: • A tunable bandpass filter • Similar to a STFT or windowed

SIR-C/X-SAR image of Lost City of Ubar

Classification using multispectral information

Classification using multispectral and

textural information

< Back

Page 24: TEXTURE ANALYSIS USING GABOR FILTERSsdas/courses/CV_DIP/PDF/Lect-Gabor_filt.pdf · Some properties of Gabor filters: • A tunable bandpass filter • Similar to a STFT or windowed

Texture Image Output ofCanny’s

algorithm

Desired output

Page 25: TEXTURE ANALYSIS USING GABOR FILTERSsdas/courses/CV_DIP/PDF/Lect-Gabor_filt.pdf · Some properties of Gabor filters: • A tunable bandpass filter • Similar to a STFT or windowed

Texture Boundary Detection

• Edge extraction using 2-D Gabor filters smears the edge information

• The magnitude of the 1-D Gabor filter output is used as a feature to detect boundaries for texture-like images

• Advantage of 1-D processing: Feature extraction and edge extraction are applied along orthogonal directions. The Gaussianfunction (1-D) of the Gabor filter will not effect the edge information in the orthogonal direction

• The edge evidence obtained from a set of Gabor filters are combined using a constraint satisfaction neural network to obtain the final output

Page 26: TEXTURE ANALYSIS USING GABOR FILTERSsdas/courses/CV_DIP/PDF/Lect-Gabor_filt.pdf · Some properties of Gabor filters: • A tunable bandpass filter • Similar to a STFT or windowed

Bank of 1-D Gabor Filters

Input Image

Filtered Image

Edge evidence

Combining the Edge evidence using ConstraintSatisfaction Neural Network Mode

Edge map

Texture Edge Extraction using a set of 1-D Gabor Filters

Post-processing using 1-D Differential operator and Thresholding

Page 27: TEXTURE ANALYSIS USING GABOR FILTERSsdas/courses/CV_DIP/PDF/Lect-Gabor_filt.pdf · Some properties of Gabor filters: • A tunable bandpass filter • Similar to a STFT or windowed

2-D Gabor Filter Bank 1-D Gabor Filter bankGray level Image

Results of Edge Extraction using Gabor Magnitude (contd.)

Next >< Prev

Page 28: TEXTURE ANALYSIS USING GABOR FILTERSsdas/courses/CV_DIP/PDF/Lect-Gabor_filt.pdf · Some properties of Gabor filters: • A tunable bandpass filter • Similar to a STFT or windowed

2-D Gabor Filter Bank 1-D Gabor Filter bankGray level Image

Results of Edge Extraction using Gabor Magnitude (contd.)

Next >< Prev

Page 29: TEXTURE ANALYSIS USING GABOR FILTERSsdas/courses/CV_DIP/PDF/Lect-Gabor_filt.pdf · Some properties of Gabor filters: • A tunable bandpass filter • Similar to a STFT or windowed

• Filtering methods:– Discrete Wavelet Transform (DWT) (Daubechies 8-Taps) – Gabor Filter (Bank of 8 Gabor filters) – Discrete Cosine Transform (DCT) (9 filters) Ref: [Ng 92]– Gaussian Markov random field models Ref: [Cesmeli 2001]– Combination of DWT and Gabor filter Ref: [Rao 2004]– Combination of DWT and MRF Ref: [Wang 99]

• Non-linearity:– Magnitude (| . |)

• Smoothing:– Gaussian filter

• Feature vectors:– Mean (computed in a local window around a pixel)

• Classification:– Fuzzy-C Means (FCM) (unsupervised classifier)

• Combine Edge and region mapusing a CSNN

Page 30: TEXTURE ANALYSIS USING GABOR FILTERSsdas/courses/CV_DIP/PDF/Lect-Gabor_filt.pdf · Some properties of Gabor filters: • A tunable bandpass filter • Similar to a STFT or windowed

IIT Madras

VP LAB

Input Image

Segmented map before integration

Edge map before integration

Segmented map and Edge map after integration

Results

Page 31: TEXTURE ANALYSIS USING GABOR FILTERSsdas/courses/CV_DIP/PDF/Lect-Gabor_filt.pdf · Some properties of Gabor filters: • A tunable bandpass filter • Similar to a STFT or windowed

IIT Madras

VP LAB

ResultsInput Image

Segmented map before integration

Edge map before integration

Segmented map and Edge map after integration

Page 32: TEXTURE ANALYSIS USING GABOR FILTERSsdas/courses/CV_DIP/PDF/Lect-Gabor_filt.pdf · Some properties of Gabor filters: • A tunable bandpass filter • Similar to a STFT or windowed

GLCM based texture feature (statistical)

The Grey Level Co-occurrence Matrix, GLCM (also called the Grey Tone Spatial Dependency Matrix)

The GLCM is a tabulation of how often different combinations of pixel brightness values (grey levels) occurin an image.

The GLCM is usually defined for a series of "second order" texture calculations.

Second order means they consider the relationship between groups of two pixels in the original image.

First order texture measures are statistics calculated from the original image values, like variance, and do not consider pixel relationships. Third and higher order textures (considering the relationships among three or more pixels) are theoretically possible but not implemented due to calculation time and interpretation difficulty.

Page 33: TEXTURE ANALYSIS USING GABOR FILTERSsdas/courses/CV_DIP/PDF/Lect-Gabor_filt.pdf · Some properties of Gabor filters: • A tunable bandpass filter • Similar to a STFT or windowed

Spatial relationship between two pixels:

GLCM texture considers the relation between two pixels at a time, called the reference and the neighbourpixel. Let, the neighbour pixel is chosen to be the one to the east (right) of each reference pixel. This can also be expressed as a (1,0) relation: (i, j) -> (i+1, j).

Each pixel within the window becomes the reference pixel in turn, starting in the upper left corner and proceeding to the lower right.

3322222011001100

10003130020020101220

3210NPV>RPV

A small imageneighborhood

Neighbor/Reference Pixel Value

Page 34: TEXTURE ANALYSIS USING GABOR FILTERSsdas/courses/CV_DIP/PDF/Lect-Gabor_filt.pdf · Some properties of Gabor filters: • A tunable bandpass filter • Similar to a STFT or windowed

3322222011001100

10003130020020101220

3210NPV>RPV

A small imageneighborhood

EAST GLCM

11003030120022100020

3210NPV>RPV

WEST GLCM (why transpose ?)

21003160120042101240

3210NPV>RPV

Symmetrical (1,0) GLCM

(-1,0) relation: (i, j) -> (i-1, j).

Page 35: TEXTURE ANALYSIS USING GABOR FILTERSsdas/courses/CV_DIP/PDF/Lect-Gabor_filt.pdf · Some properties of Gabor filters: • A tunable bandpass filter • Similar to a STFT or windowed

21003160120042101240

3210NPV>RPV

Symmetrical (1,0) GLCM Expressing the GLCM as a probability:

This is the number of times this outcome occurs, divided by the total number of possible outcomes.

This process is called normalizing the matrix. Normalization involves dividing by the sum of values.

.083.04200

.042.250.042

00.166.083

0 (0/24)

.042 (1/24)

.083 (2/24)

.166 (4/24)

Page 36: TEXTURE ANALYSIS USING GABOR FILTERSsdas/courses/CV_DIP/PDF/Lect-Gabor_filt.pdf · Some properties of Gabor filters: • A tunable bandpass filter • Similar to a STFT or windowed

020002000000

222201222100

024000200220

020600030203

3322222011001100

A small imageneighborhood

0.08300.083.083.083.083

0.083.16600.0830.250Normalized symmetrical

vertical GLCM

Find,(1,0), South GLCM (solve it):

Any reason forDiagonal dominance ?

Page 37: TEXTURE ANALYSIS USING GABOR FILTERSsdas/courses/CV_DIP/PDF/Lect-Gabor_filt.pdf · Some properties of Gabor filters: • A tunable bandpass filter • Similar to a STFT or windowed

References1. Haralick, R.M. 1979. Statistical and Structural Approaches to Texture. Proceedings

of the IEEE, 67:786-804; (also 1973, IEEE-T-SMC)

2. Simona E. Grigorescu, Nicolai Petkov, and Peter Kruizinga; Comparison of Texture Features Based on Gabor Filters; IEEE Transactions on Image Processing, Vol. 11, No. 10, OCT. 2002; pp 1160-1167.

3. J. Randen and J. S. Husoy, Texture Segmentation using filters with Optimized Energy Separation, IEEE Transactions on Image Processing, Vol. 8, No. 4, April 1999, pp 571-582.

4. M. L. Comer and E. J. Delp, Segmentation of Textured Images using a Multiresolution Gaussian Autoregressive Model, IEEE Transactions on Image Processing, Vol. 8, No. 3, March 1999, pp 408-420.

5. B. Thai and G. Healey, Optimal Spatial Filter Selection for Illumination-Invariant Color Texture Discrimination, IEEE Trans. Systems, Man and Cybernetics, Part B: Cybernetics, Vol. 30, No. 4, August 2000, pp 610-615.

6. J. Randen and J. S. Husoy, "Optimal Filter-bank Design for Multiple texture Discrimination", Proceedings of the International Conference on Image Processing (ICIP '97), pp 215-218.

7. "Integrating Region and Edge Information for Texture Segmentation using a modified Constraint Satisfaction Neural Network", Lalit Gupta, Utthara GosaMangai and Sukhendu Das, Accepted for Publication in the Journal of Image and Vision Computing, December 2007 (Article in Press - available ONLINE).

Page 38: TEXTURE ANALYSIS USING GABOR FILTERSsdas/courses/CV_DIP/PDF/Lect-Gabor_filt.pdf · Some properties of Gabor filters: • A tunable bandpass filter • Similar to a STFT or windowed