Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenCV
opencv
提交
a0cf8c32
O
opencv
项目概览
OpenCV
/
opencv
上一次同步 大约 1 年
通知
1005
Star
71102
Fork
55580
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
opencv
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a0cf8c32
编写于
10月 01, 2021
作者:
A
Alexander Alekhin
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #20793 from tomoaki0705:fixGaussianOverflow
上级
4d587c34
1e74f585
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
17 addition
and
3 deletion
+17
-3
modules/cudafilters/test/test_filters.cpp
modules/cudafilters/test/test_filters.cpp
+2
-2
modules/imgproc/src/smooth.simd.hpp
modules/imgproc/src/smooth.simd.hpp
+4
-1
modules/imgproc/test/test_smooth_bitexact.cpp
modules/imgproc/test/test_smooth_bitexact.cpp
+11
-0
未找到文件。
modules/cudafilters/test/test_filters.cpp
浏览文件 @
a0cf8c32
...
...
@@ -445,8 +445,8 @@ PARAM_TEST_CASE(GaussianBlur, cv::cuda::DeviceInfo, cv::Size, MatDepth, Channels
CUDA_TEST_P
(
GaussianBlur
,
Accuracy
)
{
cv
::
Mat
src
=
randomMat
(
size
,
type
);
double
sigma1
=
randomDouble
(
0.
1
,
1.0
);
double
sigma2
=
randomDouble
(
0.
1
,
1.0
);
double
sigma1
=
randomDouble
(
0.
0
,
1.0
);
double
sigma2
=
randomDouble
(
0.
0
,
1.0
);
cv
::
Ptr
<
cv
::
cuda
::
Filter
>
gauss
=
cv
::
cuda
::
createGaussianFilter
(
src
.
type
(),
-
1
,
ksize
,
sigma1
,
sigma2
,
borderType
);
...
...
modules/imgproc/src/smooth.simd.hpp
浏览文件 @
a0cf8c32
...
...
@@ -1958,6 +1958,9 @@ public:
}
else
if
(
kxlen
%
2
==
1
)
{
if
(
kx
[(
kxlen
-
1
)
/
2
]
==
FT
::
one
())
hlineSmoothFunc
=
hlineSmooth1N1
;
else
hlineSmoothFunc
=
hlineSmoothONa_yzy_a
;
for
(
int
i
=
0
;
i
<
kxlen
/
2
;
i
++
)
if
(
!
(
kx
[
i
]
==
kx
[
kxlen
-
1
-
i
]))
...
...
modules/imgproc/test/test_smooth_bitexact.cpp
浏览文件 @
a0cf8c32
...
...
@@ -249,4 +249,15 @@ TEST(GaussianBlur_Bitexact, regression_9863)
checkGaussianBlur_8Uvs32F
(
src8u
,
src32f
,
151
,
30
);
}
TEST
(
GaussianBlur_Bitexact
,
overflow_20792
)
{
Mat
src
(
128
,
128
,
CV_16UC1
,
Scalar
(
255
));
Mat
dst
;
double
sigma
=
theRNG
().
uniform
(
0.0
,
0.2
);
// a peaky kernel
GaussianBlur
(
src
,
dst
,
Size
(
7
,
7
),
sigma
,
0.9
);
int
count
=
(
int
)
countNonZero
(
dst
);
int
nintyPercent
=
(
int
)(
src
.
rows
*
src
.
cols
*
0.9
);
EXPECT_GT
(
count
,
nintyPercent
);
}
}}
// namespace
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录