2012-04-25 46 views
-1

我是OpenCV的初学者。我已经成功地检测到了脸部,现在我想要做的是匹配来自两个不同图像的脸部并返回true或false值。我怎样才能做到这一点在openCV使用c + +请帮助从不同的图像匹配的脸

回答

2

人脸识别是一种先进的方法。

有专门为这个网站:http://www.face-rec.org/

它含有大量的研究论文,算法等做人脸识别。您可以通过Google搜索找到类似的网站。

用于此目的的两个流行的方法是:

1.本征面孔:

为了理解这一点,下面维基通道好:

A set of eigenfaces can be generated by performing a mathematical process called principal component analysis (PCA) on a large set of images depicting different human faces. Informally, eigenfaces can be considered a set of "standardized face ingredients", derived from statistical analysis of many pictures of faces. Any human face can be considered to be a combination of these standard faces. For example, one's face might be composed of the average face plus 10% from eigenface 1, 55% from eigenface 2, and even -3% from eigenface 3. Remarkably, it does not take many eigenfaces combined together to achieve a fair approximation of most faces. Also, because a person's face is not recorded by a digital photograph, but instead as just a list of values (one value for each eigenface in the database used), much less space is taken for each person's face.

首先32的本征面部脸(获自http://www.shervinemami.info/faceRecognition.html

enter image description here

此方法的C++实现可在http://www.shervinemami.info/faceRecognition.html找到。

2.费舍尔面孔:

这将使用称为线性判别分析的另一种方法。 欲了解更多详情请访问:http://www.scholarpedia.org/article/Fisherfaces

例如:前4个渔民面临的一个图像的

enter image description here

最后,你可以从this pdf.找到所有这些细节的代码,你可以找到它的C++实现在this github repo

有关您的信息,上述实施已被添加到OpenCV主流从版本2.4-beta开始(View changelog here)。即使代码包含在OpenCV 2.4-beta附带的cpp samples中。

+0

+1可怕的问题,但这个答案是有趣和教育(即使对我来说)。你是否每天使用OpenCV? – karlphillip 2012-04-26 12:34:05

+0

是的..我没有其他的东西需要花费时间。 – 2012-04-26 15:01:52