Python--level set (水平集)和 chan-vese模型
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_38784098/article/details/82144106
level set :https://www.zhihu.com/question/22608763?sort=created
https://blog.csdn.net/xiangyong58/article/details/11876019
chan-vese模型(公式推导):https://blog.csdn.net/zhangchen1003/article/details/48930377
水平集(CV模型)代码:
-
import cv2
-
from pylab import*
-
-
Image = cv2.imread( '02.jpg', 1) # 读入原图
-
image = cv2.cvtColor(Image, cv2.COLOR_BGR2GRAY)
-
img = np.array(image, dtype=np.float64) # 读入到np的array中,并转化浮点类型
-
-
# 初始水平集函数
-
IniLSF = np.ones((img.shape[ 0], img.shape[1]), img.dtype)
-
Ini