简体   繁体   English

OpenCV 人脸识别 - 工具

[英]OpenCV Face Recognition - Tools

I'm trying to build a face recognizer with OpenCV.我正在尝试使用 OpenCV 构建人脸识别器。 The basic setup is that the phone will take a picture, generate the feature vector, and send it to a server.基本设置是手机将拍照,生成特征向量,并将其发送到服务器。 The server will be the one that does that actual recognizing.服务器将是进行实际识别的服务器。

I have followed the tutorial listed here .我已按照此处列出的教程进行操作。 With this, I was able to correctly obtain keypoints and create a descriptor based off an image.有了这个,我就能够正确获取关键点并基于图像创建一个描述符。

So now I have what I believe is the feature vector (descriptor... right?).所以现在我有了我认为的特征向量(描述符......对吧?)。 However, I have been unable to find any tutorial to recognize faces based on this value.但是,我一直无法找到任何基于此值识别人脸的教程。 I found tutorials based on using the raw images, but I'm trying to not use the image on the server.我找到了基于使用原始图像的教程,但我试图不在服务器上使用图像。

Is there any way to do face recognition (eigenfaces, fisherfaces, lbp) using the generated feature vector?有没有办法使用生成的特征向量进行人脸识别(特征脸、fisherfaces、lbp)?

I still don't know exactly what the descriptors and keypoints are used for... but it's not for face recognition.我仍然不知道描述符和关键点的确切用途……但这不是用于人脸识别。

I found out what I need to do on the phone side by reviewing the code found online .通过查看在线找到的代码,我发现了我需要在电话端执行的操作。 I just need to do the following to get ready for the face recognition:我只需要执行以下操作即可为人脸识别做好准备:

Mat lbp_image = elbp(src, _radius, _neighbors);
Mat query = spatial_histogram(
        lbp_image, /* lbp_image */
        static_cast<int>(std::pow(2.0, static_cast<double>(_neighbors))), /* number of possible patterns */
        _grid_x, /* grid size x */
        _grid_y, /* grid size y */
        true /* normed histograms */);

The above code can be found at different locations on the link provided above.上面的代码可以在上面提供的链接的不同位置找到。 Hopefully this will help anyone else trying to work with this in the future.希望这将有助于其他任何人在未来尝试使用它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM