EM 算法 ...

本文介绍使用期望最大化(EM)算法进行图像分割的过程及实验结果。通过将输入图像视为高斯混合模型,采用EM算法实现灰度值聚类,并对比了EM算法与MICO算法在图像分割任务上的性能。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >


1.      AlgorithmTheory

1.1.    EMAlgorithm

Suppose we have an estimation problem in which we have a training set .We wish to fit the parameters of a model  to the data, where the likelihood is given by

                                         (1)

Because explicitly finding the maximum likelihood estimates of the parameter  may be hard, we choose EM algorithm as an efficient method for MLE. The algorithm is as follows:

Repeat until convergence{

(E-step)For each , set

                                         (2)

(M-step)Set

                         (3)

}

1.2.    EMalgorithm in image segmentation

原谅我在此处用中文继续:

我们将输入的图片数据视作Mixture of Gaussian:

对于输入的数据,我们可以得到其直方图分布,我们欲对这个灰度值进行聚类(注意到聚类算法是逐灰度值处理的)。设我们要分为k类,则有个k个Gaussian分布。

在初始化的过程中,由图像数据我们可以得到


至此我们可以求得初始化下的一个似然函数(即公式(1)),之后我们希望这个似然函数的值在迭代中不断增大,直至收敛。

因此,在迭代中,我们选择:


由上,将分布参数在迭代过程中不断改动,则值增大。

我们记为新分布下的似然函数值。则


当两者差值足够小时,收敛。

这时大家应该发现了一个问题,如果我们按上表中Code部分计算,那么输入图像中出现1个255和出现n个255,迭代结果是一样的。这是错误的。原因在于我们没有统计各数字(灰度值)出现的频率。为了修正这个错误,我们在执行EM过程中,应在概率项前乘以“直方图分布”系数,即

2.     Technological process


3.     Experiment Results

clc
clear all;
img = imread('brainweb91.tif');
img = rgb2gray(img);
k = 4;
[mask,mu,v,p]=dcEMimSeg(img,k);
figure,imshow(img),title('读入原图像');
figure,imshow(mask./3),title('EMclustering结果');
img2 = uint8(mask./3);
[ri,gce,vi] = compare_segmentations(img,img2);
ri
gce
vi

ri = 0.6447
gce = 0
vi = 4.5362

Published with MATLAB? R2014a


4.     Compareto MICO

 

EM algorithm

MICO

ri (Probabilistic Rand Index)

0.6447

0.9942

gce (Global Consistency Error)

0

0.5791

vi (Variation of Information)

4.5362

6.0720

5.     Reference

[1]. A Tutorialon Clustering Algorithms,http://home.deib.polimi.it/matteucc/Clustering/tutorial_html/mixture.html.

[2]. CS229Lecture notes, Andrew Ng,Notes8.

转载于:https://www.cnblogs.com/helay/p/7133961.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值