我是OpenCV的初学者。我已成功检测到脸部,现在我要做的是匹配两个不同图像的脸部并返回真值或假值。我怎样才能在openCV中使用c ++来帮助
答案 0 :(得分:2)
人脸识别是一种先进的方法。
有一个致力于此的网站:http://www.face-rec.org/
它包含许多研究论文,算法等,以进行人脸识别。你可以通过谷歌搜索找到类似的网站。
用于此目的的两种流行方法是:
<强> 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获得)
可以在http://www.shervinemami.info/faceRecognition.html找到此方法的C ++实现。
<强> 2。费舍尔面孔:
这使用另一种称为线性判别分析的方法。 有关详细信息,请访问:http://www.scholarpedia.org/article/Fisherfaces
例如:图像的前4个面孔
最后,您可以从this pdf.找到有关它们的所有详细信息代码。您可以在this github repo中找到它的C ++实现。
为了您的信息,上述实现已经从版本2.4-beta开始添加到OpenCV主流(View changelog here)。即使代码也包含在OpenCV 2.4-beta附带的cpp samples中。