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
f4e5d777
Commit
f4e5d777
authored
Mar 16, 2018
by
Tomoaki Teshima
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
follow histogram
parent
6c253510
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
3 deletions
+24
-3
reductions.cpp
modules/cudaarithm/src/reductions.cpp
+6
-2
histogram.cpp
modules/cudaimgproc/src/histogram.cpp
+1
-1
test_histogram.cpp
modules/cudaimgproc/test/test_histogram.cpp
+17
-0
No files found.
modules/cudaarithm/src/reductions.cpp
View file @
f4e5d777
...
...
@@ -137,11 +137,12 @@ void cv::cuda::meanStdDev(InputArray _src, OutputArray _dst, Stream& stream)
if
(
!
deviceSupports
(
FEATURE_SET_COMPUTE_13
))
CV_Error
(
cv
::
Error
::
StsNotImplemented
,
"Not sufficient compute capebility"
);
const
GpuMat
src
=
getInputMat
(
_src
,
stream
);
GpuMat
src
=
getInputMat
(
_src
,
stream
);
CV_Assert
(
src
.
type
()
==
CV_8UC1
);
GpuMat
dst
=
getOutputMat
(
_dst
,
1
,
2
,
CV_64FC1
,
stream
);
_dst
.
create
(
1
,
2
,
CV_64FC1
);
GpuMat
dst
=
_dst
.
getGpuMat
();
NppiSize
sz
;
sz
.
width
=
src
.
cols
;
...
...
@@ -157,6 +158,9 @@ void cv::cuda::meanStdDev(InputArray _src, OutputArray _dst, Stream& stream)
BufferPool
pool
(
stream
);
GpuMat
buf
=
pool
.
getBuffer
(
1
,
bufSize
,
CV_8UC1
);
// detail: https://github.com/opencv/opencv/issues/11063
//NppStreamHandler h(StreamAccessor::getStream(stream));
nppSafeCall
(
nppiMean_StdDev_8u_C1R
(
src
.
ptr
<
Npp8u
>
(),
static_cast
<
int
>
(
src
.
step
),
sz
,
buf
.
ptr
<
Npp8u
>
(),
dst
.
ptr
<
Npp64f
>
(),
dst
.
ptr
<
Npp64f
>
()
+
1
)
);
syncOutput
(
dst
,
_dst
,
stream
);
...
...
modules/cudaimgproc/src/histogram.cpp
View file @
f4e5d777
...
...
@@ -107,7 +107,7 @@ namespace hist
void
cv
::
cuda
::
equalizeHist
(
InputArray
_src
,
OutputArray
_dst
,
Stream
&
_stream
)
{
GpuMat
src
=
_src
.
getGpuMat
(
);
GpuMat
src
=
getInputMat
(
_src
,
_stream
);
CV_Assert
(
src
.
type
()
==
CV_8UC1
);
...
...
modules/cudaimgproc/test/test_histogram.cpp
View file @
f4e5d777
...
...
@@ -194,6 +194,23 @@ PARAM_TEST_CASE(EqualizeHist, cv::cuda::DeviceInfo, cv::Size)
}
};
CUDA_TEST_P
(
EqualizeHist
,
Async
)
{
cv
::
Mat
src
=
randomMat
(
size
,
CV_8UC1
);
cv
::
cuda
::
Stream
stream
;
cv
::
cuda
::
GpuMat
dst
;
cv
::
cuda
::
equalizeHist
(
loadMat
(
src
),
dst
,
stream
);
stream
.
waitForCompletion
();
cv
::
Mat
dst_gold
;
cv
::
equalizeHist
(
src
,
dst_gold
);
EXPECT_MAT_NEAR
(
dst_gold
,
dst
,
3.0
);
}
CUDA_TEST_P
(
EqualizeHist
,
Accuracy
)
{
cv
::
Mat
src
=
randomMat
(
size
,
CV_8UC1
);
...
...
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