资源简介
距离正则化水平集演化模型,DRLSE,无需初始化模型基础上引入新的符号距离保持项。水平集分割经典算法。里面有文献和代码,可以直接运行。
代码片段和文件信息
% 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=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=20;
lambda=5; % 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
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;
phi=initialLSF;
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.5);
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 on; contour(phi [00] ‘r‘);
end
end
% refine the zero level contour by further level set evolution with alfa=0
alfa=0;
iter_refine = 10;
phi = drlse_edge(phi g lambda mu alfa epsilon timestep iter_inner potentialFunction);
finalLSF=phi;
figure(2);
imagesc(Img[0 255]); axis off; axis equal; colormap(gray); hold on; contour(phi [00] ‘r‘);
hold on; contour(phi [00] ‘r‘);
str=[‘Final zero level contour ‘ num2str(iter_outer*iter_inner+iter_refine) ‘ iterations‘];
title(str);
figure;
mesh(-finalLSF); % for a better view the LSF is displayed upside
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 3291 2018-05-14 07:53 DRLSE(Li)\demo_1.m
文件 3171 2018-05-14 07:53 DRLSE(Li)\demo_2.m
文件 1966604 2020-01-06 21:12 DRLSE(Li)\DRLSE.pdf
文件 3517 2018-05-14 07:53 DRLSE(Li)\drlse_edge.m
文件 5798 2018-05-14 07:53 DRLSE(Li)\gourd.bmp
文件 3123 2018-05-14 07:53 DRLSE(Li)\improved-drlse.m
文件 16434 2018-05-14 07:53 DRLSE(Li)\twocells.bmp
文件 14286 2018-05-14 07:53 DRLSE(Li)\vessel.bmp
目录 0 2020-01-06 16:26 DRLSE(Li)
----------- --------- ---------- ----- ----
2016224 9
相关资源
- 基于MATLAB与OpenCV相结合的双目立体视
- FAST特征点检测算法的matalb源码实现
- 节约里程法求解CVP_MATLAB.zip
- 基于HOG+SVM的行人检测系统183534
- Matlab+OpenCV相机标定详细步骤
- 水平集level set、李纯明博士DRLSE改进方
- 永冻土层研究数学建模
- hogcascade训练,内有人头训练样本和使
- 图片素材.zip,适用于常见的数字图像
- cvx——w64.zip
- KCF跟踪demo1
- 光流法包括LK光流,HS光流,论文,
- 张正友相机标定Opencv实现带棋盘格打
- Pearson-Digital Image Processing, 4th.Editio
- Matlab仿真CV、CA、CT三种运动模型的轨
- cvx优化问题
- cvbs编码器模型
- 李纯明老师 水平集CV MATLAB代码
- 图像分割 CV模型的MATLAB源代码
- cv水平集及改进算法MATLAB程序
- CVX使用手册
- Matlab_R2015b_osgenericvideointerface
- 目标跟踪常速度CV及常加速度CA模型程
- cv_rotatedRect.mexw64
- CV模型matlab
- CVX工具箱使用说明
- 基本Snake活动轮廓模型
- kalman滤波器VD、CA、CV算法实现目标跟
- IMM算法源程序-CACV 模型
- opencv 类似matlab 绘图
评论
共有 条评论