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
125d6713
Commit
125d6713
authored
Dec 17, 2013
by
Elena Gvozdeva
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed medianFilter
parent
8fe4e98b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
medianFilter.cl
modules/imgproc/src/opencl/medianFilter.cl
+2
-2
smooth.cpp
modules/imgproc/src/smooth.cpp
+2
-2
test_medianfilter.cpp
modules/imgproc/test/ocl/test_medianfilter.cpp
+1
-1
No files found.
modules/imgproc/src/opencl/medianFilter.cl
View file @
125d6713
...
...
@@ -62,7 +62,7 @@ __kernel void medianFilter3(__global const uchar* srcptr, int srcStep, int srcOf
r
=
clamp
(
dy+dr+9,
0
,
rows-1
)
;
int
index9
=
mad24
(
r,
srcStep,
srcOffset
+
c*scnbytes
)
;
__global
DATA_TYPE
*
src
=
(
__global
DATA_TYPE
*
)(
srcptr
+
index1
)
;
data[dr][dc]
=
src[0]
;
...
...
@@ -83,7 +83,7 @@ __kernel void medianFilter3(__global const uchar* srcptr, int srcStep, int srcOf
op
(
p4,
p2
)
; op(p6, p4); op(p4, p2);
int
dst_index
=
mad24
(
gy,
dstStep,
dstOffset
+
gx
*
scnbytes
)
;
if
(
gy
<
rows
&&
gx
<
cols
)
{
__global
DATA_TYPE*
dst
=
(
__global
DATA_TYPE
*
)(
dstptr
+
dst_index
)
;
...
...
modules/imgproc/src/smooth.cpp
View file @
125d6713
...
...
@@ -1668,7 +1668,7 @@ namespace cv
int
type
=
_src
.
type
();
int
depth
=
CV_MAT_DEPTH
(
type
),
cn
=
CV_MAT_CN
(
type
);
if
(
!
((
depth
==
CV_8U
||
depth
==
CV_16U
||
depth
==
CV_16S
||
depth
==
CV_32F
)
&&
(
cn
==
1
||
cn
=
=
4
)))
if
(
!
((
depth
==
CV_8U
||
depth
==
CV_16U
||
depth
==
CV_16S
||
depth
==
CV_32F
)
&&
(
cn
!=
3
||
cn
<
=
4
)))
return
false
;
const
char
*
kernelName
;
...
...
@@ -1696,7 +1696,7 @@ namespace cv
void
cv
::
medianBlur
(
InputArray
_src0
,
OutputArray
_dst
,
int
ksize
)
{
CV_Assert
(
ksize
%
2
==
1
);
CV_Assert
(
(
ksize
%
2
==
1
)
&&
(
_src0
.
dims
()
<=
2
)
);
if
(
ksize
<=
1
)
{
...
...
modules/imgproc/test/ocl/test_medianfilter.cpp
View file @
125d6713
...
...
@@ -102,7 +102,7 @@ OCL_TEST_P(MedianFilter, Mat)
OCL_INSTANTIATE_TEST_CASE_P
(
ImageProc
,
MedianFilter
,
Combine
(
Values
(
CV_8U
,
CV_16U
,
CV_16S
,
CV_32F
),
Values
(
1
,
4
),
Values
(
1
,
2
,
4
),
Values
(
3
,
5
),
Bool
())
);
...
...
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