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
f6b451c6
Commit
f6b451c6
authored
Jun 09, 2012
by
Marina Kolpakova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed another piece of warnings
parent
de237347
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
56 deletions
+54
-56
main_test_nvidia.h
modules/gpu/test/main_test_nvidia.h
+25
-0
NCVAutoTestLister.hpp
modules/gpu/test/nvidia/NCVAutoTestLister.hpp
+7
-7
main_nvidia.cpp
modules/gpu/test/nvidia/main_nvidia.cpp
+10
-26
test_nvidia.cpp
modules/gpu/test/test_nvidia.cpp
+12
-23
No files found.
modules/gpu/test/main_test_nvidia.h
0 → 100644
View file @
f6b451c6
#ifndef __main_test_nvidia_h__
#define __main_test_nvidia_h__
#include<string>
enum
OutputLevel
{
OutputLevelNone
,
OutputLevelCompact
,
OutputLevelFull
};
bool
nvidia_NPPST_Integral_Image
(
const
std
::
string
&
test_data_path
,
OutputLevel
outputLevel
);
bool
nvidia_NPPST_Squared_Integral_Image
(
const
std
::
string
&
test_data_path
,
OutputLevel
outputLevel
);
bool
nvidia_NPPST_RectStdDev
(
const
std
::
string
&
test_data_path
,
OutputLevel
outputLevel
);
bool
nvidia_NPPST_Resize
(
const
std
::
string
&
test_data_path
,
OutputLevel
outputLevel
);
bool
nvidia_NPPST_Vector_Operations
(
const
std
::
string
&
test_data_path
,
OutputLevel
outputLevel
);
bool
nvidia_NPPST_Transpose
(
const
std
::
string
&
test_data_path
,
OutputLevel
outputLevel
);
bool
nvidia_NCV_Vector_Operations
(
const
std
::
string
&
test_data_path
,
OutputLevel
outputLevel
);
bool
nvidia_NCV_Haar_Cascade_Loader
(
const
std
::
string
&
test_data_path
,
OutputLevel
outputLevel
);
bool
nvidia_NCV_Haar_Cascade_Application
(
const
std
::
string
&
test_data_path
,
OutputLevel
outputLevel
);
bool
nvidia_NCV_Hypotheses_Filtration
(
const
std
::
string
&
test_data_path
,
OutputLevel
outputLevel
);
bool
nvidia_NCV_Visualization
(
const
std
::
string
&
test_data_path
,
OutputLevel
outputLevel
);
#endif
modules/gpu/test/nvidia/NCVAutoTestLister.hpp
View file @
f6b451c6
...
@@ -14,13 +14,13 @@
...
@@ -14,13 +14,13 @@
#include <vector>
#include <vector>
#include "NCVTest.hpp"
#include "NCVTest.hpp"
#include <main_test_nvidia.h>
enum
OutputLevel
//
enum OutputLevel
{
//
{
OutputLevelNone
,
//
OutputLevelNone,
OutputLevelCompact
,
//
OutputLevelCompact,
OutputLevelFull
//
OutputLevelFull
};
//
};
class
NCVAutoTestLister
class
NCVAutoTestLister
{
{
...
...
modules/gpu/test/nvidia/main_nvidia.cpp
View file @
f6b451c6
...
@@ -21,11 +21,15 @@
...
@@ -21,11 +21,15 @@
#include "NCVAutoTestLister.hpp"
#include "NCVAutoTestLister.hpp"
#include "NCVTestSourceProvider.hpp"
#include "NCVTestSourceProvider.hpp"
#include <main_test_nvidia.h>
static
std
::
string
path
;
static
std
::
string
path
;
namespace
{
template
<
class
T_in
,
class
T_out
>
template
<
class
T_in
,
class
T_out
>
void
generateIntegralTests
(
NCVAutoTestLister
&
testLister
,
NCVTestSourceProvider
<
T_in
>
&
src
,
void
generateIntegralTests
(
NCVAutoTestLister
&
testLister
,
NCVTestSourceProvider
<
T_in
>
&
src
,
Ncv32u
maxWidth
,
Ncv32u
maxHeight
)
Ncv32u
maxWidth
,
Ncv32u
maxHeight
)
{
{
for
(
Ncv32f
_i
=
1.0
;
_i
<
maxWidth
;
_i
*=
1.2
f
)
for
(
Ncv32f
_i
=
1.0
;
_i
<
maxWidth
;
_i
*=
1.2
f
)
...
@@ -43,13 +47,9 @@ void generateIntegralTests(NCVAutoTestLister &testLister, NCVTestSourceProvider<
...
@@ -43,13 +47,9 @@ void generateIntegralTests(NCVAutoTestLister &testLister, NCVTestSourceProvider<
testLister
.
add
(
new
TestIntegralImage
<
T_in
,
T_out
>
(
testName
,
src
,
2
,
i
));
testLister
.
add
(
new
TestIntegralImage
<
T_in
,
T_out
>
(
testName
,
src
,
2
,
i
));
}
}
//test VGA
testLister
.
add
(
new
TestIntegralImage
<
T_in
,
T_out
>
(
"LinIntImg_VGA"
,
src
,
640
,
480
));
testLister
.
add
(
new
TestIntegralImage
<
T_in
,
T_out
>
(
"LinIntImg_VGA"
,
src
,
640
,
480
));
//TODO: add tests of various resolutions up to 4096x4096
}
}
void
generateSquaredIntegralTests
(
NCVAutoTestLister
&
testLister
,
NCVTestSourceProvider
<
Ncv8u
>
&
src
,
void
generateSquaredIntegralTests
(
NCVAutoTestLister
&
testLister
,
NCVTestSourceProvider
<
Ncv8u
>
&
src
,
Ncv32u
maxWidth
,
Ncv32u
maxHeight
)
Ncv32u
maxWidth
,
Ncv32u
maxHeight
)
{
{
...
@@ -68,13 +68,9 @@ void generateSquaredIntegralTests(NCVAutoTestLister &testLister, NCVTestSourcePr
...
@@ -68,13 +68,9 @@ void generateSquaredIntegralTests(NCVAutoTestLister &testLister, NCVTestSourcePr
testLister
.
add
(
new
TestIntegralImageSquared
(
testName
,
src
,
32
,
i
));
testLister
.
add
(
new
TestIntegralImageSquared
(
testName
,
src
,
32
,
i
));
}
}
//test VGA
testLister
.
add
(
new
TestIntegralImageSquared
(
"SqLinIntImg_VGA"
,
src
,
640
,
480
));
testLister
.
add
(
new
TestIntegralImageSquared
(
"SqLinIntImg_VGA"
,
src
,
640
,
480
));
//TODO: add tests of various resolutions up to 4096x4096
}
}
void
generateRectStdDevTests
(
NCVAutoTestLister
&
testLister
,
NCVTestSourceProvider
<
Ncv8u
>
&
src
,
void
generateRectStdDevTests
(
NCVAutoTestLister
&
testLister
,
NCVTestSourceProvider
<
Ncv8u
>
&
src
,
Ncv32u
maxWidth
,
Ncv32u
maxHeight
)
Ncv32u
maxWidth
,
Ncv32u
maxHeight
)
{
{
...
@@ -91,17 +87,12 @@ void generateRectStdDevTests(NCVAutoTestLister &testLister, NCVTestSourceProvide
...
@@ -91,17 +87,12 @@ void generateRectStdDevTests(NCVAutoTestLister &testLister, NCVTestSourceProvide
testLister
.
add
(
new
TestRectStdDev
(
testName
,
src
,
i
-
1
,
i
*
2
-
1
,
rect
,
2.5
,
true
));
testLister
.
add
(
new
TestRectStdDev
(
testName
,
src
,
i
-
1
,
i
*
2
-
1
,
rect
,
2.5
,
true
));
}
}
//test VGA
testLister
.
add
(
new
TestRectStdDev
(
"RectStdDev_VGA"
,
src
,
640
,
480
,
rect
,
1
,
true
));
testLister
.
add
(
new
TestRectStdDev
(
"RectStdDev_VGA"
,
src
,
640
,
480
,
rect
,
1
,
true
));
//TODO: add tests of various resolutions up to 4096x4096
}
}
template
<
class
T
>
template
<
class
T
>
void
generateResizeTests
(
NCVAutoTestLister
&
testLister
,
NCVTestSourceProvider
<
T
>
&
src
)
void
generateResizeTests
(
NCVAutoTestLister
&
testLister
,
NCVTestSourceProvider
<
T
>
&
src
)
{
{
//test VGA
for
(
Ncv32u
i
=
1
;
i
<
480
;
i
+=
3
)
for
(
Ncv32u
i
=
1
;
i
<
480
;
i
+=
3
)
{
{
char
testName
[
80
];
char
testName
[
80
];
...
@@ -110,7 +101,6 @@ void generateResizeTests(NCVAutoTestLister &testLister, NCVTestSourceProvider<T>
...
@@ -110,7 +101,6 @@ void generateResizeTests(NCVAutoTestLister &testLister, NCVTestSourceProvider<T>
testLister
.
add
(
new
TestResize
<
T
>
(
testName
,
src
,
640
,
480
,
i
,
false
));
testLister
.
add
(
new
TestResize
<
T
>
(
testName
,
src
,
640
,
480
,
i
,
false
));
}
}
//test HD
for
(
Ncv32u
i
=
1
;
i
<
1080
;
i
+=
5
)
for
(
Ncv32u
i
=
1
;
i
<
1080
;
i
+=
5
)
{
{
char
testName
[
80
];
char
testName
[
80
];
...
@@ -118,11 +108,8 @@ void generateResizeTests(NCVAutoTestLister &testLister, NCVTestSourceProvider<T>
...
@@ -118,11 +108,8 @@ void generateResizeTests(NCVAutoTestLister &testLister, NCVTestSourceProvider<T>
testLister
.
add
(
new
TestResize
<
T
>
(
testName
,
src
,
1920
,
1080
,
i
,
true
));
testLister
.
add
(
new
TestResize
<
T
>
(
testName
,
src
,
1920
,
1080
,
i
,
true
));
testLister
.
add
(
new
TestResize
<
T
>
(
testName
,
src
,
1920
,
1080
,
i
,
false
));
testLister
.
add
(
new
TestResize
<
T
>
(
testName
,
src
,
1920
,
1080
,
i
,
false
));
}
}
//TODO: add tests of various resolutions up to 4096x4096
}
}
void
generateNPPSTVectorTests
(
NCVAutoTestLister
&
testLister
,
NCVTestSourceProvider
<
Ncv32u
>
&
src
,
Ncv32u
maxLength
)
void
generateNPPSTVectorTests
(
NCVAutoTestLister
&
testLister
,
NCVTestSourceProvider
<
Ncv32u
>
&
src
,
Ncv32u
maxLength
)
{
{
//compaction
//compaction
...
@@ -186,9 +173,10 @@ void generateTransposeTests(NCVAutoTestLister &testLister, NCVTestSourceProvider
...
@@ -186,9 +173,10 @@ void generateTransposeTests(NCVAutoTestLister &testLister, NCVTestSourceProvider
testLister
.
add
(
new
TestTranspose
<
T
>
(
"TestTranspose_reg_0"
,
src
,
1072
,
375
));
testLister
.
add
(
new
TestTranspose
<
T
>
(
"TestTranspose_reg_0"
,
src
,
1072
,
375
));
}
}
template
<
class
T
>
template
<
class
T
>
void
generateDrawRectsTests
(
NCVAutoTestLister
&
testLister
,
NCVTestSourceProvider
<
T
>
&
src
,
NCVTestSourceProvider
<
Ncv32u
>
&
src32u
,
void
generateDrawRectsTests
(
NCVAutoTestLister
&
testLister
,
NCVTestSourceProvider
<
T
>
&
src
,
NCVTestSourceProvider
<
Ncv32u
>
&
src32u
,
Ncv32u
maxWidth
,
Ncv32u
maxHeight
)
Ncv32u
maxWidth
,
Ncv32u
maxHeight
)
{
{
for
(
Ncv32f
_i
=
16.0
;
_i
<
maxWidth
;
_i
*=
1.1
f
)
for
(
Ncv32f
_i
=
16.0
;
_i
<
maxWidth
;
_i
*=
1.1
f
)
...
@@ -215,11 +203,8 @@ void generateDrawRectsTests(NCVAutoTestLister &testLister, NCVTestSourceProvider
...
@@ -215,11 +203,8 @@ void generateDrawRectsTests(NCVAutoTestLister &testLister, NCVTestSourceProvider
//test VGA
//test VGA
testLister
.
add
(
new
TestDrawRects
<
T
>
(
"DrawRects_VGA"
,
src
,
src32u
,
640
,
480
,
640
*
480
/
1000
,
(
T
)
0xFF
));
testLister
.
add
(
new
TestDrawRects
<
T
>
(
"DrawRects_VGA"
,
src
,
src32u
,
640
,
480
,
640
*
480
/
1000
,
(
T
)
0xFF
));
//TODO: add tests of various resolutions up to 4096x4096
}
}
void
generateVectorTests
(
NCVAutoTestLister
&
testLister
,
NCVTestSourceProvider
<
Ncv32u
>
&
src
,
Ncv32u
maxLength
)
void
generateVectorTests
(
NCVAutoTestLister
&
testLister
,
NCVTestSourceProvider
<
Ncv32u
>
&
src
,
Ncv32u
maxLength
)
{
{
//growth
//growth
...
@@ -237,7 +222,6 @@ void generateVectorTests(NCVAutoTestLister &testLister, NCVTestSourceProvider<Nc
...
@@ -237,7 +222,6 @@ void generateVectorTests(NCVAutoTestLister &testLister, NCVTestSourceProvider<Nc
testLister
.
add
(
new
TestHypothesesGrow
(
"VectorGrow00b"
,
src
,
10
,
42
,
1.2
f
,
10
,
0
,
10
,
0
));
testLister
.
add
(
new
TestHypothesesGrow
(
"VectorGrow00b"
,
src
,
10
,
42
,
1.2
f
,
10
,
0
,
10
,
0
));
}
}
void
generateHypothesesFiltrationTests
(
NCVAutoTestLister
&
testLister
,
NCVTestSourceProvider
<
Ncv32u
>
&
src
,
Ncv32u
maxLength
)
void
generateHypothesesFiltrationTests
(
NCVAutoTestLister
&
testLister
,
NCVTestSourceProvider
<
Ncv32u
>
&
src
,
Ncv32u
maxLength
)
{
{
for
(
Ncv32f
_i
=
1.0
;
_i
<
maxLength
;
_i
*=
1.1
f
)
for
(
Ncv32f
_i
=
1.0
;
_i
<
maxLength
;
_i
*=
1.1
f
)
...
@@ -261,7 +245,6 @@ void generateHaarLoaderTests(NCVAutoTestLister &testLister)
...
@@ -261,7 +245,6 @@ void generateHaarLoaderTests(NCVAutoTestLister &testLister)
testLister
.
add
(
new
TestHaarCascadeLoader
(
"haarcascade_eye_tree_eyeglasses.xml"
,
path
+
"haarcascade_eye_tree_eyeglasses.xml"
));
testLister
.
add
(
new
TestHaarCascadeLoader
(
"haarcascade_eye_tree_eyeglasses.xml"
,
path
+
"haarcascade_eye_tree_eyeglasses.xml"
));
}
}
void
generateHaarApplicationTests
(
NCVAutoTestLister
&
testLister
,
NCVTestSourceProvider
<
Ncv8u
>
&
src
,
void
generateHaarApplicationTests
(
NCVAutoTestLister
&
testLister
,
NCVTestSourceProvider
<
Ncv8u
>
&
src
,
Ncv32u
maxWidth
,
Ncv32u
maxHeight
)
Ncv32u
maxWidth
,
Ncv32u
maxHeight
)
{
{
...
@@ -285,7 +268,6 @@ void generateHaarApplicationTests(NCVAutoTestLister &testLister, NCVTestSourcePr
...
@@ -285,7 +268,6 @@ void generateHaarApplicationTests(NCVAutoTestLister &testLister, NCVTestSourcePr
static
void
devNullOutput
(
const
std
::
string
&
msg
)
static
void
devNullOutput
(
const
std
::
string
&
msg
)
{
{
}
}
bool
nvidia_NPPST_Integral_Image
(
const
std
::
string
&
test_data_path
,
OutputLevel
outputLevel
)
bool
nvidia_NPPST_Integral_Image
(
const
std
::
string
&
test_data_path
,
OutputLevel
outputLevel
)
...
@@ -304,6 +286,8 @@ bool nvidia_NPPST_Integral_Image(const std::string& test_data_path, OutputLevel
...
@@ -304,6 +286,8 @@ bool nvidia_NPPST_Integral_Image(const std::string& test_data_path, OutputLevel
return
testListerII
.
invoke
();
return
testListerII
.
invoke
();
}
}
}
bool
nvidia_NPPST_Squared_Integral_Image
(
const
std
::
string
&
test_data_path
,
OutputLevel
outputLevel
)
bool
nvidia_NPPST_Squared_Integral_Image
(
const
std
::
string
&
test_data_path
,
OutputLevel
outputLevel
)
{
{
path
=
test_data_path
;
path
=
test_data_path
;
...
...
modules/gpu/test/test_nvidia.cpp
View file @
f6b451c6
...
@@ -39,6 +39,7 @@
...
@@ -39,6 +39,7 @@
//
//
//M*/
//M*/
#include <main_test_nvidia.h>
#include "precomp.hpp"
#include "precomp.hpp"
#ifdef HAVE_CUDA
#ifdef HAVE_CUDA
...
@@ -46,24 +47,12 @@
...
@@ -46,24 +47,12 @@
using
namespace
cvtest
;
using
namespace
cvtest
;
using
namespace
testing
;
using
namespace
testing
;
enum
OutputLevel
//enum OutputLevel
{
//{
OutputLevelNone
,
// OutputLevelNone,
OutputLevelCompact
,
// OutputLevelCompact,
OutputLevelFull
// OutputLevelFull
};
//};
bool
nvidia_NPPST_Integral_Image
(
const
std
::
string
&
test_data_path
,
OutputLevel
outputLevel
);
bool
nvidia_NPPST_Squared_Integral_Image
(
const
std
::
string
&
test_data_path
,
OutputLevel
outputLevel
);
bool
nvidia_NPPST_RectStdDev
(
const
std
::
string
&
test_data_path
,
OutputLevel
outputLevel
);
bool
nvidia_NPPST_Resize
(
const
std
::
string
&
test_data_path
,
OutputLevel
outputLevel
);
bool
nvidia_NPPST_Vector_Operations
(
const
std
::
string
&
test_data_path
,
OutputLevel
outputLevel
);
bool
nvidia_NPPST_Transpose
(
const
std
::
string
&
test_data_path
,
OutputLevel
outputLevel
);
bool
nvidia_NCV_Vector_Operations
(
const
std
::
string
&
test_data_path
,
OutputLevel
outputLevel
);
bool
nvidia_NCV_Haar_Cascade_Loader
(
const
std
::
string
&
test_data_path
,
OutputLevel
outputLevel
);
bool
nvidia_NCV_Haar_Cascade_Application
(
const
std
::
string
&
test_data_path
,
OutputLevel
outputLevel
);
bool
nvidia_NCV_Hypotheses_Filtration
(
const
std
::
string
&
test_data_path
,
OutputLevel
outputLevel
);
bool
nvidia_NCV_Visualization
(
const
std
::
string
&
test_data_path
,
OutputLevel
outputLevel
);
struct
NVidiaTest
:
TestWithParam
<
cv
::
gpu
::
DeviceInfo
>
struct
NVidiaTest
:
TestWithParam
<
cv
::
gpu
::
DeviceInfo
>
{
{
...
@@ -86,12 +75,12 @@ struct NCV : NVidiaTest {};
...
@@ -86,12 +75,12 @@ struct NCV : NVidiaTest {};
OutputLevel
nvidiaTestOutputLevel
=
OutputLevelCompact
;
OutputLevel
nvidiaTestOutputLevel
=
OutputLevelCompact
;
TEST_P
(
NPPST
,
Integral
)
//
TEST_P(NPPST, Integral)
{
//
{
bool
res
=
nvidia_NPPST_Integral_Image
(
path
,
nvidiaTestOutputLevel
);
//
bool res = nvidia_NPPST_Integral_Image(path, nvidiaTestOutputLevel);
ASSERT_TRUE
(
res
);
//
ASSERT_TRUE(res);
}
//
}
TEST_P
(
NPPST
,
SquaredIntegral
)
TEST_P
(
NPPST
,
SquaredIntegral
)
{
{
...
...
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