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
b3af0e31
Commit
b3af0e31
authored
Dec 19, 2013
by
Ilya Lavrenov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added cv::repeat to T-API
parent
2431c72d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
5 deletions
+26
-5
copy.cpp
modules/core/src/copy.cpp
+26
-5
No files found.
modules/core/src/copy.cpp
View file @
b3af0e31
...
...
@@ -544,15 +544,36 @@ void flip( InputArray _src, OutputArray _dst, int flip_mode )
}
static
bool
ocl_repeat
(
InputArray
_src
,
int
ny
,
int
nx
,
OutputArray
_dst
)
{
UMat
src
=
_src
.
getUMat
(),
dst
=
_dst
.
getUMat
();
for
(
int
y
=
0
;
y
<
ny
;
++
y
)
for
(
int
x
=
0
;
x
<
nx
;
++
x
)
{
Rect
roi
(
x
*
src
.
cols
,
y
*
src
.
rows
,
src
.
cols
,
src
.
rows
);
UMat
hdr
(
dst
,
roi
);
src
.
copyTo
(
hdr
);
}
return
true
;
}
void
repeat
(
InputArray
_src
,
int
ny
,
int
nx
,
OutputArray
_dst
)
{
Mat
src
=
_src
.
getMat
();
CV_Assert
(
src
.
dims
<=
2
);
CV_Assert
(
_src
.
dims
()
<=
2
);
CV_Assert
(
ny
>
0
&&
nx
>
0
);
_dst
.
create
(
src
.
rows
*
ny
,
src
.
cols
*
nx
,
src
.
type
());
Mat
dst
=
_dst
.
getMat
();
Size
ssize
=
src
.
size
(),
dsize
=
dst
.
size
();
Size
ssize
=
_src
.
size
();
_dst
.
create
(
ssize
.
height
*
ny
,
ssize
.
width
*
nx
,
_src
.
type
());
if
(
ocl
::
useOpenCL
()
&&
_src
.
isUMat
())
{
CV_Assert
(
ocl_repeat
(
_src
,
ny
,
nx
,
_dst
));
return
;
}
Mat
src
=
_src
.
getMat
(),
dst
=
_dst
.
getMat
();
Size
dsize
=
dst
.
size
();
int
esz
=
(
int
)
src
.
elemSize
();
int
x
,
y
;
ssize
.
width
*=
esz
;
dsize
.
width
*=
esz
;
...
...
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