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
c52d5696
Commit
c52d5696
authored
Apr 25, 2013
by
Vladislav Vinogradov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
switched to Input/Output Array in gpu::copyMakeBorder
parent
539f367d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
10 deletions
+13
-10
gpuarithm.hpp
modules/gpuarithm/include/opencv2/gpuarithm.hpp
+4
-4
core.cpp
modules/gpuarithm/src/core.cpp
+9
-6
No files found.
modules/gpuarithm/include/opencv2/gpuarithm.hpp
View file @
c52d5696
...
...
@@ -205,6 +205,10 @@ inline void LUT(InputArray src, InputArray lut, OutputArray dst, Stream& stream)
createLookUpTable
(
lut
)
->
transform
(
src
,
dst
,
stream
);
}
//! copies 2D array to a larger destination array and pads borders with user-specifiable constant
CV_EXPORTS
void
copyMakeBorder
(
InputArray
src
,
OutputArray
dst
,
int
top
,
int
bottom
,
int
left
,
int
right
,
int
borderType
,
Scalar
value
=
Scalar
(),
Stream
&
stream
=
Stream
::
Null
());
//! implements generalized matrix product algorithm GEMM from BLAS
CV_EXPORTS
void
gemm
(
const
GpuMat
&
src1
,
const
GpuMat
&
src2
,
double
alpha
,
const
GpuMat
&
src3
,
double
beta
,
GpuMat
&
dst
,
int
flags
=
0
,
Stream
&
stream
=
Stream
::
Null
());
...
...
@@ -273,10 +277,6 @@ CV_EXPORTS void meanStdDev(const GpuMat& mtx, Scalar& mean, Scalar& stddev, GpuM
//! output will have CV_32FC1 type
CV_EXPORTS
void
rectStdDev
(
const
GpuMat
&
src
,
const
GpuMat
&
sqr
,
GpuMat
&
dst
,
const
Rect
&
rect
,
Stream
&
stream
=
Stream
::
Null
());
//! copies 2D array to a larger destination array and pads borders with user-specifiable constant
CV_EXPORTS
void
copyMakeBorder
(
const
GpuMat
&
src
,
GpuMat
&
dst
,
int
top
,
int
bottom
,
int
left
,
int
right
,
int
borderType
,
const
Scalar
&
value
=
Scalar
(),
Stream
&
stream
=
Stream
::
Null
());
//! computes the integral image
//! sum will have CV_32S type, but will contain unsigned int values
//! supports only CV_8UC1 source type
...
...
modules/gpuarithm/src/core.cpp
View file @
c52d5696
...
...
@@ -59,7 +59,7 @@ void cv::gpu::flip(InputArray, OutputArray, int, Stream&) { throw_no_cuda(); }
Ptr
<
LookUpTable
>
cv
::
gpu
::
createLookUpTable
(
InputArray
)
{
throw_no_cuda
();
return
Ptr
<
LookUpTable
>
();
}
void
cv
::
gpu
::
copyMakeBorder
(
const
GpuMat
&
,
GpuMat
&
,
int
,
int
,
int
,
int
,
int
,
const
Scalar
&
,
Stream
&
)
{
throw_no_cuda
();
}
void
cv
::
gpu
::
copyMakeBorder
(
InputArray
,
OutputArray
,
int
,
int
,
int
,
int
,
int
,
Scalar
,
Stream
&
)
{
throw_no_cuda
();
}
#else
/* !defined (HAVE_CUDA) */
...
...
@@ -529,14 +529,17 @@ typedef Npp32s __attribute__((__may_alias__)) Npp32s_a;
typedef
Npp32s
Npp32s_a
;
#endif
void
cv
::
gpu
::
copyMakeBorder
(
const
GpuMat
&
src
,
GpuMat
&
dst
,
int
top
,
int
bottom
,
int
left
,
int
right
,
int
borderType
,
const
Scalar
&
value
,
Stream
&
s
)
void
cv
::
gpu
::
copyMakeBorder
(
InputArray
_src
,
OutputArray
_dst
,
int
top
,
int
bottom
,
int
left
,
int
right
,
int
borderType
,
Scalar
value
,
Stream
&
_stream
)
{
CV_Assert
(
src
.
depth
()
<=
CV_32F
&&
src
.
channels
()
<=
4
);
CV_Assert
(
borderType
==
BORDER_REFLECT_101
||
borderType
==
BORDER_REPLICATE
||
borderType
==
BORDER_CONSTANT
||
borderType
==
BORDER_REFLECT
||
borderType
==
BORDER_WRAP
);
GpuMat
src
=
_src
.
getGpuMat
();
CV_Assert
(
src
.
depth
()
<=
CV_32F
&&
src
.
channels
()
<=
4
);
CV_Assert
(
borderType
==
BORDER_REFLECT_101
||
borderType
==
BORDER_REPLICATE
||
borderType
==
BORDER_CONSTANT
||
borderType
==
BORDER_REFLECT
||
borderType
==
BORDER_WRAP
);
dst
.
create
(
src
.
rows
+
top
+
bottom
,
src
.
cols
+
left
+
right
,
src
.
type
());
_dst
.
create
(
src
.
rows
+
top
+
bottom
,
src
.
cols
+
left
+
right
,
src
.
type
());
GpuMat
dst
=
_dst
.
getGpuMat
();
cudaStream_t
stream
=
StreamAccessor
::
getStream
(
s
);
cudaStream_t
stream
=
StreamAccessor
::
getStream
(
_stream
);
if
(
borderType
==
BORDER_CONSTANT
&&
(
src
.
type
()
==
CV_8UC1
||
src
.
type
()
==
CV_8UC4
||
src
.
type
()
==
CV_32SC1
||
src
.
type
()
==
CV_32FC1
))
{
...
...
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