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
e9837b0a
Commit
e9837b0a
authored
Jul 08, 2011
by
Alexey Spizhevoy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added support of old CC into GPU mean shift routines
parent
b50428bf
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
11 deletions
+7
-11
imgproc.cu
modules/gpu/src/cuda/imgproc.cu
+5
-3
imgproc_gpu.cpp
modules/gpu/src/imgproc_gpu.cpp
+0
-4
mssegmentation.cpp
modules/gpu/src/mssegmentation.cpp
+0
-2
test_imgproc.cpp
modules/gpu/test/test_imgproc.cpp
+2
-2
No files found.
modules/gpu/src/cuda/imgproc.cu
View file @
e9837b0a
...
...
@@ -251,9 +251,11 @@ namespace cv { namespace gpu { namespace imgproc
}
extern "C" void meanShiftFiltering_gpu(const DevMem2D& src, DevMem2D dst, int sp, int sr, int maxIter, float eps)
{
{
printFuncAttrib(meanshift_kernel);
dim3 grid(1, 1, 1);
dim3 threads(32,
16
, 1);
dim3 threads(32,
8
, 1);
grid.x = divUp(src.cols, threads.x);
grid.y = divUp(src.rows, threads.y);
...
...
@@ -269,7 +271,7 @@ namespace cv { namespace gpu { namespace imgproc
extern "C" void meanShiftProc_gpu(const DevMem2D& src, DevMem2D dstr, DevMem2D dstsp, int sp, int sr, int maxIter, float eps)
{
dim3 grid(1, 1, 1);
dim3 threads(32,
16
, 1);
dim3 threads(32,
8
, 1);
grid.x = divUp(src.cols, threads.x);
grid.y = divUp(src.rows, threads.y);
...
...
modules/gpu/src/imgproc_gpu.cpp
View file @
e9837b0a
...
...
@@ -129,8 +129,6 @@ void cv::gpu::remap(const GpuMat& src, GpuMat& dst, const GpuMat& xmap, const Gp
void
cv
::
gpu
::
meanShiftFiltering
(
const
GpuMat
&
src
,
GpuMat
&
dst
,
int
sp
,
int
sr
,
TermCriteria
criteria
)
{
CV_Assert
(
TargetArchs
::
builtWith
(
FEATURE_SET_COMPUTE_12
)
&&
DeviceInfo
().
supports
(
FEATURE_SET_COMPUTE_12
));
if
(
src
.
empty
()
)
CV_Error
(
CV_StsBadArg
,
"The input image is empty"
);
...
...
@@ -157,8 +155,6 @@ void cv::gpu::meanShiftFiltering(const GpuMat& src, GpuMat& dst, int sp, int sr,
void
cv
::
gpu
::
meanShiftProc
(
const
GpuMat
&
src
,
GpuMat
&
dstr
,
GpuMat
&
dstsp
,
int
sp
,
int
sr
,
TermCriteria
criteria
)
{
CV_Assert
(
TargetArchs
::
builtWith
(
FEATURE_SET_COMPUTE_12
)
&&
DeviceInfo
().
supports
(
FEATURE_SET_COMPUTE_12
));
if
(
src
.
empty
()
)
CV_Error
(
CV_StsBadArg
,
"The input image is empty"
);
...
...
modules/gpu/src/mssegmentation.cpp
View file @
e9837b0a
...
...
@@ -227,8 +227,6 @@ inline int dist2(const cv::Vec2s& lhs, const cv::Vec2s& rhs)
void
cv
::
gpu
::
meanShiftSegmentation
(
const
GpuMat
&
src
,
Mat
&
dst
,
int
sp
,
int
sr
,
int
minsize
,
TermCriteria
criteria
)
{
CV_Assert
(
TargetArchs
::
builtWith
(
FEATURE_SET_COMPUTE_12
)
&&
DeviceInfo
().
supports
(
FEATURE_SET_COMPUTE_12
));
CV_Assert
(
src
.
type
()
==
CV_8UC4
);
const
int
nrows
=
src
.
rows
;
const
int
ncols
=
src
.
cols
;
...
...
modules/gpu/test/test_imgproc.cpp
View file @
e9837b0a
...
...
@@ -1478,7 +1478,7 @@ TEST_P(MeanShift, Proc)
EXPECT_MAT_NEAR
(
spmap_template
,
spmap
,
0.0
);
}
INSTANTIATE_TEST_CASE_P
(
ImgProc
,
MeanShift
,
testing
::
ValuesIn
(
devices
(
cv
::
gpu
::
FEATURE_SET_COMPUTE_12
)));
INSTANTIATE_TEST_CASE_P
(
ImgProc
,
MeanShift
,
testing
::
ValuesIn
(
devices
()));
struct
MeanShiftSegmentation
:
testing
::
TestWithParam
<
std
::
tr1
::
tuple
<
cv
::
gpu
::
DeviceInfo
,
int
>
>
{
...
...
@@ -1540,7 +1540,7 @@ TEST_P(MeanShiftSegmentation, Regression)
}
INSTANTIATE_TEST_CASE_P
(
ImgProc
,
MeanShiftSegmentation
,
testing
::
Combine
(
testing
::
ValuesIn
(
devices
(
cv
::
gpu
::
FEATURE_SET_COMPUTE_12
)),
testing
::
ValuesIn
(
devices
(
)),
testing
::
Values
(
0
,
4
,
20
,
84
,
340
,
1364
)));
////////////////////////////////////////////////////////////////////////////////
...
...
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