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
020624c4
Commit
020624c4
authored
Aug 26, 2013
by
Vladislav Vinogradov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
used new device layer for cv::gpu::minMaxLoc
parent
e1aa2fd0
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
50 deletions
+0
-50
minmaxloc.cu
modules/cudaarithm/src/cuda/minmaxloc.cu
+0
-0
reductions.cpp
modules/cudaarithm/src/reductions.cpp
+0
-50
No files found.
modules/cudaarithm/src/cuda/minmaxloc.cu
View file @
020624c4
This diff is collapsed.
Click to expand it.
modules/cudaarithm/src/reductions.cpp
View file @
020624c4
...
...
@@ -186,56 +186,6 @@ double cv::cuda::norm(InputArray _src1, InputArray _src2, GpuMat& buf, int normT
return
retVal
;
}
////////////////////////////////////////////////////////////////////////
// minMaxLoc
namespace
minMaxLoc
{
void
getBufSize
(
int
cols
,
int
rows
,
size_t
elem_size
,
int
&
b1cols
,
int
&
b1rows
,
int
&
b2cols
,
int
&
b2rows
);
template
<
typename
T
>
void
run
(
const
PtrStepSzb
src
,
const
PtrStepb
mask
,
double
*
minval
,
double
*
maxval
,
int
*
minloc
,
int
*
maxloc
,
PtrStepb
valbuf
,
PtrStep
<
unsigned
int
>
locbuf
);
}
void
cv
::
cuda
::
minMaxLoc
(
InputArray
_src
,
double
*
minVal
,
double
*
maxVal
,
Point
*
minLoc
,
Point
*
maxLoc
,
InputArray
_mask
,
GpuMat
&
valBuf
,
GpuMat
&
locBuf
)
{
GpuMat
src
=
_src
.
getGpuMat
();
GpuMat
mask
=
_mask
.
getGpuMat
();
typedef
void
(
*
func_t
)(
const
PtrStepSzb
src
,
const
PtrStepb
mask
,
double
*
minval
,
double
*
maxval
,
int
*
minloc
,
int
*
maxloc
,
PtrStepb
valbuf
,
PtrStep
<
unsigned
int
>
locbuf
);
static
const
func_t
funcs
[]
=
{
::
minMaxLoc
::
run
<
uchar
>
,
::
minMaxLoc
::
run
<
schar
>
,
::
minMaxLoc
::
run
<
ushort
>
,
::
minMaxLoc
::
run
<
short
>
,
::
minMaxLoc
::
run
<
int
>
,
::
minMaxLoc
::
run
<
float
>
,
::
minMaxLoc
::
run
<
double
>
};
CV_Assert
(
src
.
channels
()
==
1
);
CV_Assert
(
mask
.
empty
()
||
(
mask
.
size
()
==
src
.
size
()
&&
mask
.
type
()
==
CV_8U
)
);
if
(
src
.
depth
()
==
CV_64F
)
{
if
(
!
deviceSupports
(
NATIVE_DOUBLE
))
CV_Error
(
cv
::
Error
::
StsUnsupportedFormat
,
"The device doesn't support double"
);
}
Size
valbuf_size
,
locbuf_size
;
::
minMaxLoc
::
getBufSize
(
src
.
cols
,
src
.
rows
,
src
.
elemSize
(),
valbuf_size
.
width
,
valbuf_size
.
height
,
locbuf_size
.
width
,
locbuf_size
.
height
);
ensureSizeIsEnough
(
valbuf_size
,
CV_8U
,
valBuf
);
ensureSizeIsEnough
(
locbuf_size
,
CV_8U
,
locBuf
);
const
func_t
func
=
funcs
[
src
.
depth
()];
double
temp1
,
temp2
;
Point
temp3
,
temp4
;
func
(
src
,
mask
,
minVal
?
minVal
:
&
temp1
,
maxVal
?
maxVal
:
&
temp2
,
minLoc
?
&
minLoc
->
x
:
&
temp3
.
x
,
maxLoc
?
&
maxLoc
->
x
:
&
temp4
.
x
,
valBuf
,
locBuf
);
}
//////////////////////////////////////////////////////////////////////////////
// countNonZero
...
...
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