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
d08ebfe4
Commit
d08ebfe4
authored
Apr 09, 2013
by
Vladislav Vinogradov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moved rectStdDev to gpuarithm
parent
ca474de6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
36 deletions
+36
-36
gpu.hpp
modules/gpu/include/opencv2/gpu.hpp
+0
-5
imgproc.cpp
modules/gpu/src/imgproc.cpp
+0
-31
gpuarithm.hpp
modules/gpuarithm/include/opencv2/gpuarithm.hpp
+5
-0
matrix_reductions.cpp
modules/gpuarithm/src/matrix_reductions.cpp
+31
-0
No files found.
modules/gpu/include/opencv2/gpu.hpp
View file @
d08ebfe4
...
...
@@ -184,11 +184,6 @@ CV_EXPORTS void integralBuffered(const GpuMat& src, GpuMat& sum, GpuMat& buffer,
//! supports source images of 8UC1 type only
CV_EXPORTS
void
sqrIntegral
(
const
GpuMat
&
src
,
GpuMat
&
sqsum
,
Stream
&
stream
=
Stream
::
Null
());
//! computes the standard deviation of integral images
//! supports only CV_32SC1 source type and CV_32FC1 sqr type
//! 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
());
//! computes Harris cornerness criteria at each image pixel
CV_EXPORTS
void
cornerHarris
(
const
GpuMat
&
src
,
GpuMat
&
dst
,
int
blockSize
,
int
ksize
,
double
k
,
int
borderType
=
BORDER_REFLECT101
);
CV_EXPORTS
void
cornerHarris
(
const
GpuMat
&
src
,
GpuMat
&
dst
,
GpuMat
&
Dx
,
GpuMat
&
Dy
,
int
blockSize
,
int
ksize
,
double
k
,
int
borderType
=
BORDER_REFLECT101
);
...
...
modules/gpu/src/imgproc.cpp
View file @
d08ebfe4
...
...
@@ -59,7 +59,6 @@ void cv::gpu::rotate(const GpuMat&, GpuMat&, Size, double, double, double, int,
void
cv
::
gpu
::
integral
(
const
GpuMat
&
,
GpuMat
&
,
Stream
&
)
{
throw_no_cuda
();
}
void
cv
::
gpu
::
integralBuffered
(
const
GpuMat
&
,
GpuMat
&
,
GpuMat
&
,
Stream
&
)
{
throw_no_cuda
();
}
void
cv
::
gpu
::
sqrIntegral
(
const
GpuMat
&
,
GpuMat
&
,
Stream
&
)
{
throw_no_cuda
();
}
void
cv
::
gpu
::
rectStdDev
(
const
GpuMat
&
,
const
GpuMat
&
,
GpuMat
&
,
const
Rect
&
,
Stream
&
)
{
throw_no_cuda
();
}
void
cv
::
gpu
::
evenLevels
(
GpuMat
&
,
int
,
int
,
int
)
{
throw_no_cuda
();
}
void
cv
::
gpu
::
histEven
(
const
GpuMat
&
,
GpuMat
&
,
int
,
int
,
int
,
Stream
&
)
{
throw_no_cuda
();
}
void
cv
::
gpu
::
histEven
(
const
GpuMat
&
,
GpuMat
&
,
GpuMat
&
,
int
,
int
,
int
,
Stream
&
)
{
throw_no_cuda
();
}
...
...
@@ -628,36 +627,6 @@ void cv::gpu::sqrIntegral(const GpuMat& src, GpuMat& sqsum, Stream& s)
cudaSafeCall
(
cudaDeviceSynchronize
()
);
}
//////////////////////////////////////////////////////////////////////////////
// rectStdDev
void
cv
::
gpu
::
rectStdDev
(
const
GpuMat
&
src
,
const
GpuMat
&
sqr
,
GpuMat
&
dst
,
const
Rect
&
rect
,
Stream
&
s
)
{
CV_Assert
(
src
.
type
()
==
CV_32SC1
&&
sqr
.
type
()
==
CV_64FC1
);
dst
.
create
(
src
.
size
(),
CV_32FC1
);
NppiSize
sz
;
sz
.
width
=
src
.
cols
;
sz
.
height
=
src
.
rows
;
NppiRect
nppRect
;
nppRect
.
height
=
rect
.
height
;
nppRect
.
width
=
rect
.
width
;
nppRect
.
x
=
rect
.
x
;
nppRect
.
y
=
rect
.
y
;
cudaStream_t
stream
=
StreamAccessor
::
getStream
(
s
);
NppStreamHandler
h
(
stream
);
nppSafeCall
(
nppiRectStdDev_32s32f_C1R
(
src
.
ptr
<
Npp32s
>
(),
static_cast
<
int
>
(
src
.
step
),
sqr
.
ptr
<
Npp64f
>
(),
static_cast
<
int
>
(
sqr
.
step
),
dst
.
ptr
<
Npp32f
>
(),
static_cast
<
int
>
(
dst
.
step
),
sz
,
nppRect
)
);
if
(
stream
==
0
)
cudaSafeCall
(
cudaDeviceSynchronize
()
);
}
////////////////////////////////////////////////////////////////////////
// Histogram
...
...
modules/gpuarithm/include/opencv2/gpuarithm.hpp
View file @
d08ebfe4
...
...
@@ -274,6 +274,11 @@ CV_EXPORTS void reduce(const GpuMat& mtx, GpuMat& vec, int dim, int reduceOp, in
//! applies fixed threshold to the image
CV_EXPORTS
double
threshold
(
const
GpuMat
&
src
,
GpuMat
&
dst
,
double
thresh
,
double
maxval
,
int
type
,
Stream
&
stream
=
Stream
::
Null
());
//! computes the standard deviation of integral images
//! supports only CV_32SC1 source type and CV_32FC1 sqr type
//! 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
());
}}
// namespace cv { namespace gpu {
#endif
/* __OPENCV_GPUARITHM_HPP__ */
modules/gpuarithm/src/matrix_reductions.cpp
View file @
d08ebfe4
...
...
@@ -69,6 +69,7 @@ void cv::gpu::minMaxLoc(const GpuMat&, double*, double*, Point*, Point*, const G
int
cv
::
gpu
::
countNonZero
(
const
GpuMat
&
)
{
throw_no_cuda
();
return
0
;
}
int
cv
::
gpu
::
countNonZero
(
const
GpuMat
&
,
GpuMat
&
)
{
throw_no_cuda
();
return
0
;
}
void
cv
::
gpu
::
reduce
(
const
GpuMat
&
,
GpuMat
&
,
int
,
int
,
int
,
Stream
&
)
{
throw_no_cuda
();
}
void
cv
::
gpu
::
rectStdDev
(
const
GpuMat
&
,
const
GpuMat
&
,
GpuMat
&
,
const
Rect
&
,
Stream
&
)
{
throw_no_cuda
();
}
#else
...
...
@@ -696,4 +697,34 @@ void cv::gpu::reduce(const GpuMat& src, GpuMat& dst, int dim, int reduceOp, int
}
}
//////////////////////////////////////////////////////////////////////////////
// rectStdDev
void
cv
::
gpu
::
rectStdDev
(
const
GpuMat
&
src
,
const
GpuMat
&
sqr
,
GpuMat
&
dst
,
const
Rect
&
rect
,
Stream
&
s
)
{
CV_Assert
(
src
.
type
()
==
CV_32SC1
&&
sqr
.
type
()
==
CV_64FC1
);
dst
.
create
(
src
.
size
(),
CV_32FC1
);
NppiSize
sz
;
sz
.
width
=
src
.
cols
;
sz
.
height
=
src
.
rows
;
NppiRect
nppRect
;
nppRect
.
height
=
rect
.
height
;
nppRect
.
width
=
rect
.
width
;
nppRect
.
x
=
rect
.
x
;
nppRect
.
y
=
rect
.
y
;
cudaStream_t
stream
=
StreamAccessor
::
getStream
(
s
);
NppStreamHandler
h
(
stream
);
nppSafeCall
(
nppiRectStdDev_32s32f_C1R
(
src
.
ptr
<
Npp32s
>
(),
static_cast
<
int
>
(
src
.
step
),
sqr
.
ptr
<
Npp64f
>
(),
static_cast
<
int
>
(
sqr
.
step
),
dst
.
ptr
<
Npp32f
>
(),
static_cast
<
int
>
(
dst
.
step
),
sz
,
nppRect
)
);
if
(
stream
==
0
)
cudaSafeCall
(
cudaDeviceSynchronize
()
);
}
#endif
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