专家人脸整合已有登录页面
This commit is contained in:
@ -3,19 +3,19 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery-webcam-master</title>
|
||||
<link href="cs.css" rel="stylesheet" type="text/css">
|
||||
<!-- <link href="cs.css" rel="stylesheet" type="text/css"> -->
|
||||
<script src="jquery.js"></script>
|
||||
<script src="jquery.webcam.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="webcam" style="float: left; clear: both;"></div>
|
||||
<input id="snapBtn" type="button" value="人脸识别" style="float: left; clear: both;"/>
|
||||
<img id="base64image" src='' width="450" height="320" style="float: left; clear: both;"/>
|
||||
<!-- <input id="snapBtn" type="button" value="人脸识别" style="float: left; clear: both;"/>
|
||||
<img id="base64image" src='' width="450" height="320" style="float: left; clear: both;"/> -->
|
||||
<script type="text/javascript">
|
||||
var image = new Array();
|
||||
var pos = 0;
|
||||
var w = 480;//图片的宽高,无论图片的尺寸是否大于画布的尺寸都能自适应
|
||||
var h = 320;
|
||||
var w = 382;//图片的宽高,无论图片的尺寸是否大于画布的尺寸都能自适应
|
||||
var h = 200;
|
||||
$(document).ready(function() {
|
||||
$("#webcam").webcam({
|
||||
width: w,
|
||||
@ -50,12 +50,13 @@
|
||||
|
||||
});
|
||||
|
||||
$('#snapBtn').on('click', function() {
|
||||
webcam.capture();
|
||||
});
|
||||
// $('#snapBtn').on('click', function() {
|
||||
// webcam.capture();
|
||||
// });
|
||||
|
||||
function receiveMessageFromParent ( event ) {
|
||||
$('#base64image').attr('src', 'data:image/jpg;base64,' + event.data.data);
|
||||
webcam.capture();
|
||||
//$('#base64image').attr('src', 'data:image/jpg;base64,' + event.data.data);
|
||||
};
|
||||
|
||||
window.addEventListener('message', receiveMessageFromParent, false);
|
||||
|
Reference in New Issue
Block a user