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
2f4aeeac
Commit
2f4aeeac
authored
Dec 03, 2010
by
Alexey Spizhevoy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed meanShift test in gpu module
parent
cc675c7b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
meanshift.cpp
tests/gpu/src/meanshift.cpp
+11
-2
No files found.
tests/gpu/src/meanshift.cpp
View file @
2f4aeeac
...
@@ -54,7 +54,15 @@ struct CV_GpuMeanShiftTest : public CvTest
...
@@ -54,7 +54,15 @@ struct CV_GpuMeanShiftTest : public CvTest
int
colorRad
=
30
;
int
colorRad
=
30
;
cv
::
Mat
img
=
cv
::
imread
(
std
::
string
(
ts
->
get_data_path
())
+
"meanshift/cones.png"
);
cv
::
Mat
img
=
cv
::
imread
(
std
::
string
(
ts
->
get_data_path
())
+
"meanshift/cones.png"
);
cv
::
Mat
img_template
=
cv
::
imread
(
std
::
string
(
ts
->
get_data_path
())
+
"meanshift/con_result.png"
);
cv
::
Mat
img_template
;
int
major
,
minor
;
cv
::
gpu
::
getComputeCapability
(
cv
::
gpu
::
getDevice
(),
major
,
minor
);
if
(
major
==
1
)
img_template
=
cv
::
imread
(
std
::
string
(
ts
->
get_data_path
())
+
"meanshift/con_result_CC1X.png"
);
else
img_template
=
cv
::
imread
(
std
::
string
(
ts
->
get_data_path
())
+
"meanshift/con_result.png"
);
if
(
img
.
empty
()
||
img_template
.
empty
())
if
(
img
.
empty
()
||
img_template
.
empty
())
{
{
...
@@ -69,6 +77,7 @@ struct CV_GpuMeanShiftTest : public CvTest
...
@@ -69,6 +77,7 @@ struct CV_GpuMeanShiftTest : public CvTest
{
{
cv
::
gpu
::
GpuMat
res
;
cv
::
gpu
::
GpuMat
res
;
cv
::
gpu
::
meanShiftFiltering
(
cv
::
gpu
::
GpuMat
(
rgba
),
res
,
spatialRad
,
colorRad
);
cv
::
gpu
::
meanShiftFiltering
(
cv
::
gpu
::
GpuMat
(
rgba
),
res
,
spatialRad
,
colorRad
);
if
(
res
.
type
()
!=
CV_8UC4
)
if
(
res
.
type
()
!=
CV_8UC4
)
{
{
ts
->
set_failed_test_info
(
CvTS
::
FAIL_INVALID_OUTPUT
);
ts
->
set_failed_test_info
(
CvTS
::
FAIL_INVALID_OUTPUT
);
...
@@ -197,7 +206,7 @@ struct CV_GpuMeanShiftProcTest : public CvTest
...
@@ -197,7 +206,7 @@ struct CV_GpuMeanShiftProcTest : public CvTest
cv
::
gpu
::
getComputeCapability
(
cv
::
gpu
::
getDevice
(),
major
,
minor
);
cv
::
gpu
::
getComputeCapability
(
cv
::
gpu
::
getDevice
(),
major
,
minor
);
if
(
major
==
1
)
if
(
major
==
1
)
fs
.
open
(
std
::
string
(
ts
->
get_data_path
())
+
"meanshift/spmap_
1x
.yaml"
,
cv
::
FileStorage
::
READ
);
fs
.
open
(
std
::
string
(
ts
->
get_data_path
())
+
"meanshift/spmap_
CC1X
.yaml"
,
cv
::
FileStorage
::
READ
);
else
else
fs
.
open
(
std
::
string
(
ts
->
get_data_path
())
+
"meanshift/spmap.yaml"
,
cv
::
FileStorage
::
READ
);
fs
.
open
(
std
::
string
(
ts
->
get_data_path
())
+
"meanshift/spmap.yaml"
,
cv
::
FileStorage
::
READ
);
fs
[
"spmap"
]
>>
spmap_template
;
fs
[
"spmap"
]
>>
spmap_template
;
...
...
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