4

我想知道并搜索有关使用 Canvas 进行人脸识别的信息,特别是如何检测人脸的各个部分。

假设我从网络摄像头拍了一张照片,然后我想检测眼睛、嘴巴、鼻子和耳朵,将它们分成不同的图像。

这样做的过程是什么?

4

2 回答 2

6

What i did recently trying to solve same problem (face and eyes detection) was:

  1. Scale down processed image to achieve decent performance (I downscaled everything to 320px width)

  2. Detect face in image using Core Computer Vision Library - https://github.com/liuliu/ccv

  3. Based on the detected face rectangle information detect eyes using HAAR object detector (it has cascade for eyes only detection - https://github.com/inspirit/jsfeat

For step 2 i also used "grayscale" and "equalize_histogram" from JSFEAT library.

Also if step 3 fails you can try to guess eyes position (depends on how high accuracy you're going for).

This workflow gave me satisfying results and performance. It tested it both on desktop (~500ms on iMac) and mobile devices (~3000ms on iphone 4 using image from webcam). Unfortunately I cannot post a link to working example at this point, but i'll post a link to github once i have something there.

于 2013-09-25T16:58:04.847 回答
3

您可以使用 HTML5 的getUserMediaheadtrackr.js来实现您正在寻找的内容。此外,您还可以检测对象、访问用户媒体等等。希望这是您正在寻找的。

于 2013-07-18T10:00:12.970 回答