DIPSIPRA6-Texture2013_14.pptx

download DIPSIPRA6-Texture2013_14.pptx

of 43

Transcript of DIPSIPRA6-Texture2013_14.pptx

  • 8/9/2019 DIPSIPRA6-Texture2013_14.pptx

    1/43

    Department of Electrical, Electronic, Telecommunications Engineering and Naval Architecture (DITEN)

    University of di Genoa ITA!"

    DIGITAL IMAGE PROCESSING

    SIGNAL & IMAGE

    PROCESSING & RECOGNITION

    Prof. Silvana Dellepiane 2013/2014

  • 8/9/2019 DIPSIPRA6-Texture2013_14.pptx

    2/43

    A.6Texture Analysis

    Prof. Silvana Dellepiane A.A. 2013/2014

    Department of Electrical, Electronic, Telecommunications Engineering and Naval Architecture (DITEN)

    University of di Genoa ITA!"

  • 8/9/2019 DIPSIPRA6-Texture2013_14.pptx

    3/43

    TEXTURE ANALYSIS

    3

    Texture is characterized by the spatial organization of elementary structures called

    texels (TEXture element). The texel is a visual primitive, characterized by theproperty of invariance, hich is spatially repeated in a given area, although

    deformed, rotated, and shifted. Texture provides important information about

    the spatial arrangement of the grey levels, then about their relationship ith the

    surrounding elements.

    !epending on the use of these primitives in the analysis of eaving process ecan classify to main classical approaches" the structural and the statistical

    approach.

  • 8/9/2019 DIPSIPRA6-Texture2013_14.pptx

    4/43

    STRUCTURAL METHODS

    #

    They are loo$ing for the primitives at the basis of the eave development,

    describing its generation in general terms. This approach is appropriate to the

    description of textures characterized by a strong regularity, from hich e can

    extract precise production rules. %s a conse&uence, this approach is suitable for

    the image analysis of artificial ob'ects compared ith the description of natural

    scenes, for hich neither generating primitives nor patterns are uniform and

    constant. % grammar is definitely a very poerful method for the description ofthe generation rules of a regular texture the grammar describes ho to generate

    a pattern by applying production rules, recursively, to a small set of symbols.

    uc$er (*+-) has postulated that a natural texture can be described through

    structural rules, before building an orderly and regular eaving through

    patterns and grammars, and then distort it to ma$e it natural, ith deterministic

    or stochastic rules (u, *+#). /oever, as e have already pointed out, evenith this $ind of approach the results of natural textures are usualy

    unsatisfactory.

  • 8/9/2019 DIPSIPRA6-Texture2013_14.pptx

    5/43

    STRUCTURAL METHODS

    0

    E#ample

    1uppose e have a production rule in the form"1 a1 a 2 replicate to the right

    The production indicates the 1 form that can be ritten through the rule aappliedto itself (recursively). 4f the rule aindicates to replicate the texel (or primitiveelement) to the right you can get a pattern of type Texture %.

    5o e suppose to add another production rule"

    1 b1 ba1 b 2 replicate in the loer right

    6e7ll get a texture of type Texture 8

    Texel 9egola di produzione % 9egola di produzione 8

    Texture %

    Texture 8

  • 8/9/2019 DIPSIPRA6-Texture2013_14.pptx

    6/43

    STATISTICAL METHODS

    -

    :enerally a natural texture does not have the characteristics of regularity that

    allo you to ta$e full advantage of the potentialities offered by structuralmethods. The changes that it reveals cannot be described by more or less

    regular forms, but through a classification that uses statistical models. 4ndeed

    statistical parameters related to the structure of the image are used as local

    features.

    6e ill see in more detail"

    ;ethods based on first

  • 8/9/2019 DIPSIPRA6-Texture2013_14.pptx

    7/43

    First-order analysisPARAMETERS BASED ON THE HISTOGRAM

    1ome features can be extracted by analysing the histogram (statistical descriptionof grey level occurrencies).

    1tatistical analysis of a distribution is usually carried out by using the moments of

    order $.

    =et us define l the grey level index and p(l)the related probability of occurrence.

    The first

  • 8/9/2019 DIPSIPRA6-Texture2013_14.pptx

    8/43

    First-order analysisPARAMETERS BASED ON THE HISTOGRAM

    ?

    @seful first

  • 8/9/2019 DIPSIPRA6-Texture2013_14.pptx

    9/43

    First-order analysisPARAMETERS BASED ON THE HISTOGRAM

    +

    E5T9DF () indicates the disorder degree of the distribution the maximum valueis related to the uniform distribution.

    irst

  • 8/9/2019 DIPSIPRA6-Texture2013_14.pptx

    10/43

    *>

    Original SIDNEY Local Mean image

    First-order analysisPARAMETERS BASED ON THE HISTOGRAM

  • 8/9/2019 DIPSIPRA6-Texture2013_14.pptx

    11/43

    **

    variancemean

    First-order analysisPARAMETERS BASED ON THE HISTOGRAM

  • 8/9/2019 DIPSIPRA6-Texture2013_14.pptx

    12/43

    METHODS BASED ON FILTERS

    *G

    4n the image spatial domain one can apply local filtering and ta$e theoutputs of different linear filters as parameters for texture

    classification.

    %n example are the mas$s of =as

    This techni&ue is based on the properties of =as7 functions throughconvolution operations ith the original signal. =as introduced a

    class of eaving parameters based on the average rate of similarity

    beteen the pixels of a given neighbourhood and a set of standard

    mas$s.

  • 8/9/2019 DIPSIPRA6-Texture2013_14.pptx

    13/43

    *3

    =et us no see the construction of the =as mas$s . :iven the folloing three vectors of length 3"

    =3 2 (*,G,*)

    E3 2 ( * ,>, * )

    13 2 ( *,G, *)

    e ma$e the convolution beteen them, thus obtaining five vectorsof length 0"

    =0 2 =3H=3 2 (*,#,-,#,*) local mean (hen divided by *-)

    10 2 E3HE3 2 =3H13 2 ( *,>,G,>, *) spot detection

    90 2 13H13 2 (*, #,-, #,*)

    ripple detectorE0 2 =3HE3 2 ( *, G,>,G,*) edge detection

    60 2 E3H13 2 ( *,G,>, G,*) ave detector

    METHODS BASED ON FILTERS

  • 8/9/2019 DIPSIPRA6-Texture2013_14.pptx

    14/43

    *#

    4f e multiply the column vectors of length 3 or 0 ith thecorresponding ro vectors, e get =asI mas$s 3x3 or 0x0.

    To describe the texture of an image by using these mas$s e do theconvolution beteen the image under analysis and the mas$s ande use the results as textural parameters.

    METHODS BASED ON FILTERS

  • 8/9/2019 DIPSIPRA6-Texture2013_14.pptx

    15/43

    Methods based on transforms:FOURIER ANALYSIS

    *0

    ;ethods based on the spectral ourier analysis ta$e advantage of the

    spatial periodicity of the signal. The spectrum of a periodic signal

    has pea$s at the fundamental and harmonic fre&uencies.

    4f the texture can be thought as a repetition of primitives, e ill

    consider the different pea$s of the spectrum as basic features. 4fe globally loo$ at the spectrum it is possible to lose information

    on the structure of the texture considered.

    6e have to consider the spectrum by splitting it in regions, hich

    may be radial or angular, representative of textural spatial

    fre&uencies and directions.

    hd b d f

  • 8/9/2019 DIPSIPRA6-Texture2013_14.pptx

    16/43

    *-

    :iven F(u,v) is the ourier transform of the imagef(x,y), then e can define to$inds of features" radial and angular.

    Methods based on transforms:FOURIER ANALYSIS

    F u v f x y e dxdyj ux vy( , ) ( , ) ( )= +

    +

    +

    u

    v

    u

    v

  • 8/9/2019 DIPSIPRA6-Texture2013_14.pptx

    17/43

    FOURIER ANALYSIS

    *

    The radial features Vr1,r2

    are defined as"

    here the integral is performed on the ring beteen the to rays r1and r2that is"

    Thus e extract a features vector $, using different values of rland r2.

    r v u r u v n*G G G

    GG > * + < < ,

    dvduvuFrrV = J),(J),( G*

    u

    v

  • 8/9/2019 DIPSIPRA6-Texture2013_14.pptx

    18/43

    FOURIER ANALYSIS

    *?

    4f an image is a &uite smooth surface, not rin$led, the spatial fre&uencies illbevery lo, and e7ll find that for small r1and r2radius the vector $ componentsill be large values.

    Dn the contrary, if e analyze a very rin$led surface, having high spatialfre&uencies, e ill have high values of $components corresponding to ringsith high radius values.

  • 8/9/2019 DIPSIPRA6-Texture2013_14.pptx

    19/43

    FOURIER ANALYSIS

    *+

    The angular spectral features related ith the aspect of the structure directionality"

    The integral is executed in the circular sector region included beteen the toangles 1 and 2that is"

    %s above, eIll have a feature vector %defined for various values of the angles.

    6ith this measure e discriminate the spatial fre&uencies in different directions. 4fa eaving has many lines or edges perpendicular to the direction given by , thecorresponding value of %ill be very high.

    dvduvuFZ = J),(J),( G*

    **

    G > * tan ( K ) ,v u u v n

    u

    v

  • 8/9/2019 DIPSIPRA6-Texture2013_14.pptx

    20/43

    FOURIER ANALYSIS

    G>

    Driginal image !T ;agnitude

    Secondorderanalysis:

  • 8/9/2019 DIPSIPRA6-Texture2013_14.pptx

    21/43

    Second-order analysis:CO-OCCURRENCE MATRICES

    G*

    6e define a probability matrix related to the directions and tothe step used to analyze the statistics of the ! grey levels in agiven image. 6e indicate p(i,&',)the probability that a greylevel i follos a grey level & in a scan along the directionsgiven by the parameter L ith a step (or distance) M. The

    p(i,&',)constitute a probability matrixM(i,j),of si*e !#!.

    ( ) ( ) ( ) ( )

    ( )

    =

    ==== x

    y

    PP

    PPatnPPjPlevelgreyiPlevelgreyjiM

    *G

    *G

    *GG*, ,,,Er,

  • 8/9/2019 DIPSIPRA6-Texture2013_14.pptx

    22/43

    CO-OCCURRENCE MATRICES

    GG

    4t is possible to analyze second

  • 8/9/2019 DIPSIPRA6-Texture2013_14.pptx

    23/43

    CO-OCCURRENCE MATRICES

    G3

    Example of co-occurrence matrices for an image window 5x5:

    33GG

    GGG>

    **>>

    **>>

    24magne#x#6indo

    G*>>

    *->*

    >>#G>*G#

    G#

    *2

    *,>;

    !2!!

    2222

    !24!

    !2!"

    24

    1#

    1,$!M

    !2!!

    2!13

    !121

    !312

    1%

    1#

    1,13&M

    !1!!142!

    !221

    !!14

    1%

    1#

    1,4&

    M

  • 8/9/2019 DIPSIPRA6-Texture2013_14.pptx

    24/43

    CO-OCCURRENCE MATRICES

    G#

    The size of matrix / depends on the numbers of grey levels in the

    image. 4n order to avoid too large matrices, sometimes is suggestedto reduce the grey levels &uantization andKor to ma$e a histogram

    e&ualization in order to reduce the number of occurrences.

    4n the folloing some parameters are introduced to describe

    several texture properties in function of the parameters ',and theindo size (it controls the trade*ff beteen spatial resolution

    and reliability of statistics) for example the maximum li$elihood

    ma#0pi&1.

  • 8/9/2019 DIPSIPRA6-Texture2013_14.pptx

    25/43

    CO-OCCURRENCE MATRICES

    G0

    E#amples of parameters2

    BD5T9%1T"

    /D;D:E5E4TF"

    E5T9DF" (fr*m t+e **urrene matrix)

    E5E9:F"

    These parameters are useful to extract the information content of thematrix ; and to provide some features useful for texture classification.

    ( ) ( , ),

    i j p i ji j

    G

    +ji ji

    jip

    , *

    ),(

    log ( , ) ( , ),

    G p i j p i ji j

    p i ji j

    ( , ),

    G

  • 8/9/2019 DIPSIPRA6-Texture2013_14.pptx

    26/43

    CO-OCCURRENCE MATRICES

    G-

    The first one gives an indication about the most significative

    matrix element the next to provide information about thedominance of the values on the main diagonal the last providesinformation on the randomness of the spatial distribution.

    -./MP0-

    6hen a co

  • 8/9/2019 DIPSIPRA6-Texture2013_14.pptx

    27/43

    CO-OCCURRENCE MATRICES

    G

    1ydney 4CD5D1 Bontrast

  • 8/9/2019 DIPSIPRA6-Texture2013_14.pptx

    28/43

    CO-OCCURRENCE MATRICES

    G?

    /omogeneity

  • 8/9/2019 DIPSIPRA6-Texture2013_14.pptx

    29/43

    CO-OCCURRENCE MATRICES

    G+

    Entropy

  • 8/9/2019 DIPSIPRA6-Texture2013_14.pptx

    30/43

    CO-OCCURRENCE MATRICES

    3>

    Energy

  • 8/9/2019 DIPSIPRA6-Texture2013_14.pptx

    31/43

    CO-OCCURRENCE MATRICES

    3*

    Borrelation

  • 8/9/2019 DIPSIPRA6-Texture2013_14.pptx

    32/43

    FRACTAL ANALYSIS

    3G

    ractal geometry is a branch of mathematic, recently formalized, particularly

    suitable for the modeling, simulation and characterization of natural phenomena and

    shapes. The classical Euclidean geometry is not very efficient in the treatment of

    chaotic systems fre&uently present in nature.

    To characterize a particolar phenomenon or shape means to describe it through a

    certain number of parameters hich are significant (i.e, they are able to

    discriminate, and give the possibility to reproduce a similar shape).

    or example if e ant to describe the outline of a very rugged coastline

  • 8/9/2019 DIPSIPRA6-Texture2013_14.pptx

    33/43

    33

    or example, if e ant to describe the outline of a very rugged coastline

    ith segments, curves, or other instruments of Euclidean geometry e

    ould be forced to use an infinite number of parameters. ractal geometry

    provides tools capable of overcoming these limitations.

    !ine 3urface $olume

    The Euclidean geometry ob'ects are characterized by a topological

    dimension the topological dimension of a line is one (one dimension), that

    of a surface is to, that of a volume is three, and so on. % line is

    characterized by a finite and not null length (for a finite set), but it has area

    and volume both null a surface has an infinite length, a finite and not null

    area and a volume e&ual to zero similarly for the volume

    =ength 2 =

    %rea 2 >

    Aolume 2 >

    =ength 2 N%rea 2 %

    Aolume 2 >

    =ength 2 N%rea 2 NAolume 2 A

  • 8/9/2019 DIPSIPRA6-Texture2013_14.pptx

    34/43

    3#

    To calculate the various values (length, area, etc.) e can proceed in this ay "

    6e consider an element 8() of idth (a segment, a box, otherise a sphere)

    6e count the minimum number 5() of elements 8i() necessary to cover our set

    (in the example the set is a line).

    2 * cm5() 2 *3 2>.0 cm5() 2 G

    3 3 ii

    3

    ( ) min " ( ) =

    =>

    6 l t th f ll i

  • 8/9/2019 DIPSIPRA6-Texture2013_14.pptx

    35/43

    30

    6e can evaluate the folloing measures"

    < =ength"

    < %rea"

    < Aolume"

    1tarting from these formula e can define a non integer measure

    by simply generalizing the exponent ( /ausdorff dimension)"

    There are some finite sets (curve, surfaces, etc.) hich are so folded bac$ onthemselves that does not exist a finite and not null dimension of them

    (length, area, etc.).

    )(lim>

    0 =

    / =

    lim ( )

    >

    G

    V =

    lim ( )

    >

    3

    M d d=

    lim ( )

    >

  • 8/9/2019 DIPSIPRA6-Texture2013_14.pptx

    36/43

    3-

    Definition2

    6e define the fractal dimension D the d value for hich the/ausdorff dimension is finite and not null. That value is "

    TopologicalDimensionDt

    4

    Fractal

    DimensionDf

    5. 4

    ( )5 =

    lim log ( )log( )

    >

  • 8/9/2019 DIPSIPRA6-Texture2013_14.pptx

    37/43

    3

    Example" 6+e7*+ 89uare urve

    4t is a curve, then it belongs to a one

  • 8/9/2019 DIPSIPRA6-Texture2013_14.pptx

    38/43

    3?

    The length of this curve is"

    1tep >" L = 11tep *" L = 8*1/4 = 21tep G" L = 8*8*1/16 = 4 ...1tep $" L = 8k* 4-k= 23k* 2-2k= 2k

    then for $ that goes to infinit the length tends to infinit.

    @sing the previous formula for area and volume and considering a linear element of

    analysis 8() ith $2 G

    3

    G

    G

    G*0

  • 8/9/2019 DIPSIPRA6-Texture2013_14.pptx

    39/43

    FRACTAL DIMENSION FOR IMAGE ANALYSIS

    3+

    4mages are considered as the result of the sampling of a surface in

    the three

  • 8/9/2019 DIPSIPRA6-Texture2013_14.pptx

    40/43

    IMAGES

    #>

    Box-counting method

    6e divide the three

  • 8/9/2019 DIPSIPRA6-Texture2013_14.pptx

    41/43

    #*

    %lgorithm" estimate of ! for a discretized surface (image) through box counting

    a) e consider a set of $ possible scales

    (i.e. , from 3> to 0 pixels,

    *2 3>,

    G2 G0,

    32 G>, ...,

    n2 0)b) for each $ 2 * On, e divide the image ith a box grid of size $and e

    count the number 5($)25($) of boxes containing at least one pixel.

    c) through the linear regression on the to

  • 8/9/2019 DIPSIPRA6-Texture2013_14.pptx

    42/43

    #G

    8lan9et method

    8y using the given formula for area and volume, e have that a surface ith fractaldimension ! has a volume going to zero, ith the folloing trend"

    A() 2 $ (3

    To estimate the volume of the image function f(x,y)the :lanket method is used hichre&uires calculation of a superior surface @(x,y,) and inferior surface =(x,y,)defined as"

    @(x,y,) 2 Pset of the points above f(x,y) hose maximum distance from f(x,y) is Q

    =(x,y,) 2 Pset of the points under f(x,y) hose maximum distance from f(x,y) is Q =(x,y,) R f(x,y) R @(x,y,)

    These to surfaces could be easily extracted by applying the morphologicaloperators of dilation (e obtain @(x,y,)) and erosion (=(x,y,)).

    The value of ! is estimate in the to

  • 8/9/2019 DIPSIPRA6-Texture2013_14.pptx

    43/43

    BLANKET ALGORITHM

    #3

    ! estimate for a dicretized surface (image)"

    a) 6e consider a set of possible scale d$ (ex. rom 3> to 0 pixel, d

    *2 3>, d

    G2 G0,

    d32 G>, ..., dn2 0)

    b) or each $"

    6e expand the image ith an element of idth d$, e elevate the function

    of d$ obtaining @(x,y,$)

    6e erode the image ith an element of idth d $, e subtract to thefunction d$obtaining =(x,y,$)

    6e calculate A(d$)2A($)

    c) Through linear regression on the to