第5講 特征提取-邊緣 深圳大學(xué) 機(jī)器視覺及應(yīng)用 課件_第1頁
第5講 特征提取-邊緣 深圳大學(xué) 機(jī)器視覺及應(yīng)用 課件_第2頁
第5講 特征提取-邊緣 深圳大學(xué) 機(jī)器視覺及應(yīng)用 課件_第3頁
第5講 特征提取-邊緣 深圳大學(xué) 機(jī)器視覺及應(yīng)用 課件_第4頁
第5講 特征提取-邊緣 深圳大學(xué) 機(jī)器視覺及應(yīng)用 課件_第5頁
已閱讀5頁,還剩44頁未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

機(jī)器視覺及應(yīng)用李東lidong@邊緣檢測(Edgedetection)Goal:Identifysuddenchanges(discontinuities)inanimageIntuitively,mostsemanticandshapeinformationfromtheimagecanbeencodedintheedgesMorecompactthanpixels

Ideal:artist’slinedrawing(butartistisalsousingobject-levelknowledge)Whydowecareaboutedges?Extractinformation,recognizeobjectsRecovergeometryandviewpointVanishingpointVanishing

lineVanishingpointVerticalvanishingpoint(atinfinity)OriginofEdgesEdgesarecausedbyavarietyoffactorsdepthdiscontinuitysurfacecolordiscontinuityilluminationdiscontinuitysurfacenormaldiscontinuityCloseupofedgesCloseupofedgesCloseupofedgesCloseupofedgesCharacterizingedgesAnedgeisaplaceofrapidchangeintheimageintensityfunctionimageintensityfunction

(alonghorizontalscanline)firstderivativeedgescorrespondto

extremaofderivative邊緣檢測邊緣是圖像上灰度的不連續(xù)點(diǎn),或者是灰度變化劇烈處邊緣的數(shù)學(xué)表達(dá):信號一階微分最大值/兩階微分過零點(diǎn)a:原始信號b:一階微分c:二階微分對于二維圖像f(x,y),梯度定義為:一階微分是梯度的模:二階微分應(yīng)理解為沿梯度方向的二階方向?qū)?shù),計(jì)算比較復(fù)雜,一般采用兩階微分算子(拉普拉斯算子)表示,拉普拉斯算子具有各向同性

梯度(gradient)使用梯度(gradient)描述圖像函數(shù)的變化,梯度方向是圖像函數(shù)增長最大的方向

IntensityprofileWithalittleGaussiannoiseGradientEffectsofnoiseConsiderasingleroworcolumnoftheimagePlottingintensityasafunctionofpositiongivesasignalWhereistheedge?EffectsofnoiseDifferencefiltersrespondstronglytonoiseImagenoiseresultsinpixelsthatlookverydifferentfromtheirneighborsGenerally,thelargerthenoisethestrongertheresponseWhatcanwedoaboutit?Solution:smoothfirstTofindedges,lookforpeaksinfgf*gDifferentiationisconvolution,andconvolutionisassociative:

Thissavesusoneoperation:DerivativetheoremofconvolutionfSobel算子Prewitt算子Roberts算子圖像梯度算子的近似Prewitt算子-101-101-101計(jì)算均值,平滑噪聲檢測豎直邊緣-1-1-1000111計(jì)算均值,平滑噪聲檢測水平邊緣Prewitt算子,近似一階微分卷積模版:去噪+增強(qiáng)邊緣Sobel算子-101-202-101計(jì)算均值,平滑噪聲檢測豎直邊緣-1-2-1000121計(jì)算均值,平滑噪聲檢測水平邊緣Sobel算子,近似一階微分去噪+增強(qiáng)邊緣,給四鄰域更大的權(quán)重常見的梯度算子(a):Roberts算子 (b):3x3Prewitt算子(c):Sobel算子 (d):4x4Prewitt算子拉普拉斯算子拉普拉斯算子首先用Gauss函數(shù)對圖像進(jìn)行平滑,抑制噪聲然后對經(jīng)過平滑的圖像使用Laplacian算子利用卷積的性質(zhì)LoG算子等效于:

