




版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
圖像形態(tài)學處理函數(shù)簡介1結構元素創(chuàng)建函數(shù)strel
CreatemorphologicalstructuringelementSyntaxSE=strel(shape,parameters)DescriptionSE=strel(shape,parameters)createsastructuringelement,SE,ofthetypespecifiedbyshape.Thistablelistsallthesupportedshapes.Dependingonshape,strelcantakeadditionalparameters.Seethesyntaxdescriptionsthatfollowfordetailsaboutcreatingeachtypeofstructuringelement1結構元素創(chuàng)建函數(shù)1結構元素創(chuàng)建函數(shù)SE=strel('arbitrary',NHOOD)createsaflatstructuringelementwhereNHOODspecifiestheneighborhood.floor((size(NHOOD)+1)/2)1結構元素創(chuàng)建函數(shù)SE=strel('diamond',R)createsaflat,diamond-shapedstructuringelement,whereRspecifiesthedistancefromthestructuringelementorigintothepointsofthediamond.
1結構元素創(chuàng)建函數(shù)SE=strel('disk',R,N)createsaflat,disk-shapedstructuringelement,whereRspecifiestheradius1結構元素創(chuàng)建函數(shù)SE=strel('line',LEN,DEG)createsaflat,linearstructuringelement,whereLENspecifiesthelength,andDEGspecifiestheangle(indegrees)oftheline1結構元素創(chuàng)建函數(shù)SE=strel('pair',OFFSET)createsaflatstructuringelementcontainingtwomembers.Onememberislocatedattheorigin.Thesecondmember'slocationisspecifiedbythevectorOFFSET.2圖像腐蝕函數(shù)imerodeErodeimageSyntaxIM2=imerode(IM,SE)IM2=imerode(IM,NHOOD)IM2=imerode(IM,SE,PACKOPT,M)IM2=imerode(...,PADOPT)2圖像腐蝕函數(shù)originalBW=imread('circles.png');se=strel('disk',11);erodedBW=imerode(originalBW,se);imview(originalBW)imview(erodedBW)3圖像膨脹函數(shù)imdilateDilateimageSyntaxIM2=imdilate(IM,SE)IM2=imdilate(IM,NHOOD)IM2=imdilate(IM,SE,PACKOPT)IM2=imdilate(...,PADOPT)3圖像膨脹函數(shù)I=imread('cameraman.tif');se=strel('ball',5,5);I2=imdilate(I,se);imshow(I),title('Original')figure,imshow(I2),title('Dilated')4圖像開運算函數(shù)imopenOpenanimageSyntaxIM2=imopen(IM,SE)IM2=imopen(IM,NHOOD)5圖像閉運算函數(shù)imcloseCloseanimageSyntaxIM2=imclose(IM,SE)IM2=imclose(IM,NHOOD)6邊界消除函數(shù)imclearborder
SuppresslightstructuresconnectedtoimageborderSyntaxIM2=imclearborder(IM)IM2=imclearborder(IM,CONN)Descriptionsuppressesstructuresthatarelighterthantheirsurroundingsandthatareconnectedtotheimageborder.7圖像填充函數(shù)imfill
FillimageregionsSyntaxBW2=imfill(BW,locations)BW2=imfill(BW,'holes')I2=imfill(I)BW2=imfill(BW)[BW2locations]=imfill(BW)BW2=imfill(BW,locations,CONN)BW2=imfill(BW,CONN,'holes')I2=imfill(I,CONN)7圖像填充函數(shù)Fillintheholesofabinaryimage.BW4=im2bw(imread('coins.png'));BW5=imfill(BW4,'holes');imview(BW4),imview(BW5)7圖像填充函數(shù)Fillintheholesofanintensityimage.I=imread('tire.tif');I2=imfill(I,'holes');imview(I),imview(I2)8舉例:用圖像分割檢測細胞Step1:ReadImageStep2:DetectEntireCellStep3:FillGapsStep4:DilatetheImageStep5:FillInteriorGapsStep6:RemoveConnectedObjectsonBorderStep7:SmooththeObject8舉例:用圖像分割檢測細胞
步驟1:讀入圖像I=imread('cell.tif');figure,imshow(I)title('originalimage')8舉例:用圖像分割檢測細胞步驟2:邊緣檢測BWs=edge(I,'sobel',(graythresh(I)*.1));figureimshow(BWs)
title('binarygradientmask')8舉例:用圖像分割檢測細胞步驟3:創(chuàng)建結構元素se90=strel('line',3,90);se0=strel('line',3,0);步驟4;膨脹圖像BWsdil=imdilate(BWs,[se90se0]);figure,imshow(BWsdil)title('dilatedgradientmask')8舉例:用圖像分割檢測細胞步驟5:填充內部空洞BWdfill=imfill(BWsdil,'holes');figure,imshow(BWdfill);title('binaryimagewithfilledholes');8舉例:用圖像分割檢測細胞步驟6:消除與邊界相連的目標BWnobord=imclearborder(BWdfill,4);figure,imshow(BWnobord),title('
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 專利抵押合同范本
- 公司銷售人員合同范例
- 勞務合同范本 短期
- 單位購買電腦合同范本
- 勾機鏟車出租合同范本
- 公司水果采購合同范本
- 單位玻璃保潔合同范本
- 蛋糕師招聘合同范本
- 代買股合同范本
- 制式采購合同范本
- 旅游學概論(第五版)課件 第一章 旅游學概述
- 學生課后服務活動記錄表
- 義務教育信息科技課程標準(2022年版)解讀
- CRRT的精細化護理
- 部編小學語文單元作業(yè)設計一年級下冊第二單元
- (高清版)DZT 0282-2015 水文地質調查規(guī)范(1:50000)
- 七字押韻祭文范文六篇
- 項目利益相關者溝通計劃
- 建設項目安全設施“三同時”課件
- 交通大數(shù)據(jù)服務平臺建設方案
- 十二經絡及任督二脈課件
評論
0/150
提交評論