Professional Documents
Culture Documents
thefeel,appearance,orconsistencyofasurfaceora substance. Everydaytextureterms rough,silky,bumpy refer to touch. WhatisRoughTexture Wh i R hT alargedifferencebetweenhighandlowpoints,and aspacebetweenhighsandlowsapproximatelythesame a space between highs and lows approximately the same sizeasafinger. Whatissilktexture littledifferencebetweenhighandlowpoints,and l l d ff b h h dl d thedifferenceswouldbespacedveryclosetogether relativetofingersize. g
image Texture?
Texture is a repeating pattern of local variations in image intensity: i i characterized by the spatial distribution of intensity levels in a neighbourhood Used to partition images into regions of interest and to classify those regions cannot be defined for a point For example, an image has a 50% black and 50% white distribution of pixels pixels. Three different images with the same intensity distribution, but with different textures.
StatisticalApproaches
M MomentsofIntensity:FirstOrderStatistics t f I t it Fi t O d St ti ti Themostwellknowneasiestfirstorderstatistics isthehistogram:
MomentsofIntensity:FirstOrder Statistics
Supposethatweconstructthehistogramofthe intensities inaregion.Wecanthencomputemomentsofthe1D histogram: Thefirstmomentisthemeanintensity Th fi t t i th i t it Thesecondcentralmomentisthevariance,which describeshowsimilartheintensitiesarewithinthe describes how similar the intensities are within the region. Thethirdcentralmoment,skew,describedhow symmetrictheintensitydistributionisaboutthemean. Thefourthcentralmoment,kirtosis,describeshow flatthedistributionis. flat the distribution is
Secondorderstatistic
Secondorderstatisticsconsiderpixelsinpairs. considertherelationshipbetweengroupsoftwo (usuallyneighboring)pixelsintheoriginalimage Hence,itrepresentsbilateralspatialinteractions. Itdependson2moreparameters: d:relativedistancebetweenpixels. :relativeorientationbetweenpixels. Forcomputationalreasons,isdiscretized,for examplein4regionsaround(0,45,90,135). Thismeansthepixelpairsmaybeobserved diagonally,verticallyinpixelspaceorimagespace
AGLCM Pd[i,j]isdefinedbyfirstspecifyinga displacementvectord (dx,dy)andcounting displacement vector d=(dx,dy) and counting allpairsofpixelsseparatedbydhavinggray levelsi andj.
GLCM
GLCMtextureconsiderstherelationbetweentwopixels atatime,calledthe reference andthe neighbour pixel. Intheillustrationbelow,theneighbour pixelischosen tobetheonetotheeast(right)ofeachreferencepixel. ( g ) f f p Thiscanalsobeexpressedasa(1,0)relation:1pixelin thexdirection,0pixelsintheydirection.Means weare movingtowardseastwithonepixeldistancewithout g p anypixeldistanceinydirection. Eachpixelwithinthewindowbecomesthereference pixelinturn,startingintheupperleftcornerand pixel in turn starting in the upper left corner and proceedingtothelowerright.Pixelsalongtheright edgehavenorighthandneighbor,sotheyarenot usedforthiscount. used for this count
Makingthematrixsymmetricalaroundthediagonal g y g
Taking the transpose of the GLCM make it TakingthetransposeoftheGLCMmakeit symmetric. Normalization of GLCM NormalizationofGLCM
Means expressing the elements of GLCM in probability. After making the GLCM symmetrical, there is still one step to take before texture measures can be calculated. The measures require that each GLCM cell contain not a count, but rather a probability. probability Probability :the number of times an outcome occurs, divided y fp by the total number of possible outcomes."
Exercise
Exercise:Usethetestimageandasouthspatial
relationshipwithreferencepixelandtheneighborbelowit. Testimage FindPixelPairing
NormalizedMatrix
Symmetricalmatrix S ti l ti
ThingstoNoteaboutNormalizedSymmetricalGLCM
Th di Thediagonalelementsallrepresentpixelpairswithnogreylevel l l ll i l i ih l l difference (00,11,22,33etc.). Iftherearehighprobabilitiesintheseelements,thentheimage doesnotshowmuchcontrast:mostpixelsareidentical totheir neighbors. When values in the diagonal are summed, the result is the Whenvaluesinthediagonalaresummed,theresultisthe probabilityofany pixel'sbeingthesamegreylevelasitsneighbor. Cellsonecellawayfromthediagonalrepresentpixelpairswitha differenceofonlyonegreylevel(01,12,23etc.).Similarly,values difference of only one grey level (0 1 1 2 2 3 etc ) Similarly values incellstwoawayfromthediagonalshowhowmanypixelshave2 greyleveldifferences,andsoforth.Thefartherawayfromthe diagonal,thegreaterthedifferencebetweenpixelgreylevels. di l th t th diff b t i l l l Sumuptheseparalleldiagonalsandtheresultistheprobabilityof any pixel'sbeing1or2or3etc.differentfromitsneighbour
Summaryofstepsincreatingasymmetricalnormalized y p g y GLCM: Createaframeworkmatrix Decideonthespatialrelationbetweenthereference andneighborpixel Count the occurrences and fill in the framework matrix Counttheoccurrencesandfillintheframeworkmatrix Addthematrixtoitstransposetomakeitsymmetrical Normalize the matrix to turn it into probabilities. Normalizethematrixtoturnitintoprobabilities.
PropertiesoftheGLCM
CONTRASTGROUP:Howmuchpixelvalueissametoitsneighbor Contrast Dissimilarity Homogeneity ORDERLINESSGROUP(Howmuchorderness liesinthepixelarrangement)
AngularSecondMoment(ASM) Energy Entropy(ENT) MaximumProbability(MAX)
STATSGROUPDescriptiveStatisticsontheGLCMatrix p
GLCMMean, GLCMVariance(orStandardDeviation)and GLCMCorrelation.
Example
Dissimilarity(DIS)
IntheContrastmeasure, weightsincreaseexponentially(0,1,4,9, etc.)asonemovesawayfromthediagonal.Howeverinthe dissimilaritymeasureweightsincreaselinearly(0,1,2,3 etc.).
TryouttheDissimilaritycalculationforthehorizontalimageand comparethevaluewithContrastforthesamematrix: p
Homogeneity (HOM) (alsocalledthe "InverseDifferenceMoment") HomogeneityweightsvaluesbytheinverseoftheContrastweight,with weightsdecreasingexponentiallyawayfromthediagonal weights decreasing exponentially away from the diagonal
Measureoforderness
Orderlinessmeasures,likecontrast,useaweightedaverageofthe GLCMvalues.Theweightisconstructedrelatedtohowmanytimes agivenpairoccurs.
Aweightthatincreaseswithcommonnesswillyieldatexturemeasure thatincreaseswithorderliness. Aweightthatdecreaseswithcommonnessyieldsatexturemeasurethat eg a dec eases co o ess y e ds a e u e easu e a increaseswithdisorder
ExerciseonASMandenergy gy
symmetric=A+A=
GLCM=A+A/sum(A+A)=
ASM:1 1=1 ASM: 1*1 = 1
ASMcalculation
PerformtheASMcalculationforthehorizontal GLCM:
Entropy
UsingtheequationcalculatetheEntropyofthehorizontalGLCM
DescriptiveStatisticsontheGLC Matrix
CorrelationCalculation
Exercise: CalculatetheGLCM Correlationmeasureforthehorizontal testimage. g