前沿:最近由于大论文实验的原因,需要整理几种Snake方法,以比较道路提取效果。所以今天晚上就将电脑中的一些LBF Snake代码作一下分类定义。并给出效果。以便比较。
1. 原始的LBF Snake方法的效果
原始的LBF算法实现如下;
实验的代码下载地址,Download Link。然后在网盘中找到这个目录aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAARgAAAASCAIAAAAPAFYJAAAFqElEQVRoge2av4/kNBTH72879l/IvxAkSqoVEkWumu0QBUKsU9OhSWOJIlcxTYpxFwVOioTQyBKKUgxcdMcii8KO/Z79nB87syys8tUWc8mz48y9T77PL/NKbdq06WK9eu4FbNr0ErSBtGnTFbSBtGnTFbSBtGnTFXRFkIZDeSxOq4c11TFvBv/oqd3t28afvz6c4ZG+KGUH/+kPsZdAA71//qsSLMXKuPRCJM8yzv04Gy1YmjIRn5k6Z6eVM8cEIxYEw8nTaBrB9Gd4MLhrcyNMKCV5Flvy/0keSH2xP+72x93+EUg8EiSl+mJPZrZ3/NEgeWFKnWUeQe7JZbLHaFFyE4cFSzMueAZTE2WjROcyLul5x6QH02aZt0ASaPwYMFNHgs0lxju338AsSAS3kmfRJ8XzCoLUF46f4VCuTbWlIDWVYTX6V/XeqsKY4qSmQWqqY3EaDiUYVbZFOX2tqL56++tfD38v/SYmNAsSDlBTobNjwFjS2BCGNkfhbC7Lp4xj1pHgIpeCRN7UU4HEGHt4eLhkBgDSWebek3udVjtS19REUaeUouu9FY4Eh3dNjVZ1HjqllBq6NdXd62/qL4p37z9c9F0rNQuS5Flq8w2ZDXzqBwGUA/iy17IfgB/hh78r8CTPGGPe9K7s1Pi5dbJwTUxEnIqxKZDivvwkICVJcnd3Nwx0Ni5RzJHgwfrQtPr57ZL7LHO/CAQg6bPmYe8sxWPDT3GsrqmxXVAgIY/SIHl30Rel7E4tXIw+21RL7UgpdcPa19/+/On3dffHh4VDaE2CZDLOcAJyWaDQoOQJHt4BZDqdMUiCZVwKlnEZN0bJMyZ8W9JLQ0fTAE0Qj291kSPFbIoEy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YII=" alt="" />,然后找到下图所示的文件。
但是,初步测试是不能用,原因是LSE程序的源文件无法编译,找不到源文件。这个代码中提到的参考文献是[1]. 如果需要更加详细的学习,请直接百度学术中下载。
一下是原作者在代码中的一些说明:
% This Matlab code demomstrates an improved algorithm based on the local binary fitting (LBF) model
% in Chunming Li et al's paper:
% "Implicit Active Contours Driven By Local Binary Fitting Energy" in Proceedings of CVPR'07
%
% Author: Chunming Li, all rights reserved
% E-mail: [email protected]
% URL: http://vuiis.vanderbilt.edu/~licm/
% http://www.engr.uconn.edu/~cmli/
%
% Notes:
% 1. Some parameters are set to default values for the demos in this package. They may need to be
% modified for different types of images.
% 2. The current version does not work for images with multiple junctions, due to its two-phase
% formulation (i.e. using only one level set function). For example, an image has 3 objects/regions,
% and each object/region is directly contiguous to all the other two objects/regions. This code will be
% extended to multiphase in the future version, which will be available at the author's webpage.
% 3. The image intensities may need to be rescaled to the range of [0, 255], if the intensities are much lower
% or much higher than 255. Alternatively, you can change the parameters lambda1 and lambda2, and nu (the
% coefficient of lenght term) accordingly.
2008年的文章的算法效果
原始图像
测试的实验结果图(文献[2])
实验的代码下载地址,Download Link。然后在网盘中找到这个目录
用原作者自己的一些话说明,则如下
% This Matlab file demomstrates a level set method in Chunming Li et al's paper
% "Minimization of Region-Scalable Fitting Energy for Image Segmentation",
% IEEE Trans. Image Processing, vol. 17 (10), pp.1940-1949, 2008.
% Author: Chunming Li, all rights reserved
% E-mail: [email protected]
% URL: http://www.engr.uconn.edu/~cmli/
%
% Note 1: The original model (LBF) with a small scale parameter sigma, such as sigma = 3, is sensitive to
% the initialization of the level set function. Appropriate initial level set functions are given in
% this code for different test images.
% Note 2: There are several ways to improve the original LBF model to make it robust to initialization.
% One of the improved LBF algorithms is implemented by the code in the following link:
% http://www.engr.uconn.edu/~cmli/code/LBF_v0.1.rar
2 CV模型
程序缺乏相应的文档说明,只在演示程序中找到下面的话。应该这个代码就是实现的这个文章了。参考文献[3].
% Matlab code implementing Chan-Vese model in the paper 'Active Contours Without Edges'
% This method works well for bimodal images, for example the image 'three.bmp'
初始化时,需要画一条线。运行结果如下:
程序代码同样在第一次提到的下载连接处,Download Link,找到这个文件夹
参考文献
[1] Li C, Kao C Y, Gore J C, et al. Implicit Active Contours Driven by Local Binary Fitting Energy[C]// 2007 IEEE Conference on Computer Vision and Pattern Recognition. IEEE Computer Society, 2007:1-7.
[2] Chunming L, Chiu-Yen K, Gore J C, et al. Minimization of region-scalable fitting energy for image segmentation.[J]. IEEE Transactions on Image Processing A Publication of the IEEE Signal Processing Society, 2008, 17(10):1940-1949.
[3] Chan T F, Vese L A. Active contours without edges.[J]. IEEE Transactions on Image Processing A Publication of the IEEE Signal Processing Society, 2001, 10(2):266 - 277.