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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Евгений Снитко
face-detection
Commits
39f140c0
Commit
39f140c0
authored
Jun 15, 2017
by
Евгений Снитко
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Int16Array working
parent
5a6c648f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
main.cpp
main.cpp
+5
-5
No files found.
main.cpp
View file @
39f140c0
...
...
@@ -149,14 +149,14 @@ namespace FaceDetection
HandleScope
scope
(
isolate
);
size_t
size
=
(
size_t
)
frame
.
rows
*
3
;
v8
::
Local
<
ArrayBuffer
>
buff
=
v8
::
ArrayBuffer
::
New
(
isolate
,
size
);
v8
::
Local
<
Int
8Array
>
array
=
v8
::
Int8
Array
::
New
(
buff
,
0
,
size
);
v8
::
Local
<
ArrayBuffer
>
buff
=
v8
::
ArrayBuffer
::
New
(
isolate
,
size
*
2
);
v8
::
Local
<
Int
16Array
>
array
=
v8
::
Int16
Array
::
New
(
buff
,
0
,
size
);
for
(
uint32_t
i
=
0
;
i
<
size
;
i
+=
3
)
{
array
->
Set
(
i
+
0
,
Integer
::
New
(
isolate
,
(
shor
t
)
(
frame
.
at
<
float
>
(
i
/
3
,
0
)
*
1000
)));
array
->
Set
(
i
+
1
,
Integer
::
New
(
isolate
,
(
shor
t
)
(
frame
.
at
<
float
>
(
i
/
3
,
1
)
*
1000
)));
array
->
Set
(
i
+
2
,
Integer
::
New
(
isolate
,
(
short
)
((
frame
.
at
<
float
>
(
i
/
3
,
2
)
+
600
)
*
1000
)));
array
->
Set
(
i
+
0
,
Integer
::
New
(
isolate
,
(
int32_
t
)
(
frame
.
at
<
float
>
(
i
/
3
,
0
)
*
1000
)));
array
->
Set
(
i
+
1
,
Integer
::
New
(
isolate
,
(
int32_
t
)
(
frame
.
at
<
float
>
(
i
/
3
,
1
)
*
1000
)));
array
->
Set
(
i
+
2
,
Integer
::
New
(
isolate
,
(
int32_t
)
(
frame
.
at
<
float
>
(
i
/
3
,
2
)
*
1000
)));
}
const
unsigned
argc
=
1
;
...
...
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