Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
ad7f2311
O
Opencv
项目概览
Greenplum
/
Opencv
大约 1 年 前同步成功
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
Opencv
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ad7f2311
编写于
4月 12, 2014
作者:
I
Ilya Lavrenov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
cv::Laplacian
上级
5522c14e
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
65 addition
and
0 deletion
+65
-0
modules/core/include/opencv2/core/private.hpp
modules/core/include/opencv2/core/private.hpp
+9
-0
modules/imgproc/src/deriv.cpp
modules/imgproc/src/deriv.cpp
+56
-0
未找到文件。
modules/core/include/opencv2/core/private.hpp
浏览文件 @
ad7f2311
...
...
@@ -230,6 +230,15 @@ static inline IppiSize ippiSize(const cv::Size & _size)
return
size
;
}
static
inline
IppiBorderType
ippiGetBorderType
(
int
borderTypeNI
)
{
return
borderTypeNI
==
cv
::
BORDER_CONSTANT
?
ippBorderConst
:
borderTypeNI
==
cv
::
BORDER_WRAP
?
ippBorderWrap
:
borderTypeNI
==
cv
::
BORDER_REPLICATE
?
ippBorderRepl
:
borderTypeNI
==
cv
::
BORDER_REFLECT_101
?
ippBorderMirror
:
borderTypeNI
==
cv
::
BORDER_REFLECT
?
ippBorderMirrorR
:
(
IppiBorderType
)
-
1
;
}
#else
# define IPP_VERSION_X100 0
#endif
...
...
modules/imgproc/src/deriv.cpp
浏览文件 @
ad7f2311
...
...
@@ -577,6 +577,62 @@ void cv::Laplacian( InputArray _src, OutputArray _dst, int ddepth, int ksize,
ddepth
=
sdepth
;
_dst
.
create
(
_src
.
size
(),
CV_MAKETYPE
(
ddepth
,
cn
)
);
#if defined HAVE_IPP && !defined HAVE_IPP_ICV_ONLY
if
((
ksize
==
3
||
ksize
==
5
)
&&
((
borderType
&
BORDER_ISOLATED
)
!=
0
||
!
_src
.
isSubmatrix
())
&&
((
stype
==
CV_8UC1
&&
ddepth
==
CV_16S
)
||
(
ddepth
==
CV_32F
&&
stype
==
CV_32FC1
)))
{
int
iscale
=
saturate_cast
<
int
>
(
scale
),
idelta
=
saturate_cast
<
int
>
(
delta
);
bool
floatScale
=
std
::
fabs
(
scale
-
iscale
)
>
DBL_EPSILON
,
needScale
=
iscale
!=
1
;
bool
floatDelta
=
std
::
fabs
(
delta
-
idelta
)
>
DBL_EPSILON
,
needDelta
=
delta
!=
0
;
int
borderTypeNI
=
borderType
&
~
BORDER_ISOLATED
;
Mat
src
=
_src
.
getMat
(),
dst
=
_dst
.
getMat
();
if
(
src
.
data
!=
dst
.
data
)
{
Ipp32s
bufsize
;
IppStatus
status
=
(
IppStatus
)
-
1
;
IppiSize
roisize
=
{
src
.
cols
,
src
.
rows
};
IppiMaskSize
masksize
=
ksize
==
3
?
ippMskSize3x3
:
ippMskSize5x5
;
IppiBorderType
borderTypeIpp
=
ippiGetBorderType
(
borderTypeNI
);
#define IPP_FILTER_LAPLACIAN(ippsrctype, ippdsttype, ippfavor) \
do \
{ \
if (borderTypeIpp >= 0 && ippiFilterLaplacianGetBufferSize_##ippfavor##_C1R(roisize, masksize, &bufsize) >= 0) \
{ \
Ipp8u * buffer = ippsMalloc_8u(bufsize); \
status = ippiFilterLaplacianBorder_##ippfavor##_C1R((const ippsrctype *)src.data, (int)src.step, (ippdsttype *)dst.data, \
(int)dst.step, roisize, masksize, borderTypeIpp, 0, buffer); \
ippsFree(buffer); \
} \
} while ((void)0, 0)
if
(
sdepth
==
CV_8U
&&
ddepth
==
CV_16S
&&
!
floatScale
&&
!
floatDelta
)
{
IPP_FILTER_LAPLACIAN
(
Ipp8u
,
Ipp16s
,
8u
16s
);
if
(
needScale
&&
status
>=
0
)
status
=
ippiMulC_16s_C1IRSfs
((
Ipp16s
)
iscale
,
(
Ipp16s
*
)
dst
.
data
,
(
int
)
dst
.
step
,
roisize
,
0
);
if
(
needDelta
&&
status
>=
0
)
status
=
ippiAddC_16s_C1IRSfs
((
Ipp16s
)
idelta
,
(
Ipp16s
*
)
dst
.
data
,
(
int
)
dst
.
step
,
roisize
,
0
);
}
else
if
(
sdepth
==
CV_32F
&&
ddepth
==
CV_32F
)
{
IPP_FILTER_LAPLACIAN
(
Ipp32f
,
Ipp32f
,
32
f
);
if
(
needScale
&&
status
>=
0
)
status
=
ippiMulC_32f_C1IR
((
Ipp32f
)
scale
,
(
Ipp32f
*
)
dst
.
data
,
(
int
)
dst
.
step
,
roisize
);
if
(
needDelta
&&
status
>=
0
)
status
=
ippiAddC_32f_C1IR
((
Ipp32f
)
delta
,
(
Ipp32f
*
)
dst
.
data
,
(
int
)
dst
.
step
,
roisize
);
}
if
(
status
>=
0
)
return
;
}
}
#undef IPP_FILTER_LAPLACIAN
#endif
#ifdef HAVE_TEGRA_OPTIMIZATION
if
(
scale
==
1.0
&&
delta
==
0
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录