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-23 13:53:43 +0000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
1330da5f5fb4c0864bce8797b870263a3b0d78f3
1330da5f
1 parent
04f7e7c8
Update face detection module
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
flask/templates/index.html
flask/templates/index.html
View file @
1330da5
...
...
@@ -22,9 +22,18 @@
background-color
:
#666
;
}
</style>
<script
type=
'text/javascript'
src=
"{{url_for('static', filename='js/opencv.js')}}"
></script>
<script
type=
'text/javascript'
src=
"{{url_for('static', filename='js/utils.js')}}"
></script>
<script
type=
'text/javascript'
>
let
utils
=
new
Utils
(
'errorMessage'
);
utils
.
loadOpenCv
(()
=>
{
let
faceCascadeFile
=
'/static/js/haarcascade_frontalface_default.xml'
;
utils
.
createFileFromUrl
(
faceCascadeFile
,
faceCascadeFile
,
()
=>
{
alert
(
faceCascadeFile
);
});
});
function
main
()
{
let
video
=
document
.
getElementById
(
"videoInput"
);
...
...
@@ -47,12 +56,8 @@ let faces = new cv.RectVector();
let
classifier
=
new
cv
.
CascadeClassifier
();
var
streaming
=
true
;
let
utils
=
new
Utils
(
'errorMessage'
);
//use utils class
let
faceCascadeFile
=
"/static/js/haarcascade_frontalface_default.xml"
utils
.
createFileFromUrl
(
faceCascadeFile
,
faceCascadeFile
,
()
=>
{
alert
(
faceCascadeFile
);
classifier
.
load
(
faceCascadeFile
);
});
classifier
.
load
(
'static/js/haarcascade_frontalface_default.xml'
);
const
FPS
=
30
;
function
processVideo
()
{
try
{
...
...
Please
register
or
login
to post a comment