Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
face-detection
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Антон Горшенин
face-detection
Commits
4cc3491b
Commit
4cc3491b
authored
Jun 08, 2017
by
Евгений Снитко
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
for motvey
parent
80312550
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
face.cpp
face.cpp
+1
-1
main.cpp
main.cpp
+5
-3
No files found.
face.cpp
View file @
4cc3491b
...
...
@@ -153,7 +153,7 @@ int Loop(string filename)
/////////////////////////////////////////////////////////////////////////////////////////////
facePosition
facePos
;
if
(
trainClock
%
7
==
0
)
if
(
trainClock
%
3
==
0
)
{
cv
::
Mat
frame
(
color_intrin
.
height
,
color_intrin
.
width
,
CV_8UC3
,
(
uchar
*
)
color_image
);
if
(
detectAndDisplay
(
frame
,
facePos
))
...
...
main.cpp
View file @
4cc3491b
...
...
@@ -17,6 +17,7 @@ namespace FaceDetection
using
v8
::
Object
;
using
v8
::
String
;
using
v8
::
Number
;
using
v8
::
Value
;
using
namespace
std
;
...
...
@@ -160,9 +161,9 @@ namespace FaceDetection
for
(
int
i
=
0
;
i
<
frame
.
rows
;
i
++
)
{
Local
<
Array
>
row
=
Array
::
New
(
isolate
);
row
->
Set
(
0
,
Number
::
New
(
isolate
,
frame
.
at
<
float
>
(
i
,
0
)));
row
->
Set
(
1
,
Number
::
New
(
isolate
,
frame
.
at
<
float
>
(
i
,
1
)));
row
->
Set
(
2
,
Number
::
New
(
isolate
,
frame
.
at
<
float
>
(
i
,
2
)));
row
->
Set
(
0
,
Number
::
New
(
isolate
,
(
int
)(
frame
.
at
<
float
>
(
i
,
0
)
*
100
0
)));
row
->
Set
(
1
,
Number
::
New
(
isolate
,
(
int
)(
frame
.
at
<
float
>
(
i
,
1
)
*
1000
)));
row
->
Set
(
2
,
Number
::
New
(
isolate
,
(
int
)(
frame
.
at
<
float
>
(
i
,
2
)
*
1000
)));
myArray
->
Set
(
i
,
row
);
}
...
...
@@ -173,6 +174,7 @@ namespace FaceDetection
});
uv_thread_create
(
&
texample_thread
,
[](
void
*
){
faceDetector
->
Start
([](
cv
::
Mat
mat
){
((
faceRequest
*
)
faceCheckAsyncToken
.
data
)
->
frame
=
mat
;
printf
(
"lol, callback
\n
"
);
uv_async_send
(
&
faceCheckAsyncToken
);
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment