資源簡(jiǎn)介
壓縮包內(nèi)是中科大數(shù)字圖像分析李厚強(qiáng),周文罡水平集,推導(dǎo)水平集能量函數(shù)的演化方程,用matlab代碼實(shí)現(xiàn)圖像分割。
還有數(shù)字圖像領(lǐng)域的大牛的水平集matlab程序
代碼片段和文件信息
clear;
close?all;
clc;
%Img=imread(‘three.bmp‘);??
Img=imread(‘twocells.bmp‘);??
U=Img(::1);
Img=double(U);
[nrowncol]=size(Img);?
%根據(jù)paper設(shè)定演化方程中的一些權(quán)重參數(shù)
epsilon=1.5;
timestep=5;
mu=0.2/timestep;
lambda=5;
nu=1.5;
???
initial=4*ones(nrowncol);
initial(6:end-56:end-5)=-4;
figure;
imagesc(Img);colormap(gray);
hold?on;
[~~]=contour(initial[0?0]‘r‘);title(‘初始輪廓‘);
Img_new=conv2(Imgfspecial(‘gaussian‘151.5)‘same‘);
[xy]=gradient(Img_new);
g=1./(1+x.^2+y.^2);
[vxvy]=gradient(g);
u=initial;
for?n=1:200
????u=evolution(uvxvyglambdamunuepsilontimestep);?????
????if?mod(n2)==0
????????pause(0.07);%程序暫停0.07秒用于觀察測(cè)試現(xiàn)象,然后繼續(xù)執(zhí)行
????????imagesc(Img);colormap(gray);
????????hold?on;
????????[~~]=contour(u[0?0]‘r‘);?
????????m
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件?????515899??2018-11-02?13:11??上傳到網(wǎng)上的數(shù)字圖像大作業(yè)\CV_code_Sample.zip
?????文件???????1761??2019-01-18?17:10??上傳到網(wǎng)上的數(shù)字圖像大作業(yè)\LevelSet.m
?????文件??????11766??2004-06-09?12:07??上傳到網(wǎng)上的數(shù)字圖像大作業(yè)\three.bmp
?????文件??????16434??2004-07-23?20:36??上傳到網(wǎng)上的數(shù)字圖像大作業(yè)\twocells.bmp
?????文件??????77549??2019-01-18?17:06??上傳到網(wǎng)上的數(shù)字圖像大作業(yè)\水平集變分推導(dǎo).docx
?????目錄??????????0??2019-01-18?17:07??上傳到網(wǎng)上的數(shù)字圖像大作業(yè)
-----------?---------??----------?-----??----
???????????????623409????????????????????6
評(píng)論
共有 條評(píng)論