資源簡介
用MATLAB代碼實現形態學濾波,包括形態學中各種運算方法。

代碼片段和文件信息
function?d=fushi2(datgop)
%形態學膨脹算法實現根據結構元素原點對齊計算的算法(參考昆明理工碩士論文,“膨脹“含義的實質...)??--by?cwy--20110318
%g:結構元素,例如:g=[1?1?1]為3個點的扁平型結構元素
%op:0--g的原點在開始點,1--g的原點在中心點(要求g長度為奇數),2--g的原點在末點;目前只支持此3種
len?=?length(dat);
len_g?=?length(g);
switch?op
????case?1
????org_piont?=?ceil(len_g/2);
????case?2
??????org_piont?=??len_g;
??otherwise
????org_piont?=?1;
end
for?i=1:len?
????dtmp(i)?=?dat(i);
?????for?j=1:len_g?
?????????if?(i-org_piont+j)?>=?1?&&?(i-org_piont+j)?<=len
?????????????tmp?=?dat(i-org_piont+j)?-?g(j);
???????????if?tmp????????????????dtmp(i)?=?tmp;
???????????end
???????end
????end
end
?d?=?dtmp;
%?x=1:len;
%?plot(xdat‘b‘xd‘r‘);
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????801??2018-02-22?21:35??形態學濾波\fushi2.m
?????文件????????805??2018-02-22?21:35??形態學濾波\pengzhang2.m
?????文件????????432??2018-02-22?21:36??形態學濾波\sEMG_morphology.m
?????目錄??????????0??2018-04-17?12:58??形態學濾波
-----------?---------??----------?-----??----
?????????????????2038????????????????????4
- 上一篇:放大器非線性失真研究裝置.ms14
- 下一篇:MINLP問題TOMLAB教程
評論
共有 條評論