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
202e239c
Commit
202e239c
authored
Feb 14, 2011
by
Alexey Spizhevoy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed GPU minMaxLoc test, updated docs
parent
d7e612cd
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
2 deletions
+10
-2
gpu_matrix_reductions.tex
doc/gpu_matrix_reductions.tex
+2
-2
opencv.pdf
doc/opencv.pdf
+0
-0
arithm.cpp
tests/gpu/src/arithm.cpp
+8
-0
No files found.
doc/gpu_matrix_reductions.tex
View file @
202e239c
...
...
@@ -89,7 +89,7 @@ void minMax(const GpuMat\& src, double* minVal, double* maxVal,\par
\cvarg
{
src
}{
Single-channel source image.
}
\cvarg
{
minVal
}{
Pointer to returned minimum value.
\texttt
{
NULL
}
if not required.
}
\cvarg
{
maxVal
}{
Pointer to returned maximum value.
\texttt
{
NULL
}
if not required.
}
\cvarg
{
mask
}{
Optional mask to select a sub-matrix.
}
\cvarg
{
mask
}{
Optional mask to select a sub-matrix.
Please note the result is undefined in the case of empty mask.
}
\cvarg
{
buf
}{
Optional buffer to avoid extra memory allocations. It's resized automatically.
}
\end{description}
...
...
@@ -112,7 +112,7 @@ void minMaxLoc(const GpuMat\& src, double* minVal, double* maxVal,\par
\cvarg
{
maxVal
}{
Pointer to returned maximum value.
\texttt
{
NULL
}
if not required.
}
\cvarg
{
minValLoc
}{
Pointer to returned minimum location.
\texttt
{
NULL
}
if not required.
}
\cvarg
{
maxValLoc
}{
Pointer to returned maximum location.
\texttt
{
NULL
}
if not required.
}
\cvarg
{
mask
}{
Optional mask to select a sub-matrix.
}
\cvarg
{
mask
}{
Optional mask to select a sub-matrix.
Please note the result is undefined in the case of empty mask.
}
\cvarg
{
valbuf
}{
Optional values buffer to avoid extra memory allocations. It's resized automatically.
}
\cvarg
{
locbuf
}{
Optional locations buffer to avoid extra memory allocations. It's resized automatically.
}
\end{description}
...
...
doc/opencv.pdf
View file @
202e239c
This diff is collapsed.
Click to expand it.
tests/gpu/src/arithm.cpp
View file @
202e239c
...
...
@@ -829,6 +829,10 @@ struct CV_GpuMinMaxLocTest: public CvTest
cv
::
Mat
mask
(
src
.
size
(),
CV_8U
);
rng
.
fill
(
mask
,
RNG
::
UNIFORM
,
Scalar
(
0
),
Scalar
(
2
));
// At least one of mask elements must be non zero as OpenCV returns 0
// in such case, our implementation returns max value
mask
.
at
<
unsigned
char
>
(
0
,
0
)
=
1
;
double
minVal
,
maxVal
;
cv
::
Point
minLoc
,
maxLoc
;
...
...
@@ -855,6 +859,10 @@ struct CV_GpuMinMaxLocTest: public CvTest
cv
::
Point
minLoc_
,
maxLoc_
;
cv
::
gpu
::
minMaxLoc
(
cv
::
gpu
::
GpuMat
(
src
),
&
minVal_
,
&
maxVal_
,
&
minLoc_
,
&
maxLoc_
,
cv
::
gpu
::
GpuMat
(
mask
),
valbuf
,
locbuf
);
cout
<<
rows
<<
" "
<<
cols
<<
" "
<<
depth
<<
endl
;
cout
<<
minVal
<<
" "
<<
minVal_
<<
endl
;
cout
<<
maxVal
<<
" "
<<
maxVal_
<<
endl
;
CHECK
(
minVal
==
minVal_
,
CvTS
::
FAIL_INVALID_OUTPUT
);
CHECK
(
maxVal
==
maxVal_
,
CvTS
::
FAIL_INVALID_OUTPUT
);
CHECK
(
0
==
memcmp
(
src
.
ptr
(
minLoc
.
y
)
+
minLoc
.
x
*
src
.
elemSize
(),
src
.
ptr
(
minLoc_
.
y
)
+
minLoc_
.
x
*
src
.
elemSize
(),
src
.
elemSize
()),
...
...
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