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
b4fd3e86
Commit
b4fd3e86
authored
Sep 17, 2018
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #12563 from cv3d:bug/cuda_msseg
parents
43f889ae
ecc9bd09
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
0 deletions
+24
-0
copy.cpp
modules/core/src/copy.cpp
+8
-0
matrix_wrap.cpp
modules/core/src/matrix_wrap.cpp
+8
-0
umatrix.cpp
modules/core/src/umatrix.cpp
+8
-0
No files found.
modules/core/src/copy.cpp
View file @
b4fd3e86
...
@@ -238,6 +238,14 @@ void Mat::copyTo( OutputArray _dst ) const
...
@@ -238,6 +238,14 @@ void Mat::copyTo( OutputArray _dst ) const
{
{
CV_INSTRUMENT_REGION
();
CV_INSTRUMENT_REGION
();
#ifdef HAVE_CUDA
if
(
_dst
.
isGpuMat
())
{
_dst
.
getGpuMat
().
upload
(
*
this
);
return
;
}
#endif
int
dtype
=
_dst
.
type
();
int
dtype
=
_dst
.
type
();
if
(
_dst
.
fixedType
()
&&
dtype
!=
type
()
)
if
(
_dst
.
fixedType
()
&&
dtype
!=
type
()
)
{
{
...
...
modules/core/src/matrix_wrap.cpp
View file @
b4fd3e86
...
@@ -1146,6 +1146,10 @@ void _InputArray::copyTo(const _OutputArray& arr) const
...
@@ -1146,6 +1146,10 @@ void _InputArray::copyTo(const _OutputArray& arr) const
}
}
else
if
(
k
==
UMAT
)
else
if
(
k
==
UMAT
)
((
UMat
*
)
obj
)
->
copyTo
(
arr
);
((
UMat
*
)
obj
)
->
copyTo
(
arr
);
#ifdef HAVE_CUDA
else
if
(
k
==
CUDA_GPU_MAT
)
((
cuda
::
GpuMat
*
)
obj
)
->
copyTo
(
arr
);
#endif
else
else
CV_Error
(
Error
::
StsNotImplemented
,
""
);
CV_Error
(
Error
::
StsNotImplemented
,
""
);
}
}
...
@@ -1163,6 +1167,10 @@ void _InputArray::copyTo(const _OutputArray& arr, const _InputArray & mask) cons
...
@@ -1163,6 +1167,10 @@ void _InputArray::copyTo(const _OutputArray& arr, const _InputArray & mask) cons
}
}
else
if
(
k
==
UMAT
)
else
if
(
k
==
UMAT
)
((
UMat
*
)
obj
)
->
copyTo
(
arr
,
mask
);
((
UMat
*
)
obj
)
->
copyTo
(
arr
,
mask
);
#ifdef HAVE_CUDA
else
if
(
k
==
CUDA_GPU_MAT
)
((
cuda
::
GpuMat
*
)
obj
)
->
copyTo
(
arr
,
mask
);
#endif
else
else
CV_Error
(
Error
::
StsNotImplemented
,
""
);
CV_Error
(
Error
::
StsNotImplemented
,
""
);
}
}
...
...
modules/core/src/umatrix.cpp
View file @
b4fd3e86
...
@@ -874,6 +874,14 @@ void UMat::copyTo(OutputArray _dst) const
...
@@ -874,6 +874,14 @@ void UMat::copyTo(OutputArray _dst) const
{
{
CV_INSTRUMENT_REGION
();
CV_INSTRUMENT_REGION
();
#ifdef HAVE_CUDA
if
(
_dst
.
isGpuMat
())
{
_dst
.
getGpuMat
().
upload
(
*
this
);
return
;
}
#endif
int
dtype
=
_dst
.
type
();
int
dtype
=
_dst
.
type
();
if
(
_dst
.
fixedType
()
&&
dtype
!=
type
()
)
if
(
_dst
.
fixedType
()
&&
dtype
!=
type
()
)
{
{
...
...
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