基于juqery-webcam 实现摄像头调取
uqery-webcam 插件下载地址:https://www.xarg.org/project/jquery-webcam-plugin/
人脸识别 jquery.facedetection.js下载 https://github.com/jaysalvat/jquery.facedetection
<html>
<div id="webcam"></div>
<input id="snapBtn" type="button" value="capture" />
<script src="jquery-1.11.3.js"></script>
<script src="jquery.webcam.js"></script>
<script src="jquery.facedetection.js"></script>
<canvas id="canvas" width="320" height="240"></canvas>
<img id="picture" src="">
</html>
<script>
var w = 320, h = 240;
var pos = 0, ctx = null, saveCB, image;
var ca