我想知道并搜索有关使用 Canvas 进行人脸识别的信息,特别是如何检测人脸的各个部分。
假设我从网络摄像头拍了一张照片,然后我想检测眼睛、嘴巴、鼻子和耳朵,将它们分成不同的图像。
这样做的过程是什么?
我想知道并搜索有关使用 Canvas 进行人脸识别的信息,特别是如何检测人脸的各个部分。
假设我从网络摄像头拍了一张照片,然后我想检测眼睛、嘴巴、鼻子和耳朵,将它们分成不同的图像。
这样做的过程是什么?
What i did recently trying to solve same problem (face and eyes detection) was:
Scale down processed image to achieve decent performance (I downscaled everything to 320px width)
Detect face in image using Core Computer Vision Library - https://github.com/liuliu/ccv
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.
您可以使用 HTML5 的getUserMedia和headtrackr.js来实现您正在寻找的内容。此外,您还可以检测对象、访问用户媒体等等。希望这是您正在寻找的。