资源简介
经典论文 matlab 实现 代码,绝对能运行
代码片段和文件信息
% This Matlab file demomstrates a level set method in the following paper
% C. Li C. Xu C. Gui and M. D. Fox “Level Set Evolution Without Re-initialization: A New Variational Formulation“
% in Proc. IEEE Conf. Computer Vision and Pattern Recognition (CVPR‘05) vol. 1 pp. 430?36 2005.
%
% Author: Chunming Li all rights reserved.
% E-mail: li_chunming@hotmail.com
% URL: http://vuiis.vanderbilt.edu/~licm/
clear all;
close all;
Img = imread(‘50.bmp‘); % The same cell image in the paper is used here
Img=double(Img(::1));
sigma=1.5; % scale parameter in Gaussian kernel for smoothing.
G=fspecial(‘gaussian‘15sigma); %旋转对称高斯低通滤波器,标准方差1.5,大小15*15
Img_smooth=conv2(ImgG‘same‘); % 二维卷积smooth image by Gaussiin convolution
[IxIy]=gradient(Img_smooth); %梯度
f=Ix.^2+Iy.^2;
g=1./(1+f); % 边缘指标函数edge indicator function.
epsilon=1.5; % the papramater in the definition of smoothed Dirac function
timestep=5; % time step
mu=0.2/timestep; % coefficient of the internal (penalizing) energy term P(\phi)
% Note: the product timestep*mu must be less than 0.25 for stability!
lambda=5; % coefficient of the weighted length term Lg(\phi)
alf=1.5; % coefficient of the weighted area term Ag(\phi);
% Note: Choose a positive(negative) alf if the initial contour is outside(inside) the object.
% define initial level set function (LSF) as -c0 0 c0 at points outside on
% the boundary and inside of a region R respectively.
[nrow ncol]=size(Img);
c0=4;
initialLSF=c0*ones(nrowncol);
w=10;
initialLSF(w+1:end-w w+1:end-w)=0; % zero level set is on the boundary of R.
% Note: this can be commented out. The intial LSF does NOT necessarily need a zero level set.
initialLSF(w+2:end-w-1 w+2: end-w-1)=-c0; % negative constant -c0 inside of R postive constant c0 outside of R.
u=initialLSF;
figure;imagesc(Img);colormap(gray);hold on;
[ch] = contour(u[0 0]‘r‘); %轮廓
title(‘Initial contour‘);
% start level set evolution
for n=1:500
u=EVOLUTION(u g lambda mu alf epsilon timestep 1);
if mod(n20)==0 %20的整数倍
pause(0.001);
imagesc(Img);colormap(gray);hold on;
[ch] = contour(u[0 0]‘r‘);
iterNum=[num2str(n) ‘ iterations‘];
title(iterNum);
hold off;
end
end
imagesc(Img);colormap(gray);hold on;
[ch] = contour(u[0 0]‘r‘);
totalIterNum=[num2str(n) ‘ iterations‘];
title([‘Final contour ‘ totalIterNum]);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2014-03-11 16:35 LevelSet_ChunmingLi_v0\
文件 188470 2014-03-10 19:44 LevelSet_ChunmingLi_v0\0.001.bmp
文件 66614 2014-03-11 16:14 LevelSet_ChunmingLi_v0\1.bmp
文件 241470 2014-03-10 20:49 LevelSet_ChunmingLi_v0\50.bmp
文件 188470 2014-03-11 16:14 LevelSet_ChunmingLi_v0\6.bmp
文件 2648 2014-03-11 17:01 LevelSet_ChunmingLi_v0\Demo1.m
文件 2584 2014-03-11 16:14 LevelSet_ChunmingLi_v0\Demo1_ManualBinaryInitial.m
文件 2555 2014-03-11 16:14 LevelSet_ChunmingLi_v0\Demo2.m
文件 2559 2014-03-11 16:14 LevelSet_ChunmingLi_v0\Demo2_ManualBinaryInitial.m
文件 2229 2014-03-11 16:14 LevelSet_ChunmingLi_v0\EVOLUTION.m
文件 801246 2014-03-11 16:14 LevelSet_ChunmingLi_v0\levelset_CVPR05.pdf
文件 66614 2014-03-11 16:14 LevelSet_ChunmingLi_v0\peppers4-0.40.bmp
文件 66614 2014-03-11 16:14 LevelSet_ChunmingLi_v0\peppers_0.5.bmp
文件 8134 2014-03-11 16:14 LevelSet_ChunmingLi_v0\twoObj.bmp
文件 16434 2014-03-11 16:14 LevelSet_ChunmingLi_v0\twocells.bmp
文件 66614 2014-03-11 16:14 LevelSet_ChunmingLi_v0\骨架提取后1.bmp
相关资源
- 水平集level set、李纯明博士DRLSE改进方
- 李纯明老师的level set代码和相关论文
- 基于水平集的分割方法MATLAB代码
- 水平集方法的matlab源代码
- 水平集matlab实现
- 椭圆约束主动轮廓视盘分割
- MATLAB 代码 基于C-V模型的水平集图像分
- 水平集的图像分割
- 李纯明老师 水平集CV MATLAB代码
- cv水平集及改进算法MATLAB程序
- 采用半隐式方案实现变分水平集图像
- 关于水平集方法的拓扑优化代码-TOP
- matlab实现水平集方法
- 基于水平集CV模型的图像分割Matlab代码
- 变分法水平集matlab代码
- 水平集图像分割的Matlab程序代码
- 李纯明的水平集程序matlab
- nonlocal-level-set [SIAM]Nonlocal Active Conto
- MRI_seg
- PDE_in_image_processing (1)MATLAB程序:其
- a-level-set-inariable-distance 李春明提出的
- FCMLSM 基于FCM和水平集的图像分割
- FCMLSM 改进的基于整合空间的模糊聚类
- turbopixels_code.tar 目前效果最好的超像
- 关于水平集方的通用程序-Levelset_mai
- 图像分割中常用的水平集方法的matl
- 中国科学技术大学(中科大)数字图
评论
共有 条评论