Android中人脸识别技术

本文介绍Android平台的人脸识别技术,包括其发展历程、技术实现细节以及应用场景。谷歌通过收购NevenVision公司获得图像识别技术,并将其应用于Android系统中。文章详细介绍了Android人脸识别的底层库、Java层接口及其限制。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

http://blog.csdn.net/BonderWu/archive/2010/09/05/5865205.aspx

 

 

 

Android自带的人脸识别技术只能识别出人脸在画面中的位置,中心点,眼间距,角度等基本特性,提供给上层应用使用。实际上,咱们也可以 port OpenCV等库到Android中,来完成相关功能(仅仅只是猜测而已,自己并没有真正动手实践过)。

1. 相关背景

Google 于2006年8月收购Neven Vision 公司 (该公司拥有 10 多项应用于移动设备领域的图像识别的专利),以此获得了图像识别的技术,并很快应用到免费的 Picasa 相册管理程序中,提供基于人脸识别的相片管理功能,另外还推出了一个新项目叫Goggle ,能从照片中识别世界各地的地标建 筑,同样Google 也把人脸识别功能添加到了Android 中。不过由于个人隐私等相关因素,Google Goggles好像暂时屏蔽了人脸识别功能

2. Android 中的人脸识别技术

底层库:android/external/neven/

framework 层:frameworks/base/media/java/android/media/FaceDetector.java

Java 层接口的限制:

  • 只能接受 Bitmap 格式的数据
  • 只能识 别双眼距离大于 20 像素的人脸像(当然,这个可在framework层中修改)
  • 只能检测出人脸的位置 (双眼的中心点及距离)
  • 不能对人脸进行匹配(查找指定的脸谱)

3. 人脸识别技术的应用

A. 为 Camera 添加人脸识别的功能:使得 Camera 的取景器上能标识出人脸范围;如果硬件支持,可以对人脸进行对焦。

B. 为相册程序添加按人脸索引相册的功能:按人脸索引相册,按人脸分组,搜索相册。

4.Neven库给上层提供的主要方 法:

android.media.FaceDetector .FaceDetector(int width, int height, int maxFaces)
public FaceDetector (int width, int height, int maxFaces)

Since: API Level 1

Creates a FaceDetector, configured with the size of the images to be analysed and the maximum number of faces that can be detected. These parameters cannot be changed once the object is constructed.

Parameters

width
the width of the image

height
the height of the image

maxFaces
the maximum number of faces to identify

 

int android.media.FaceDetector .findFaces(Bitmap bitmap, Face [] faces)
public int findFaces (Bitmap bitmap, Face[] faces)

Since: API Level 1

Finds all the faces found in a given Bitmap . The supplied array is populated with FaceDetector.Face s for each face found. The bitmap must be in 565 format (for now).

Parameters

bitmap
the Bitmap graphic to be analyzed

faces
an array in which to place all found FaceDetector.Face s. The array must be sized equal to the maxFaces value set at initialization

Returns

the number of faces found

Throws

IllegalArgumentException
if the Bitmap dimensions don't match the dimensions defined at initialization or the given array is not sized equal to the maxFaces value defined at initialization

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值