Histogram intersection(直方图交叉核,Pyramid Match Kernel)

看关于LBP人脸识别的论文时提到了Histogram intersection这个方法,方法最初来自The Pyramid Match Kernel:Discriminative Classification with Sets of Image Features这篇论文,用来对特征构成的直方图进行相似度匹配,下面介绍下原理。

假设图像或其他数据的特征可以构成直方图,根据直方图间距的不同可以得到多种类型的直方图:

论文里是这么设置的,假设H0(x)里每个直方图宽度为a,那么​H1(x)为2a,以此类推。举个例子,假设有某计算机学院男生身高范围在160cm-200cm,H0(x)宽度可以设置为2cm,那H0(x)里会有20个直方图;类推H1(x)宽度则为4cm,H1(x)会有10个直方图。

两个数据集的相似度可以用下式来匹配:


y和z分别代表不同的数据集,比如给了两个学院男生身高,想看下这两个学院是不是同一个学院(例子不恰当,凑合着用吧^_^),用上式他们的相似度就好了。其中w代表权重,论文里将wi设置为1/(2^i),N代表每两层之间的新匹配的数目,可以通过下式计算:

上式里面的L可以通过下式计算:

附图解释什么意思。


(a)里的y和z代表两种数据分布,三幅图代表三层金字塔,每一层里有间距相等的虚线,意思和我之前说的2cm,4cm的宽度一样。可以看到红点蓝点的位置是固定的,但是根据直方图宽度的不同可以划到不同的直方图里,如(b)所示。(c)图就是L的计算结果,是通过(b)里两种直方图取交集得来的,不过直方图的高度忽略不计,只计算交集后的数目,(c)图每个图的下方都给出了交集数目,比如x0=2,x1=4,x2=3(原图里是5,是不是错了?)。

L得到了,就算N就是通过,也就是通过Ni=Li-Li-1得到(看公式是能取负数的,比如上图里的N0=2,N1=2,N2=-1)。

由于wi之前设置为1/(2^i)了,所以


算法就是这样了,但是感觉不适合Extended LBP,因为等价模式取值不多,经不起这么多的直方图宽度变化,倒是比较适合原生的LBP方法。


基于Matlab直方图Histogram的人脸识别程序-Processed histogram based Face Recognition.part4.rar 基于Matlab 直方图Histogram的人脸识别程序 因为数据库图片太大,所以分成几个压缩文件。 Face recognition 原理介绍: matlab12.jpg Recognizing objects from large image databases, histogram based methods have proved simplicity and usefulness in last decade. Initially, this idea was based on color histograms that were launched by swain [1]. This algorithm presents the first part of our proposed technique named as “Histogram processed Face Recognition” [2] For training, grayscale images with 256 gray levels are used. Firstly, frequency of every gray-level is computed and stored in vectors for further processing. Secondly, mean of consecutive nine frequencies from the stored vectors is calculated and are stored in another vectors for later use in testing phase. This mean vector is used for calculating the absolute differences among the mean of trained images and the test image. Finally the minimum difference found identifies the matched class with test image. Recognition accuracy is of 99.75% [1] M. J. Swain and D. H. Ballard, “Indexing via color histogram”, In Proceedings of third international conference on Computer Vision , pages 390–393, Osaka, Japan, 1990. [2] Fazl-e-Basit, Younus Javed and Usman Qayyum, "Face Recognition using processed histogram and phase only correlation ", 3rd IEEE International Conference on Emerging Technology pp. 238-242
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值