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
3d5cebb3
Commit
3d5cebb3
authored
Dec 19, 2018
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #13478 from terfendail:medianblur_fix
parents
b0a08cce
131c09cf
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
+15
-4
median_blur.cpp
modules/imgproc/src/median_blur.cpp
+4
-4
test_filter.cpp
modules/imgproc/test/test_filter.cpp
+11
-0
No files found.
modules/imgproc/src/median_blur.cpp
View file @
3d5cebb3
...
...
@@ -282,10 +282,10 @@ medianBlur_8u_O1( const Mat& _src, Mat& _dst, int ksize )
for
(
;
luc
[
c
][
k
]
<
j
+
r
+
1
;
++
luc
[
c
][
k
]
)
{
#if CV_SIMD256
v_fine
+=
v256_load
(
px
+
16
*
MIN
(
luc
[
c
][
k
],
n
-
1
))
-
v256_load
(
px
+
16
*
MAX
(
luc
[
c
][
k
]
-
2
*
r
-
1
,
0
));
v_fine
=
v_fine
+
v256_load
(
px
+
16
*
MIN
(
luc
[
c
][
k
],
n
-
1
))
-
v256_load
(
px
+
16
*
MAX
(
luc
[
c
][
k
]
-
2
*
r
-
1
,
0
));
#elif CV_SIMD128
v_finel
+=
v_load
(
px
+
16
*
MIN
(
luc
[
c
][
k
],
n
-
1
)
)
-
v_load
(
px
+
16
*
MAX
(
luc
[
c
][
k
]
-
2
*
r
-
1
,
0
));
v_fineh
+=
v_load
(
px
+
16
*
MIN
(
luc
[
c
][
k
],
n
-
1
)
+
8
)
-
v_load
(
px
+
16
*
MAX
(
luc
[
c
][
k
]
-
2
*
r
-
1
,
0
)
+
8
);
v_finel
=
v_finel
+
v_load
(
px
+
16
*
MIN
(
luc
[
c
][
k
],
n
-
1
)
)
-
v_load
(
px
+
16
*
MAX
(
luc
[
c
][
k
]
-
2
*
r
-
1
,
0
));
v_fineh
=
v_fineh
+
v_load
(
px
+
16
*
MIN
(
luc
[
c
][
k
],
n
-
1
)
+
8
)
-
v_load
(
px
+
16
*
MAX
(
luc
[
c
][
k
]
-
2
*
r
-
1
,
0
)
+
8
);
#else
for
(
int
ind
=
0
;
ind
<
16
;
++
ind
)
H
[
c
].
fine
[
k
][
ind
]
+=
px
[
16
*
MIN
(
luc
[
c
][
k
],
n
-
1
)
+
ind
]
-
px
[
16
*
MAX
(
luc
[
c
][
k
]
-
2
*
r
-
1
,
0
)
+
ind
];
...
...
@@ -321,11 +321,11 @@ medianBlur_8u_O1( const Mat& _src, Mat& _dst, int ksize )
CV_Assert
(
b
<
16
);
}
}
}
#if CV_SIMD
vx_cleanup
();
#endif
}
}
#undef HOP
#undef COP
...
...
modules/imgproc/test/test_filter.cpp
View file @
3d5cebb3
...
...
@@ -2200,4 +2200,15 @@ TEST(Imgproc_Filter2D, dftFilter2d_regression_10683)
EXPECT_LE
(
cvtest
::
norm
(
dst
,
expected
,
NORM_INF
),
2
);
}
TEST
(
Imgproc_MedianBlur
,
hires_regression_13409
)
{
Mat
src
(
2048
,
2048
,
CV_8UC1
),
dst_hires
,
dst_ref
;
randu
(
src
,
0
,
256
);
medianBlur
(
src
,
dst_hires
,
9
);
medianBlur
(
src
(
Rect
(
512
,
512
,
1024
,
1024
)),
dst_ref
,
9
);
ASSERT_EQ
(
0.0
,
cvtest
::
norm
(
dst_hires
(
Rect
(
516
,
516
,
1016
,
1016
)),
dst_ref
(
Rect
(
4
,
4
,
1016
,
1016
)),
NORM_INF
));
}
}}
// namespace
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