图片或视频人脸检测的jQuery插件:jQuery Face Detection Plugin
jopen
10年前
这个jQuery/Zepto能够检测图像,视频和画布的人脸,然后取得它们的坐标。
<script> $('#picture').faceDetection({ complete: function (faces) { console.log(faces); } }); </script>
返回找到的人脸组成的数组对象:
- x — Y coord of the face in the picture
- y — Y coord of the face in the picture
- width — Width of the face
- height — Height of the face
- positionX — X position relative to the document
- positionY — Y position relative to the document
- offsetX — X position relative to the offset parent
- offsetY — Y position relative to the offset parent
- scaleX — Ratio between original image width and displayed width
- scaleY — Ratio between original image height and displayed height
- confidence — Level of confidence