Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-2-capstone-design2
/
2014104149
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Graduate
2020-11-25 23:27:16 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
8f395180e8955b2a2f4d7e049e34ed991ac40dc5
8f395180
1 parent
62234115
Update flask
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
flask/templates/register.html
flask/templates/register.html
View file @
8f39518
...
...
@@ -11,7 +11,9 @@
<script
type=
'text/javascript'
src=
"{{url_for('static', filename='js/utils.js')}}"
></script>
<script
type=
'text/javascript'
src=
"https://code.jquery.com/jquery-1.12.4.min.js"
></script>
<script
type=
'text/javascript'
>
let
tempCanvas
=
document
.
createElement
(
"canvas"
);
var
tempImage
=
new
Image
();
var
tempCanvas
=
document
.
createElement
(
"canvas"
);
function
load_cascade
()
{
let
faceCascadeFile
=
'haarcascade_frontalface_default.xml'
...
...
@@ -27,11 +29,11 @@ function activate()
fileloader
.
disabled
=
false
;
}
function
detect_face
(
img
)
function
detect_face
()
{
let
canvas
=
document
.
createElement
(
'canvas'
);
let
ctx
=
canvas
.
getContext
(
'2d'
)
ctx
.
src
=
img
;
ctx
.
drawImage
(
tempImage
,
0
,
0
);
let
src
=
cv
.
imread
(
canvas
);
let
dst
=
new
cv
.
Mat
(
src
.
cols
,
src
.
rows
,
cv
.
CV_8UC4
);
let
gray
=
new
cv
.
Mat
();
...
...
@@ -98,8 +100,8 @@ var loadFile = function(event) {
var
reader
=
new
FileReader
();
reader
.
readAsDataURL
(
event
.
target
.
files
[
0
]);
reader
.
onload
=
function
()
{
let
img
=
reader
.
result
;
detect_face
(
img
);
tempImage
.
src
=
reader
.
result
;
detect_face
();
};
};
</script>
...
...
Please
register
or
login
to post a comment