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-26 15:26:12 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
18d9eaa274d92106ff480fe603fcc2de7f103bc1
18d9eaa2
1 parent
20170ff0
Update cropping logic
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
flask/templates/index.html
flask/templates/register.html
flask/templates/index.html
View file @
18d9eaa
...
...
@@ -127,7 +127,7 @@ function processVideo() {
let
point2
=
new
cv
.
Point
(
face
.
x
+
face
.
width
,
face
.
y
+
face
.
height
);
cv
.
rectangle
(
dst
,
point1
,
point2
,
[
255
,
0
,
0
,
255
],
8
);
let
cropped
=
new
cv
.
Mat
();
let
rect
=
new
cv
.
Rect
(
face
.
x
,
face
.
y
,
face
.
width
,
face
.
height
);
let
rect
=
new
cv
.
Rect
(
Math
.
max
(
face
.
x
-
face
.
width
/
4
,
0
),
Math
.
max
(
face
.
y
-
face
.
height
/
2
,
0
),
Math
.
min
(
face
.
width
+
face
.
width
/
2
,
src
.
cols
),
Math
.
min
(
face
.
height
*
2
,
src
.
rows
)
);
cropped
=
src
.
roi
(
rect
);
let
tempCanvas
=
document
.
createElement
(
"canvas"
);
cv
.
imshow
(
tempCanvas
,
cropped
);
...
...
flask/templates/register.html
View file @
18d9eaa
...
...
@@ -61,9 +61,9 @@ function detect_face()
let
point1
=
new
cv
.
Point
(
face
.
x
,
face
.
y
);
let
point2
=
new
cv
.
Point
(
face
.
x
+
face
.
width
,
face
.
y
+
face
.
height
);
cv
.
rectangle
(
dst
,
point1
,
point2
,
[
255
,
0
,
0
,
255
],
8
);
let
rect
=
new
cv
.
Rect
(
Math
.
max
(
face
.
x
-
face
.
width
/
4
,
0
),
Math
.
max
(
face
.
y
-
face
.
height
/
2
,
0
),
Math
.
min
(
face
.
width
+
face
.
width
/
2
,
src
.
cols
),
Math
.
min
(
face
.
height
+
face
.
height
/
2
,
src
.
rows
));
let
cropped
=
src
.
roi
(
rect
);
cv
.
imshow
(
tempCanvas
,
cropped
);
let
rect
=
new
cv
.
Rect
(
Math
.
max
(
face
.
x
-
face
.
width
/
4
,
0
),
Math
.
max
(
face
.
y
-
face
.
height
/
2
,
0
),
Math
.
min
(
face
.
width
+
face
.
width
/
2
,
src
.
cols
),
Math
.
min
(
face
.
height
*
2
,
src
.
rows
));
let
cropped
=
src
.
roi
(
rect
);
cv
.
imshow
(
tempCanvas
,
cropped
);
}
if
(
faces
.
size
()
==
1
)
{
...
...
Please
register
or
login
to post a comment