在iPhone上的脸部识别 [英] Face Recognition on the iPhone

查看:147
本文介绍了在iPhone上的脸部识别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在iPhone上进行面部识别。有人可以给我提供参考文献/文章,指出我在正确的方向吗?我做了研究,意识到,我需要做脸部检测首先提取图像,然后通过与数据库中的其他图像进行面部识别。

How can I do facial recognition on the iPhone. Could someone provide me with references/articles to point me in the right direction please? I have done research and realised that I need to do face detection first to extract the image and then do facial recognition by comparing it with other images within a database.

我意识到我已经通过使用OpenCV或者通过使用iOS 5.0及以上版本来检测脸部来进行脸部检测。我不确定面部识别(我计划在远程数据库上存储图像,然后与远程数据库进行比较)。

I have realised that I have do the face detection by using OpenCV or by utilising iOS 5.0 and upwards to detect the face. I am unsure on the facial recognition (I plan on storing images on a remote database and then doing the comparison against the remote database).

推荐答案

面部检测

我将使用开放式简历中的Haarcascades执行快速准确的面部检测。

I would use the Haarcascades available in open CV to perform quick and accurate face detection.

http://opencv.willowgarage.com/wiki/FaceDetection

面部识别

我将使用一种方法,例如主成分分析。

I would use a method such as Principal Component Analysis (PCA) a.k.a eigenfaces.

http://www.cognotics.com /opencv/servo_2007_series/part_5/index.html

该链接显示了如何使用OpenCV的教程 - 我认为这是为C但我相信你可以得到它的基本理由。

That link shows a tutorial on how to get that working with OpenCV - I think this is written for C but i'm sure you can get the basic jist of it.

你也可以看看自己实施它,如果你觉得勇敢(这不是太糟糕)...

You could also look at implementing it yourself if you feel brave (it's not too bad)...

http://www.face-rec.org/algorithms/PCA/jcn.pdf

http://blog.zabarauskas.com/eigenfaces-tutorial/

数据库

我确实做过类似的事情,在PC上不是一个iPhone,但它仍然是同一个概念。

I actually did something similar to you albeit on a PC not an iPhone but its still the same concept. I stored all my images in the database as Blob data types then loaded them into my program when necessary.

编辑

数据库是系统中一个特别棘手的部分,因为这是最大的瓶颈。在我的申请中,我将执行以下步骤...

The database is a particularly tricky part of the system as this is where the biggest bottleneck is. In my application, I would go through the following steps...


  1. 打开应用程序并抓取数据库中的训练图像

  2. 根据这些图像生成训练集

  3. 1和2完成后,系统非常快,因为它只是针对训练集执行识别。

幸运的是,我的数据库服务器位于LAN上,因此速度不是问题,但我可以看到为什么你有一个问题,事实上,在移动设备上你有有限的数据连接(速度/带宽)。您可以压缩图像,但这可能会导致较差的识别率,由于图像质量降低,还必须在设备上解码。还有一个问题,如何将远程数据库暴露给应用程序,但我确信这是可能使用PHP和JSON(和其他技术,见下文)。

Fortunately for me, my database server was located on a LAN therefore speed wasn't a problem, however I can see why you have an issue due to the fact that on a mobile device you have a limited data connection (speed/bandwidth). You can compress the images however this may lead to a worse recognition rate, due to image quality reduction and also you will have to decode on the device. There is also the issue of how to expose the remote database to the application, however I do believe this is possible using PHP and JSON (and other technologies, see below).

从远程数据库检索数据

也许您可以与数据库进行初始同步,以便将图像缓存在手机上?有一种方式,我认为你可能需要有在手机上的图像在某一点,无论如何。

Maybe you could do an initial synchronize with the database so that the images are cached on the phone? One way or another I think you are probably going to have to have the images on the phone at some point regardless.

找出在数据库中存储识别数据/图像的最佳方法是我面临的最大挑战之一,所以我有兴趣听到,如果你找到一个好的方法。

Figuring out the best way to store the recognition data/images in the database was one of the biggest challenges I faced so I would be interested to hear if you find a good method.

这篇关于在iPhone上的脸部识别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