Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
2c63d2bd
Commit
2c63d2bd
authored
Nov 17, 2016
by
Rostislav Vasilikhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed image creation from handle
parent
e8d2aad9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
16 deletions
+6
-16
wrappers.cpp
samples/openvx/wrappers.cpp
+3
-8
wrappers_video.cpp
samples/openvx/wrappers_video.cpp
+3
-8
No files found.
samples/openvx/wrappers.cpp
View file @
2c63d2bd
...
...
@@ -82,10 +82,7 @@ int ovxDemo(std::string inputPath, UserMemoryMode mode)
}
else
{
vx_imagepatch_addressing_t
addressing
=
Image
::
createAddressing
(
image
);
const
std
::
vector
<
vx_imagepatch_addressing_t
>
addrs
(
1
,
addressing
);
const
std
::
vector
<
void
*>
ptrs
(
1
,
image
.
data
);
ivxImage
=
Image
::
createFromHandle
(
context
,
color
,
addrs
,
ptrs
);
ivxImage
=
Image
::
createFromHandle
(
context
,
color
,
Image
::
createAddressing
(
image
),
image
.
data
);
}
Image
ivxResult
;
...
...
@@ -100,10 +97,8 @@ int ovxDemo(std::string inputPath, UserMemoryMode mode)
{
//create vx_image based on user data, no copying required
output
=
cv
::
Mat
(
height
,
width
,
CV_8U
,
cv
::
Scalar
(
0
));
vx_imagepatch_addressing_t
addressing
=
Image
::
createAddressing
(
output
);
const
std
::
vector
<
vx_imagepatch_addressing_t
>
addrs
(
1
,
addressing
);
const
std
::
vector
<
void
*>
ptrs
(
1
,
output
.
data
);
ivxResult
=
Image
::
createFromHandle
(
context
,
Image
::
matTypeToFormat
(
CV_8U
),
addrs
,
ptrs
);
ivxResult
=
Image
::
createFromHandle
(
context
,
Image
::
matTypeToFormat
(
CV_8U
),
Image
::
createAddressing
(
output
),
output
.
data
);
}
Graph
graph
=
createProcessingGraph
(
ivxImage
,
ivxResult
);
...
...
samples/openvx/wrappers_video.cpp
View file @
2c63d2bd
...
...
@@ -91,10 +91,7 @@ int ovxDemo(std::string inputPath, UserMemoryMode mode)
}
else
{
vx_imagepatch_addressing_t
addressing
=
Image
::
createAddressing
(
frame
);
const
std
::
vector
<
vx_imagepatch_addressing_t
>
addrs
(
1
,
addressing
);
const
std
::
vector
<
void
*>
ptrs
(
1
,
frame
.
data
);
ivxImage
=
Image
::
createFromHandle
(
context
,
color
,
addrs
,
ptrs
);
ivxImage
=
Image
::
createFromHandle
(
context
,
color
,
Image
::
createAddressing
(
frame
),
frame
.
data
);
}
Image
ivxResult
;
...
...
@@ -109,10 +106,8 @@ int ovxDemo(std::string inputPath, UserMemoryMode mode)
{
//create vx_image based on user data, no copying required
output
=
cv
::
Mat
(
height
,
width
,
CV_8U
,
cv
::
Scalar
(
0
));
vx_imagepatch_addressing_t
addressing
=
Image
::
createAddressing
(
output
);
const
std
::
vector
<
vx_imagepatch_addressing_t
>
addrs
(
1
,
addressing
);
const
std
::
vector
<
void
*>
ptrs
(
1
,
output
.
data
);
ivxResult
=
Image
::
createFromHandle
(
context
,
Image
::
matTypeToFormat
(
CV_8U
),
addrs
,
ptrs
);
ivxResult
=
Image
::
createFromHandle
(
context
,
Image
::
matTypeToFormat
(
CV_8U
),
Image
::
createAddressing
(
output
),
output
.
data
);
}
Graph
graph
=
createProcessingGraph
(
ivxImage
,
ivxResult
);
...
...
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