Gaussian平滑+Laplacian二階微分LaplacianofGaussian(LoG)高斯拉普拉斯LaplacianofGaussianoperator過零點(diǎn)為邊緣的位置在數(shù)字圖像上實(shí)現(xiàn)LoG00-1000-1-2-10-1-216-2-10-1-2-1000-100

Prewitt算子Roberts算子Log算子Soble算子i=imread('miss.bmp');i=i(:,:,1);figure;ro=edge(i,'roberts');imshow(1-ro);figure;pre=edge(i,'prewitt');imshow(1-pre);figure;so=edge(i,'sobel');imshow(1-so);figure;log=edge(i,'log');imshow(1-log);matlab:edgeDerivativeofGaussianfilter*[1-1]=Smoothedderivativeremovesnoise,butblursedge.Alsofindsedgesatdifferent“scales”.1pixel3pixels7pixelsTradeoffbetweensmoothingandlocalizationThegradientmagnitudeislargealongathick“trail”or“ridge,”sohowdoweidentifytheactualedgepoints?Howdowelinktheedgepointstoformcurves?ImplementationissuesDesigninganedgedetectorCriteriaforagoodedgedetector:Gooddetection:theoptimaldetectorshouldfindallrealedges,ignoringnoiseorotherartifactsGoodlocalizationtheedgesdetectedmustbeascloseaspossibletothetrueedgesthedetectormustreturnonepointonlyforeachtrueedgepointCuesofedgedetectionDifferencesincolor,intensity,ortextureacrosstheboundaryContinuityandclosureHigh-levelknowledgeCannyedgedetectorThisisprobablythemostwidelyusededgedetectorincomputervisionTheoreticalmodel:step-edgescorruptedbyadditiveGaussiannoiseCannyhasshownthatthefirstderivativeoftheGaussiancloselyapproximatestheoperatorthatoptimizestheproductofsignal-to-noiseratioandlocalizationJ.Canny,AComputationalApproachToEdgeDetection,IEEETrans.PatternAnalysisandMachineIntelligence,8:679-714,1986.NoteaboutMatlab’sCannydetectorSmallerrorsinimplementationGaussianfunctionnotproperlynormalizedFirstfilterswithaGaussian,thenadifferenceofGaussian(equivalenttofilteringwithalargerGaussianandtakingdifference)Exampleoriginalimage(Lena)DerivativeofGaussianfilterx-directiony-directionComputeGradients(DoG)X-DerivativeofGaussianY-DerivativeofGaussianGradientMagnitudeGetOrientationatEachPixelThresholdatminimumlevelGetorientationtheta=atan2(gy,gx)Non-maximumsuppressionforeachorientationAtq,wehaveamaximumifthevalueislargerthanthoseatbothpandatr.Interpolatetogetthesevalues.BeforeNon-maxSuppressionAfternon-maxsuppressionAssumethemarkedpointisanedgepoint.Thenweconstructthetangenttotheedgecurve(whichisnormaltothegradientatthatpoint)andusethistopredictthenextpoints(hereeitherrors).EdgelinkingHysteresisthresholdingThresholdatlow/highlevelstogetweak/strongedgepixelsDoconnectedcomponents,startingfromstrongedgepixelsHysteresisthresholdingCheckthatmaximumvalueofgradientvalueissufficientlylargedrop-outs?usehysteresisuseahighthresholdtostartedgecurvesandalowthresholdtocontinuethem.FinalCannyEdgesCannyedgedetectorFilterimagewithx,yderivativesofGaussianFindmagnitudeandorientationofgradientNon-maximumsuppression:Thinmulti-pixelwide“ridges”downtosinglepixelwidthThresholdingandlinking(hysteresis):Definetwothresholds

溫馨提示

  • 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)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論