资源简介
Chunming Li,Chenyang Xu, Changfeng Gui, and Martin D. Fox, "Distance Regularized Level Set Evolution and its Application to Image Segmentation", IEEE Trans. Image Processing, vol. 19 (12), pp. 3243-3254, 2010
代码片段和文件信息
% This Matlab code demonstrates an edge-based active contour model as an application of
% the Distance Regularized Level Set Evolution (DRLSE) formulation in the following paper:
%
% C. Li C. Xu C. Gui M. D. Fox “Distance Regularized Level Set Evolution and Its Application to Image Segmentation“
% IEEE Trans. Image Processing vol. 19 (12) pp. 3243-3254 2010.
%
% Author: Chunming Li all rights reserved
% E-mail: lchunming@gmail.com
% li_chunming@hotmail.com
% URL: http://www.engr.uconn.edu/~cmli/
clear all;
close all;
%Img=imread(‘gourd.bmp‘);
%Img=imread(‘2.12.jpg‘);
Img=imread(‘kidney1.jpg‘);
%Img=rgb2gray(imread(‘abdomen5.png‘));
Img=double(Img(::1));
%% parameter setting
timestep=1; % time step
mu=0.2/timestep; % coefficient of the distance regularization term R(phi)
iter_inner=5;
iter_outer=1085;
lambda=2; % coefficient of the weighted length term L(phi)
alfa=-3; % coefficient of the weighted area term A(phi)
epsilon=1.5; % papramater that specifies the width of the DiracDelta function
epsilon=2.0;
sigma=.8; % scale parameter in Gaussian kernel
G=fspecial(‘gaussian‘15sigma); % Caussian kernel
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.
% initialize LSF as binary step function
c0=2;
initialLSF = c0*ones(size(Img));
% generate the initial region R0 as two rectangles
%initialLSF(25:3520:25)=-c0;
%initialLSF(25:3540:50)=-c0;
%-------------------test-------------
%initialLSF(125:175120:125)=-c0;
%initialLSF(125:175140:150)=-c0;
%phi=initialLSF;
figure;imshow(Img[]);title(‘initial circle‘);
[yx]=ginput(1);
x1 = round(x(1));
y1 = round(y(1));
%x2=round(x(2));
%y2=round(y(2));
initialLSF(x1:x1+20y1:y1+20)=-c0;
%initialLSF(x2:x2+50y2:y2+50)=-c0;
phi=initialLSF;
%----------------end-------------------
figure(1);
mesh(-phi); % for a better view the LSF is displayed upside down
hold on; contour(phi [00] ‘r‘‘LineWidth‘2);
title(‘Initial level set function‘);
view([-80 35]);
figure(2);
imagesc(Img[0 255]); axis off; axis equal; colormap(gray); hold on; contour(phi [00] ‘r‘);
title(‘Initial zero level contour‘);
pause(0.1);
potential=2;
if potential ==1
potentialFunction = ‘single-well‘; % use single well potential p1(s)=0.5*(s-1)^2 which is good for region-based model
elseif potential == 2
potentialFunction = ‘double-well‘; % use double-well potential in Eq. (16) which is good for both edge and region based models
else
potentialFunction = ‘double-well‘; % default choice of potential function
end
% start level set evolution
for n=1:iter_outer
phi = drlse_edge(phi g lambda mu alfa epsilon timestep iter_inner potentialFunction);
if mod(n2)==0
figure(2);
imagesc(Img[0 255]); axis off; axis equal; colormap(gray); hold
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 17557 2015-05-08 15:30 DRLSE_v0\2.12.jpg
文件 14107 2015-05-08 15:30 DRLSE_v0\abdomen.jpg
文件 63855 2015-05-08 15:30 DRLSE_v0\abdomen2.jpg
文件 413325 2015-05-08 15:30 DRLSE_v0\abdomen5.png
文件 3945 2015-05-08 16:56 DRLSE_v0\demo_1.m
文件 3257 2015-05-08 15:30 DRLSE_v0\demo_2.m
文件 1978453 2015-05-08 15:30 DRLSE_v0\DRLSE.pdf
文件 1474 2015-05-08 15:30 DRLSE_v0\DRLSELabel.mat
文件 899 2015-05-08 15:30 DRLSE_v0\DRLSELabel1.mat
文件 913 2015-05-08 15:30 DRLSE_v0\DRLSELabel2.mat
文件 3595 2015-05-08 15:30 DRLSE_v0\drlse_edge.m
文件 5798 2015-05-08 15:30 DRLSE_v0\gourd.bmp
文件 25037 2015-05-08 15:30 DRLSE_v0\kidney1.jpg
文件 25968 2015-05-08 15:30 DRLSE_v0\liver1.jpg
文件 16434 2015-05-08 15:30 DRLSE_v0\twocells.bmp
文件 662 2015-05-08 15:30 DRLSE_v0\Unti
目录 0 2015-05-13 10:24 DRLSE_v0
----------- --------- ---------- ----- ----
2575279 17
相关资源
- 李纯明的2011年水平集新论文加上试验
- 水平集 matlab实现 内含原理论文!效果
- 水平集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
- 中国科学技术大学(中科大)数字图
评论
共有 条评论