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
0f95f0d8
Commit
0f95f0d8
authored
Oct 26, 2013
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ocl: rewrite filter2D
parent
0bf9ece9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
9 deletions
+9
-9
ocl.hpp
modules/ocl/include/opencv2/ocl/ocl.hpp
+6
-6
filtering.cpp
modules/ocl/src/filtering.cpp
+0
-0
filtering_filter2D.cl
modules/ocl/src/opencl/filtering_filter2D.cl
+0
-0
filtering_laplacian.cl
modules/ocl/src/opencl/filtering_laplacian.cl
+0
-0
test_filters.cpp
modules/ocl/test/test_filters.cpp
+3
-3
No files found.
modules/ocl/include/opencv2/ocl/ocl.hpp
View file @
0f95f0d8
...
...
@@ -718,8 +718,9 @@ namespace cv
CV_EXPORTS
Ptr
<
FilterEngine_GPU
>
createDerivFilter_GPU
(
int
srcType
,
int
dstType
,
int
dx
,
int
dy
,
int
ksize
,
int
borderType
=
BORDER_DEFAULT
);
//! applies Laplacian operator to the image
// supports only ksize = 1 and ksize = 3 8UC1 8UC4 32FC1 32FC4 data type
CV_EXPORTS
void
Laplacian
(
const
oclMat
&
src
,
oclMat
&
dst
,
int
ddepth
,
int
ksize
=
1
,
double
scale
=
1
);
// supports only ksize = 1 and ksize = 3
CV_EXPORTS
void
Laplacian
(
const
oclMat
&
src
,
oclMat
&
dst
,
int
ddepth
,
int
ksize
=
1
,
double
scale
=
1
,
double
delta
=
0
,
int
borderType
=
BORDER_DEFAULT
);
//! returns 2D box filter
// dst type must be the same as source type
...
...
@@ -731,11 +732,12 @@ namespace cv
const
Point
&
anchor
=
Point
(
-
1
,
-
1
),
int
borderType
=
BORDER_DEFAULT
);
//! returns 2D filter with the specified kernel
// supports
CV_8UC1 and CV_8UC4 types
// supports
: dst type must be the same as source type
CV_EXPORTS
Ptr
<
BaseFilter_GPU
>
getLinearFilter_GPU
(
int
srcType
,
int
dstType
,
const
Mat
&
kernel
,
const
Size
&
ksize
,
const
Point
&
anchor
=
Point
(
-
1
,
-
1
),
int
borderType
=
BORDER_DEFAULT
);
//! returns the non-separable linear filter engine
// supports: dst type must be the same as source type
CV_EXPORTS
Ptr
<
FilterEngine_GPU
>
createLinearFilter_GPU
(
int
srcType
,
int
dstType
,
const
Mat
&
kernel
,
const
Point
&
anchor
=
Point
(
-
1
,
-
1
),
int
borderType
=
BORDER_DEFAULT
);
...
...
@@ -762,10 +764,8 @@ namespace cv
}
//! applies non-separable 2D linear filter to the image
// Note, at the moment this function only works when anchor point is in the kernel center
// and kernel size supported is either 3x3 or 5x5; otherwise the function will fail to output valid result
CV_EXPORTS
void
filter2D
(
const
oclMat
&
src
,
oclMat
&
dst
,
int
ddepth
,
const
Mat
&
kernel
,
Point
anchor
=
Point
(
-
1
,
-
1
),
int
borderType
=
BORDER_DEFAULT
);
Point
anchor
=
Point
(
-
1
,
-
1
),
double
delta
=
0.0
,
int
borderType
=
BORDER_DEFAULT
);
//! applies separable 2D linear filter to the image
CV_EXPORTS
void
sepFilter2D
(
const
oclMat
&
src
,
oclMat
&
dst
,
int
ddepth
,
const
Mat
&
kernelX
,
const
Mat
&
kernelY
,
...
...
modules/ocl/src/filtering.cpp
View file @
0f95f0d8
This diff is collapsed.
Click to expand it.
modules/ocl/src/opencl/filtering_filter2D.cl
0 → 100644
View file @
0f95f0d8
This diff is collapsed.
Click to expand it.
modules/ocl/src/opencl/filtering_laplacian.cl
deleted
100644 → 0
View file @
0bf9ece9
This diff is collapsed.
Click to expand it.
modules/ocl/test/test_filters.cpp
View file @
0f95f0d8
...
...
@@ -160,8 +160,8 @@ OCL_TEST_P(LaplacianTest, Accuracy)
{
random_roi
();
Laplacian
(
src_roi
,
dst_roi
,
-
1
,
ksize
,
scale
);
// TODO FIXIT
, 0, borderType);
ocl
::
Laplacian
(
gsrc_roi
,
gdst_roi
,
-
1
,
ksize
,
scale
);
// TODO FIXIT
, 0, borderType);
Laplacian
(
src_roi
,
dst_roi
,
-
1
,
ksize
,
scale
,
0
,
borderType
);
ocl
::
Laplacian
(
gsrc_roi
,
gdst_roi
,
-
1
,
ksize
,
scale
,
0
,
borderType
);
Near
();
}
...
...
@@ -298,7 +298,7 @@ OCL_TEST_P(Filter2D, Mat)
kernel
*=
1.0
/
(
double
)(
ksize
*
ksize
);
cv
::
filter2D
(
src_roi
,
dst_roi
,
-
1
,
kernel
,
anchor
,
0.0
,
borderType
);
ocl
::
filter2D
(
gsrc_roi
,
gdst_roi
,
-
1
,
kernel
,
anchor
,
/* TODO FIXIT 0.0,*/
borderType
);
ocl
::
filter2D
(
gsrc_roi
,
gdst_roi
,
-
1
,
kernel
,
anchor
,
0.0
,
borderType
);
Near
();
}
...
...
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