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
9d148c76
Commit
9d148c76
authored
May 20, 2015
by
Alexander Smorkalov
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4033 from jet47:gpu-tests-fix
parents
b9792fdc
d58d2777
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
17 deletions
+31
-17
calib3d.cpp
modules/gpu/src/calib3d.cpp
+3
-1
main_nvidia.cpp
modules/gpu/test/nvidia/main_nvidia.cpp
+20
-10
test_calib3d.cpp
modules/gpu/test/test_calib3d.cpp
+8
-6
No files found.
modules/gpu/src/calib3d.cpp
View file @
9d148c76
...
...
@@ -138,14 +138,16 @@ namespace
bool
was
;
do
{
subset
[
i
]
=
rand
()
%
num_points
;
subset
[
i
]
=
cv
::
theRNG
().
uniform
(
0
,
num_points
)
;
was
=
false
;
for
(
int
j
=
0
;
j
<
i
;
++
j
)
{
if
(
subset
[
j
]
==
subset
[
i
])
{
was
=
true
;
break
;
}
}
}
while
(
was
);
}
}
...
...
modules/gpu/test/nvidia/main_nvidia.cpp
View file @
9d148c76
...
...
@@ -340,7 +340,8 @@ bool nvidia_NPPST_Integral_Image(const std::string& test_data_path, OutputLevel
bool
nvidia_NPPST_Squared_Integral_Image
(
const
std
::
string
&
test_data_path
,
OutputLevel
outputLevel
)
{
path
=
test_data_path
;
ncvSetDebugOutputHandler
(
devNullOutput
);
if
(
outputLevel
!=
OutputLevelFull
)
ncvSetDebugOutputHandler
(
devNullOutput
);
NCVAutoTestLister
testListerSII
(
"NPPST Squared Integral Image"
,
outputLevel
);
...
...
@@ -354,7 +355,8 @@ bool nvidia_NPPST_Squared_Integral_Image(const std::string& test_data_path, Outp
bool
nvidia_NPPST_RectStdDev
(
const
std
::
string
&
test_data_path
,
OutputLevel
outputLevel
)
{
path
=
test_data_path
;
ncvSetDebugOutputHandler
(
devNullOutput
);
if
(
outputLevel
!=
OutputLevelFull
)
ncvSetDebugOutputHandler
(
devNullOutput
);
NCVAutoTestLister
testListerRStdDev
(
"NPPST RectStdDev"
,
outputLevel
);
...
...
@@ -368,7 +370,8 @@ bool nvidia_NPPST_RectStdDev(const std::string& test_data_path, OutputLevel outp
bool
nvidia_NPPST_Resize
(
const
std
::
string
&
test_data_path
,
OutputLevel
outputLevel
)
{
path
=
test_data_path
;
ncvSetDebugOutputHandler
(
devNullOutput
);
if
(
outputLevel
!=
OutputLevelFull
)
ncvSetDebugOutputHandler
(
devNullOutput
);
NCVAutoTestLister
testListerResize
(
"NPPST Resize"
,
outputLevel
);
...
...
@@ -384,7 +387,8 @@ bool nvidia_NPPST_Resize(const std::string& test_data_path, OutputLevel outputLe
bool
nvidia_NPPST_Vector_Operations
(
const
std
::
string
&
test_data_path
,
OutputLevel
outputLevel
)
{
path
=
test_data_path
;
ncvSetDebugOutputHandler
(
devNullOutput
);
if
(
outputLevel
!=
OutputLevelFull
)
ncvSetDebugOutputHandler
(
devNullOutput
);
NCVAutoTestLister
testListerNPPSTVectorOperations
(
"NPPST Vector Operations"
,
outputLevel
);
...
...
@@ -398,7 +402,8 @@ bool nvidia_NPPST_Vector_Operations(const std::string& test_data_path, OutputLev
bool
nvidia_NPPST_Transpose
(
const
std
::
string
&
test_data_path
,
OutputLevel
outputLevel
)
{
path
=
test_data_path
;
ncvSetDebugOutputHandler
(
devNullOutput
);
if
(
outputLevel
!=
OutputLevelFull
)
ncvSetDebugOutputHandler
(
devNullOutput
);
NCVAutoTestLister
testListerTranspose
(
"NPPST Transpose"
,
outputLevel
);
...
...
@@ -414,7 +419,8 @@ bool nvidia_NPPST_Transpose(const std::string& test_data_path, OutputLevel outpu
bool
nvidia_NCV_Vector_Operations
(
const
std
::
string
&
test_data_path
,
OutputLevel
outputLevel
)
{
path
=
test_data_path
;
ncvSetDebugOutputHandler
(
devNullOutput
);
if
(
outputLevel
!=
OutputLevelFull
)
ncvSetDebugOutputHandler
(
devNullOutput
);
NCVAutoTestLister
testListerVectorOperations
(
"Vector Operations"
,
outputLevel
);
...
...
@@ -429,7 +435,8 @@ bool nvidia_NCV_Vector_Operations(const std::string& test_data_path, OutputLevel
bool
nvidia_NCV_Haar_Cascade_Loader
(
const
std
::
string
&
test_data_path
,
OutputLevel
outputLevel
)
{
path
=
test_data_path
;
ncvSetDebugOutputHandler
(
devNullOutput
);
if
(
outputLevel
!=
OutputLevelFull
)
ncvSetDebugOutputHandler
(
devNullOutput
);
NCVAutoTestLister
testListerHaarLoader
(
"Haar Cascade Loader"
,
outputLevel
);
...
...
@@ -441,7 +448,8 @@ bool nvidia_NCV_Haar_Cascade_Loader(const std::string& test_data_path, OutputLev
bool
nvidia_NCV_Haar_Cascade_Application
(
const
std
::
string
&
test_data_path
,
OutputLevel
outputLevel
)
{
path
=
test_data_path
;
ncvSetDebugOutputHandler
(
devNullOutput
);
if
(
outputLevel
!=
OutputLevelFull
)
ncvSetDebugOutputHandler
(
devNullOutput
);
NCVAutoTestLister
testListerHaarAppl
(
"Haar Cascade Application"
,
outputLevel
);
...
...
@@ -455,7 +463,8 @@ bool nvidia_NCV_Haar_Cascade_Application(const std::string& test_data_path, Outp
bool
nvidia_NCV_Hypotheses_Filtration
(
const
std
::
string
&
test_data_path
,
OutputLevel
outputLevel
)
{
path
=
test_data_path
;
ncvSetDebugOutputHandler
(
devNullOutput
);
if
(
outputLevel
!=
OutputLevelFull
)
ncvSetDebugOutputHandler
(
devNullOutput
);
NCVAutoTestLister
testListerHypFiltration
(
"Hypotheses Filtration"
,
outputLevel
);
...
...
@@ -469,7 +478,8 @@ bool nvidia_NCV_Hypotheses_Filtration(const std::string& test_data_path, OutputL
bool
nvidia_NCV_Visualization
(
const
std
::
string
&
test_data_path
,
OutputLevel
outputLevel
)
{
path
=
test_data_path
;
ncvSetDebugOutputHandler
(
devNullOutput
);
if
(
outputLevel
!=
OutputLevelFull
)
ncvSetDebugOutputHandler
(
devNullOutput
);
NCVAutoTestLister
testListerVisualize
(
"Visualization"
,
outputLevel
);
...
...
modules/gpu/test/test_calib3d.cpp
View file @
9d148c76
...
...
@@ -278,18 +278,20 @@ struct SolvePnPRansac : testing::TestWithParam<cv::gpu::DeviceInfo>
GPU_TEST_P
(
SolvePnPRansac
,
Accuracy
)
{
cv
::
Mat
object
=
randomMat
(
cv
::
Size
(
5000
,
1
),
CV_32FC3
,
0
,
100
);
cv
::
Mat
camera_mat
=
randomMat
(
cv
::
Size
(
3
,
3
),
CV_32F
,
0.5
,
1
);
// Use RNG with fixed seed to be reproducable
cv
::
RNG
rng
(
123456789
);
cv
::
theRNG
()
=
rng
;
cv
::
Mat
object
=
cvtest
::
randomMat
(
rng
,
cv
::
Size
(
5000
,
1
),
CV_32FC3
,
0
,
100
,
false
);
cv
::
Mat
camera_mat
=
cvtest
::
randomMat
(
rng
,
cv
::
Size
(
3
,
3
),
CV_32FC1
,
0.5
,
1
,
false
);
camera_mat
.
at
<
float
>
(
0
,
1
)
=
0.
f
;
camera_mat
.
at
<
float
>
(
1
,
0
)
=
0.
f
;
camera_mat
.
at
<
float
>
(
2
,
0
)
=
0.
f
;
camera_mat
.
at
<
float
>
(
2
,
1
)
=
0.
f
;
std
::
vector
<
cv
::
Point2f
>
image_vec
;
cv
::
Mat
rvec_gold
;
cv
::
Mat
tvec_gold
;
rvec_gold
=
randomMat
(
cv
::
Size
(
3
,
1
),
CV_32F
,
0
,
1
);
tvec_gold
=
randomMat
(
cv
::
Size
(
3
,
1
),
CV_32F
,
0
,
1
);
cv
::
Mat
rvec_gold
=
cvtest
::
randomMat
(
rng
,
cv
::
Size
(
3
,
1
),
CV_32F
,
0
,
1
,
false
);
cv
::
Mat
tvec_gold
=
cvtest
::
randomMat
(
rng
,
cv
::
Size
(
3
,
1
),
CV_32F
,
0
,
1
,
false
);
cv
::
projectPoints
(
object
,
rvec_gold
,
tvec_gold
,
camera_mat
,
cv
::
Mat
(
1
,
8
,
CV_32F
,
cv
::
Scalar
::
all
(
0
)),
image_vec
);
cv
::
Mat
rvec
,
tvec
;
...
...
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