版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
第九章紋理分析
提到紋理,人們自然會立刻想到木制家俱上的木紋、花布上的花紋等。木紋為天然紋理,花紋為人工紋理,它們反映了物體表面顏色和灰度的某種變化。這些變化與物體本身的屬性相關(guān)。
有些圖像在局部區(qū)域內(nèi)呈現(xiàn)不規(guī)則性,而在整體上表現(xiàn)出某種規(guī)律性。習(xí)慣上,把這種局部不規(guī)則而宏觀有規(guī)律的特性稱之為紋理;以紋理特性為主導(dǎo)的圖像,常稱為紋理圖像;以紋理特性為主導(dǎo)特性的區(qū)域,常稱為紋理區(qū)域。紋理作為一種區(qū)域特性,在圖像的一定區(qū)域上才能反映或測量出來。
為了定量描述紋理,多年來人們建立了許多紋理算法以測量紋理特性.這些方法大體可以分為兩大類:統(tǒng)計(jì)分析法和結(jié)構(gòu)分析法。前者從圖像有關(guān)屬性的統(tǒng)計(jì)分析出發(fā);后者則著力找出紋理基元,然后從結(jié)構(gòu)組成上探索紋理的規(guī)律。也有直接去探求紋理構(gòu)成的結(jié)構(gòu)規(guī)律的。
本章將主要論述紋理特征提取與分析的幾種方法。
紋理區(qū)域的灰度直方圖作為紋理特征,為了研究灰度直方圖的相似性,可以比較累積灰度直方圖分布,計(jì)算灰度級的最大偏差或總偏差。如果限定對象,則采用這樣簡單的方法也能夠識別紋理。但是灰度直方圖不能得到紋理的二維灰度變化,即使作為一般性的紋理識別法,其能力是很低的。例如下圖兩種紋理具有相同的直方圖,只靠直方圖就不能區(qū)別這兩種紋理。一.影像紋理的直方圖分析法
二.Laws紋理能量測量法
Laws的紋理能量測量法是一種典型的一階分析方法,在紋理分析領(lǐng)域中有一定影響。
Laws紋理測量的基本思想是設(shè)置兩個(gè)窗口:
一個(gè)是微窗口,可為3×3、5×5或7×7,常取5×5用來測量以像元為中心的小區(qū)域的灰度的不規(guī)則性,以形成屬性,稱為微窗口濾波;
另一個(gè)為宏窗口,為15×15或32×32,用來在更大的窗口上求屬性的一階統(tǒng)計(jì)量(常為均值和標(biāo)準(zhǔn)偏差),他稱之為能量變換。
整個(gè)紋理分析過程為:f(x,y)->微窗口濾波->F(x,y)->能量轉(zhuǎn)換->E(x,y)->分類
Laws深入研究了濾波模板的選定。首先定義了一維濾波模板,然后通過卷積形成系列一維、二維濾波模板,用于檢測和度量紋理的結(jié)構(gòu)信息。
他選定的三組一維濾波模板是:
L3=[121]灰度(Level)
E3=[-101]邊緣(Edge)
S3=[-12-1]點(diǎn)(Spot)
L5=[14641]
E5=[-1–2021]
S5=[-1020–1]
W5=[-120–21]波(Wave)
R5=[1–46–41]漣漪(Ripple)L7=[1615201561]
E7=[-1–4–50541]
S7=[-1-2141–2–1]
W7=[-1030–301]
R7=[1-2–14–1–21]
O7=[-16–1520–156–1]振蕩Oscillation)
1×3的矢量集是構(gòu)成更大矢量的基礎(chǔ).每一個(gè)1×5的矢量可以由兩個(gè)1×3矢量的卷積產(chǎn)生。1×7的矢量可以由1×3與1×5矢量卷積產(chǎn)生。垂直矢量和水平矢量可生成二維濾波模板。由濾波模板與圖像卷積可以檢測不同的紋理能量信息。所以,Laws一般選用12—15個(gè)5×5的模板。
以1×5矢量為基礎(chǔ),卷積同樣維數(shù)的矢量,可獲得25個(gè)5×5模板。其中最有用的是5×5的零和模板,即
其中aij是模板中的元素(i,j=1,2,3,4,5)。
其中四個(gè)有最強(qiáng)性能的模板是:E5L5R5R5E5S5L5S5
它們分別可以濾出水平邊緣、高頻點(diǎn)、V形狀和垂直邊緣。
Laws將Brodatz的8種紋理圖像拼在一起,對該圖像作紋理能量測量,將每個(gè)像元指定為八個(gè)可能類中的一個(gè),正確率達(dá)87%。
可見這種紋理分析方法簡單、有效。但所提供的模板較少,尚未更多地給出其變化性質(zhì),因此,應(yīng)用受到一定的限制。Laws紋理能量測量法的特點(diǎn)灰度共生矩陣的定義
灰度共生矩陣特征的提取
三.灰度共生矩陣分析法
灰度共生矩陣的定義在三維空間中,相隔某一距離的兩個(gè)像素,它們具有相同的灰度級,或者具有不同的灰度級,若能找出這樣兩個(gè)像素的聯(lián)合分布的統(tǒng)計(jì)形式,對于圖像的紋理分析將是很有意義的?;叶裙采仃嚲褪菑膱D像(x,y)灰度為i的像素出發(fā),統(tǒng)計(jì)與距離為δ=(Δx2+Δy2)1/2、灰度為j的像素同時(shí)出現(xiàn)的概率P。概率P(i,j,δ,θ)的數(shù)學(xué)式表示為
:P(i,j,δ,θ)={[(x,y),(x+Δx,y+Δy)]|f(x,y)=i,f(x+Δx,y+Δy)=j;x,y=0,1,…,N-1}
根據(jù)上述定義,所構(gòu)成的灰度共生矩陣的第i行、第j列元素,表示圖像上所有在θ方向、相隔為δ,一個(gè)為灰度i值,另一個(gè)為灰度j值的像素點(diǎn)對出現(xiàn)的頻率。這里θ取值一般為0度、45度、90度和135度。很明顯,若Δx=1,Δy=0,則θ=00;Δx=1,Δy=-1,則θ=450;Δx=0,Δy=-1,則θ=900;Δx=-1,Δy=-1,則θ=1350。δ的取值與圖像有關(guān),一般根據(jù)試驗(yàn)確定。像素組合統(tǒng)計(jì)表像素組合方式下圖(a)所示的圖像,取相鄰間隔δ=1,各方向的灰度共生矩陣如下圖(b)所示。
(a)(b)對稱性灰度共生矩陣特征的提取
灰度共生矩陣反映了圖像灰度關(guān)于方向、相鄰間隔、變化幅度的綜合信息,它可作為分析圖像基元和排列結(jié)構(gòu)的信息。作為紋理分析的特征量,往往不是直接應(yīng)用計(jì)算的灰度共生矩陣,而是在灰度共生矩陣的基礎(chǔ)上再提取紋理特征量,稱為二次統(tǒng)計(jì)量。一幅圖像的灰度級數(shù)一般是256,這樣計(jì)算的灰度共生矩陣太大。為了解決這一問題,在求灰度共生矩陣之前,常壓縮為16級?;诨叶裙采仃嚨奶卣鱄aralick等人由灰度共生矩陣提取了14種特征。最常用的5個(gè)特征是:
1)角二階矩(能量)
2)對比度(慣性矩)
3)相關(guān)
4)熵
5)逆差矩若希望提取具有旋轉(zhuǎn)不變性的特征,簡單的方法是對θ取0度、45度、90度和135度的同一特征求平均值和均方差就可得到。灰度共生矩陣特征的實(shí)際應(yīng)用Haralick利用ERTS1002–18134衛(wèi)星多光譜圖像對美國加利福尼亞海岸帶的土地利用問題,用灰度共生矩陣的方法作紋理分析。海岸帶主要有沿岸森林、樹林、草地、城區(qū)、小片灌溉區(qū)、大片灌溉區(qū)和水域七類。對ERTS1002–18134四波段衛(wèi)片,將其中的某波段圖像,取大小為64*64象素的非重迭窗口,間隔δ=1,Ng=16(將0–255壓縮成16級)?;叶裙采仃囂卣鞯膶?shí)際應(yīng)用(續(xù))將紋理特征和多光譜灰度特征組合成16*1特征向量,對七類地域分別取訓(xùn)練樣本314個(gè),檢驗(yàn)樣本310個(gè),提取特征,用分段線性分類器分類,獲得了平均83.5%的分類精度。若僅僅用多光譜信息,用8個(gè)光譜特征向量對七類地域分類,分類精度只有74~77%,由此可見,紋理分類改善了典型模式識別的結(jié)果,這是因?yàn)閳D像的紋理分析充分利用了圖像灰度分布的結(jié)構(gòu)信息。紋理分割示例GOESCumulusCloudClassificationCumuluscloudfieldshaveaverycharacteristictexturesignatureintheGOESvisibleimagery第十一章
模板匹配與圖像識別圖像識別的流程基于二維匹配的目標(biāo)檢測圖像目標(biāo)分類圖像識別的流程圖像采集預(yù)處理特征提取識別結(jié)果匹配或分類樣板或模型基于二維匹配的目標(biāo)檢測應(yīng)用領(lǐng)域:立體圖像對的同名點(diǎn)提取不同時(shí)期和角度拍攝的圖像配準(zhǔn)運(yùn)動目標(biāo)跟蹤目標(biāo)位置檢測圖像匹配的基本原理圖像匹配是利用相關(guān)函數(shù),評價(jià)兩塊圖像的相似性以確定目標(biāo)的位置。首先取出標(biāo)準(zhǔn)目標(biāo)的圖像數(shù)據(jù),然后取出待測影像中以待測點(diǎn)為中心的相應(yīng)區(qū)域的圖像數(shù)據(jù),計(jì)算兩者的相關(guān)系數(shù),以相關(guān)系數(shù)最大值對應(yīng)的相應(yīng)區(qū)域中心點(diǎn)為目標(biāo)的位置。圖像匹配的相關(guān)函數(shù)相關(guān)函數(shù)是對目標(biāo)圖像和待測圖像相似性的一種描述。相關(guān)函數(shù)的定義差平方和法取兩影像窗口相應(yīng)位置灰度差的平方和為相關(guān)函數(shù)值。定義如下(越小越相似)
x1x2x3x4y1y2y3y4差平方和法舉例13202431模板圖像圖像B圖像A0101相關(guān)函數(shù)值:SA=(1-2)2+(3-4)2+(2-3)2+(0-1)2=4SB=(1-0)2+(3-1)2+(2-0)2+(0-1)2=10圖像A,B哪個(gè)與模板圖像最相似?相關(guān)函數(shù)的定義相關(guān)系數(shù)法取兩影像窗口灰度的相關(guān)系數(shù)為相關(guān)函數(shù)值。相關(guān)系數(shù)定義如下:(越大越相似)xisthegraylevelinthetemplateimage;xistheaveragegreylevelinthetemplateimage;yisthegraylevelinthesourceimage;yistheaveragegreylevelinthesourceimage;Nisthenumberofpixelsinthesectionimage;(N=templateimagesize=columns*rows);Thevaluecorisbetween–1and+1,
withlargervaluesrepresentingastrongerrelationshipbetweenthetwoimages.相關(guān)系數(shù)法舉例13202431模板圖像圖像B圖像A0101相關(guān)系數(shù)值:SA=1SB=?(abs(SB)<1)圖像匹配的基本過程x,yTemplateImageInputImageI(x,y)O(x,y)OutputImagex,yCorrelationThematchingprocessmovesthetemplateimagetoallpossiblepositionsinalargersourceimageandcomputesanumericalindexthatindicateshowwellthetemplatematchestheimageinthatposition.Matchisdoneonapixel-by-pixelbasis.圖像匹配過程示意圖Projectionof3x3templateTheMovingWindowscansthe3x3neighborhoodofeverypixelintheclassifiedimage.MatchedImage圖像匹配過程示意圖圖像匹配過程示意圖圖像匹配過程示意圖圖像匹配過程示意圖圖像匹配過程示意圖圖像匹配過程示意圖圖像匹配過程示意圖圖像匹配過程示意圖圖像匹配過程示意圖二值模板圖像Templateisasmallimage,usuallyabi-levelimage.Findtemplateinsourceimage,withaYes/Noapproach.TemplateSource灰度模板圖像Whenusingtemplate-matchingschemeongrey-levelimageitisunreasonabletoexpectaperfectmatchofthegreylevels.Insteadofyes/nomatchateachpixel,thedifferenceinlevelshouldbeused.TemplateSourceImage匹配的計(jì)算量Templateimagesize:53x48Sourceimagesize:177x236Assumption:templateimageisinsidethesourceimage.Correlation(search)matrixsize:124x188(177-53x236-48)
Computationcount124*188*53*48=59,305,728應(yīng)用實(shí)例LoadprintedcircuitboardintoamachineTeachtemplateimage(selectandstore)LoadprintedcircuitboardCaptureasourceimageandfindtemplate應(yīng)用實(shí)例AssumptionsandLimitations1.Templateisentirelylocatedinsourceimage.2.Partialtemplatematchingwasnotperformed(atboundaries,withinimage).3.Rotationandscalingwillcausepoormatches.Matlab應(yīng)用實(shí)例TemplateDataSet1DataSet2DataSet3DataSet4DataSet5MatlabDataSetDataSet1CorrelationMapwithPeakSourceImage,FoundRectangle,andCorrelationMapDataSet2CorrelationMapwithPeakSourceImageandFoundRectangleDataSet3CorrelationMapwithPeakSourceImageandFoundRectangleDataSet4CorrelationMapwithPeakSourceImageandFoundRectangleDataSet5CorrelationMapwithPeakSourceImageDataSet5,ResultsThresholdsetto0.800Thresholdsetto0.200通過匹配搜索同名點(diǎn)的例子運(yùn)動目標(biāo)的提取主要內(nèi)容基于二維序列圖像的運(yùn)動信息獲取運(yùn)動目標(biāo)的獲取視頻圖像處理實(shí)例圖像差分法無行人圖像差分圖像有行人圖像背景模型獲取技術(shù)-濾波法基于背景模型的目標(biāo)跟蹤應(yīng)用舉例-活細(xì)胞分割圖像處理系統(tǒng)的基本結(jié)構(gòu)1.CamerasandOptics4.FrameGrabber2.Lighting5.PCPlatform3.PartSensor6.MachinevisionSoftware7.DigitalI/OandNetworkconnectionCamerasandOpticsThiscategoryusuallyconsistsofoneormorecamerasandlensing(optics),whichtakeapictureofthepartbeinginspected.Dependingontheapplication,thecamerascanbestandardmonochromeRS-170/CCIR,compositecolor(Y/C),RGBcolor,nonstandardmonochrome(variable-scan),progressivescan,orline-scan.CCDcameratypes
oldersystemswereverychunky,heavy&powerhungryadvancesinICtechnologyhaveresultedinsmallerandsmallersystemsthatuselesspowerminiaturisationfirstresultedinremotehead‘lipstick’sizedcameraslatesttechnologiesincludeverysmallsingleboardsystemstypicalcamerasingle
board
cameraremotehead
cameraLightingLightingisneededtoilluminatethepartsothatthebestpossibleimagecanbeacquiredbythecamera.Lightingassembliescomeinvariousshapesandsizesandareavailableinavarietyofintensities.Themostcommonformsoflightingarehigh-frequencyfluorescent,LED(LightEmittingDiode),incandescent,andquartz-halogenfiber-optictypes.Lightingtypes
PartSensorOftenintheformofalightbarrierorsensor,thisdevicesendsatriggersignalwhenitsensesthatapartisincloseproximity.Thesensortellsthemachinevisionsystemwhenapartisinthecorrectpositionforanimagetobeacquired.FrameGrabberAlsoreferredtoasavideocapturecard,thiscomponentisusuallyintheformofaplug-inboardthatisinstalledinthePC.Aframegrabber’sjobistointerfacethecamera(orcameras)tothehostcomputer.Itdoesthisbytakingtheimagedataprovidedbythecamera(ineitheranalogordigitalform)andconvertingitintoinformationforusebythehostPC.Italsocanprovidesignalstocontrolcameraparameterssuchastriggering,exposure/integrationtime,shutterspeed,etc.Framegrabberscomeinvariousconfigurationstosupportdifferentcameratypesaswellasdifferentcomputerbusplatforms(PCI,CompactPCI,PC104,ISA,etc.)Matrox-Meteor-IIForesightImagingEPIXPIXCI-DMuTechM-visionPCPlatform
Thecomputerisakeyelementofamachinevisionsystem.Forinspectiontypeapplications,usuallyaPentiumIIIorequivalentisused.Ingeneral,thefasterthePC,thelesstimethevisionsystemwillneedtoprocesseachimage.Duetothevibration,dust,andheatoftenfoundinmanufacturingenvironments,anindustrial-gradeorruggedizedPCisoftenrequired.Computertypes
Computertypes
SoftwareMachinevisionsoftwareisusedforcreatingandexecutingprograms,processingincomingimagedata,andmakingPASS/FAILdecisions.MachineVisionsoftwarecancomeinmanydifferentforms(“C”Libraries,ActiveXcontrols,Point&Clickprogrammingenvironments,etc.)andcanbesinglefunction(e.g.,designedonlyforonepurposelikeLCDinspection,BallGridArray(BGA)inspection,alignmenttasks,etc.),ormulti-function(e.g.,designedwithasuiteofcapabilitiesincludinggauging,barcodereading,robotguidance,presenceverification,etc.).SoftwaretypesSoftwaretypesLabViewDigitalI/OandNetworkConnectionOncethesystemhascompleteditsinspectionofapart,itmustbeabletocommunicatewiththe“outsideworld”tocontrolthemanufacturingprocess,communicatePASS/FAILinformationtoadatabase,orboth.Usually,adigitalI/Ointerfaceboardand/ornetworkcardmakeuptheinterfacingthroughwhichthemachinevisionsystemcommunicateswiththeoutsidesystemsanddatabases.ConfiguringaPC-based
MachineVisionSystemCarefulplanningandattentiontodetailwillhelpensurethatyourinspectionsystemmeetsyourapplicationneeds.Thefollowingisachecklistofissuesyoushouldconsider.KnowyourgoalsThisisperhapsthemostimportantstepintheprocessdecidingwhatyouwanttoaccomplishduringtheinspectiontask.Inspectionoperationsfallintoseveralcategories:?Performingmeasurementsorgauging?Readingcharactersorencoded(barcode)information?Detectingthepresenceofanobjectormarking?Recognizingandidentifyingspecificfeaturespatternmatching?Comparingobjectsormatchinganobjecttoatemplate?GuidingamachineorrobotKnowyourspeedrequirementsHowmuchtimewillthesystemhavetoinspecteachcomponentorpart?ThiswilldeterminenotonlytheminimumclockspeedofthePC,butmayalsoaffectthespeedoftheline.Manymachinevisionsoftwarepackagesincorporateaclock/timersothateachstepoftheinspectionoperationcanbecloselymonitored.Fromthisdata,theprogramand/orthemotionprocessofthepartcanbemodifiedtofitwithintherequiredtimingwindow.Often,PC-basedmachinevisionsystemscaninspect20to25componentspersecond,dependingonthenumberofmeasurementsoroperationsrequiredandthespeedofthePCused.Chooseyourhardwarecomponentswisely
Amachinevisionsystemisonlyasstrongasitsindividualcomponents.Anyshortcutsmadeduringtheselectionprocess–especiallythoseinvolvedintheopticsandimagingpath–cangreatlyreducetheeffectivenessofasystem.Thefollowingareafewbasicsyoushouldkeepinmindwhenchoosingcomponentsinvolvedintheimagepath.TamethevariablesThehumaneyeandbraincanidentifyobjectsinawidevarietyofconditions.Butamachinevisionsystemisnotasversatile;itcanonlydowhatithasbeenprogrammedtodo.Knowingwhatthesystemcanandcannotseewillhelpyouavoidfalsefailures(i.e.,wronglyidentifyinggoodpartsasbad)orotherinspectionerrors.Commonvariablestoconsiderincludelargechangesinpartcolororfinish,surroundinglighting,focus,largechangesinpartorientationorposition,andbackgroundcolor.Propercameramounting,securelightingpositions,constantandrepeatablepart/componentpositioning,andblockingofexternalorsurroundinglightingcaneliminatemanycommonset-upandfalse-failureproblems.Choosetherightsoftware
Themachinevisionsoftwareformstheintelligenceandisthecenterpieceoftheinspectionsystem.Thesoftwareselectedwilldeterminethelengthoftimerequiredtogenerateanddebuginspectionprograms,whatinspectionoperationscanbeperformed,howwellthoseoperationscanbeperformed,aswellasmanyotherimportantfactors.CommunicateandtrackthedataTheoverallobjectiveforamachinevisionsystemistoperformaqualityrolebyseparatingthegoodpartsfromthebadones.Todothis,thesystemneedstocommunicatetothemanufacturinglinethatapartisbadsothatsomeactioncanbetaken.UsuallythiscommunicationisconveyedviathedigitalI/Oboard,whichisconnectedtothemanufacturingline’sPLC(ProgrammableLogicController).Thebadpartisthe
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2024廣西公務(wù)員考試及答案(筆試、申論A、B類、行測)4套 真題
- 2025年粵教新版選修化學(xué)下冊月考試卷
- 2025年粵教新版七年級物理下冊階段測試試卷含答案
- 2025版無人駕駛技術(shù)研發(fā)內(nèi)部員工入股分紅合同4篇
- 二零二五版農(nóng)業(yè)用地經(jīng)營權(quán)流轉(zhuǎn)與生態(tài)補(bǔ)償合同3篇
- 2025年度婚姻登記證丟失補(bǔ)發(fā)服務(wù)合同4篇
- 2025年度藝術(shù)工作室租賃服務(wù)合同4篇
- 2025年度企業(yè)間綠色信貸借款合同
- 二零二五年度裝配式建筑抹灰勞務(wù)分包技術(shù)合同4篇
- 二零二五年度兒童營養(yǎng)面包研發(fā)及訂購合同4篇
- 2024年社區(qū)警務(wù)規(guī)范考試題庫
- 2024年食用牛脂項(xiàng)目可行性研究報(bào)告
- 2024-2030年中國戶外音箱行業(yè)市場發(fā)展趨勢與前景展望戰(zhàn)略分析報(bào)告
- GB/T 30306-2024家用和類似用途飲用水處理濾芯
- 家務(wù)分工與責(zé)任保證書
- 消防安全隱患等級
- 溫室氣體(二氧化碳和甲烷)走航監(jiān)測技術(shù)規(guī)范
- 2023山東春季高考數(shù)學(xué)真題(含答案)
- 為加入燒火佬協(xié)會致辭(7篇)
- 職業(yè)衛(wèi)生法律法規(guī)和標(biāo)準(zhǔn)培訓(xùn)課件
- 高二下學(xué)期英語閱讀提升練習(xí)(二)
評論
0/150
提交評論