Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
9fff7896
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,发现更多精彩内容 >>
提交
9fff7896
编写于
3月 23, 2015
作者:
E
Erik Karlsson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Removed fastNlMeansDenoisingColored[Multi]Abs
上级
82c54104
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
1 addition
and
369 deletion
+1
-369
modules/photo/include/opencv2/photo.hpp
modules/photo/include/opencv2/photo.hpp
+1
-117
modules/photo/src/denoising.cpp
modules/photo/src/denoising.cpp
+0
-218
modules/photo/test/ocl/test_denoising.cpp
modules/photo/test/ocl/test_denoising.cpp
+0
-34
未找到文件。
modules/photo/include/opencv2/photo.hpp
浏览文件 @
9fff7896
...
...
@@ -160,63 +160,10 @@ image in different colorspaces. Such approach is used in fastNlMeansDenoisingCol
image to CIELAB colorspace and then separately denoise L and AB components with different h
parameter.
*/
CV_EXPORTS_W
void
fastNlMeansDenoising
(
InputArray
src
,
OutputArray
dst
,
CV_EXPORTS_W
void
fastNlMeansDenoising
(
InputArray
src
,
OutputArray
dst
,
const
std
::
vector
<
float
>&
h
,
int
templateWindowSize
=
7
,
int
searchWindowSize
=
21
);
/** @brief Perform image denoising using Non-local Means Denoising
algorithm <http://www.ipol.im/pub/algo/bcm_non_local_means_denoising/>
with several computational optimizations. Noise expected to be a
gaussian white noise. Uses squared sum of absolute value distances
instead of sum of squared distances for weight calculation
@param src Input 8-bit or 16-bit 1-channel, 2-channel, 3-channel or 4-channel image.
@param dst Output image with the same size and type as src .
@param templateWindowSize Size in pixels of the template patch that is used to compute weights.
Should be odd. Recommended value 7 pixels
@param searchWindowSize Size in pixels of the window that is used to compute weighted average for
given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater
denoising time. Recommended value 21 pixels
@param h Parameter regulating filter strength. Big h value perfectly removes noise but also
removes image details, smaller h value preserves details but also preserves some noise
This function expected to be applied to grayscale images. For colored images look at
fastNlMeansDenoisingColored. Advanced usage of this functions can be manual denoising of colored
image in different colorspaces. Such approach is used in fastNlMeansDenoisingColored by converting
image to CIELAB colorspace and then separately denoise L and AB components with different h
parameter.
*/
CV_EXPORTS_W
void
fastNlMeansDenoisingAbs
(
InputArray
src
,
OutputArray
dst
,
float
h
=
3
,
int
templateWindowSize
=
7
,
int
searchWindowSize
=
21
);
/** @brief Perform image denoising using Non-local Means Denoising
algorithm <http://www.ipol.im/pub/algo/bcm_non_local_means_denoising/>
with several computational optimizations. Noise expected to be a
gaussian white noise. Uses squared sum of absolute value distances
instead of sum of squared distances for weight calculation
@param src Input 8-bit or 16-bit 1-channel, 2-channel, 3-channel or 4-channel image.
@param dst Output image with the same size and type as src .
@param templateWindowSize Size in pixels of the template patch that is used to compute weights.
Should be odd. Recommended value 7 pixels
@param searchWindowSize Size in pixels of the window that is used to compute weighted average for
given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater
denoising time. Recommended value 21 pixels
@param h Array of parameters regulating filter strength, either one
parameter applied to all channels or one per channel in dst. Big h value
perfectly removes noise but also removes image details, smaller h
value preserves details but also preserves some noise
This function expected to be applied to grayscale images. For colored images look at
fastNlMeansDenoisingColored. Advanced usage of this functions can be manual denoising of colored
image in different colorspaces. Such approach is used in fastNlMeansDenoisingColored by converting
image to CIELAB colorspace and then separately denoise L and AB components with different h
parameter.
*/
CV_EXPORTS_W
void
fastNlMeansDenoisingAbs
(
InputArray
src
,
OutputArray
dst
,
const
std
::
vector
<
float
>&
h
,
int
templateWindowSize
=
7
,
int
searchWindowSize
=
21
);
/** @brief Modification of fastNlMeansDenoising function for colored images
@param src Input 8-bit 3-channel image.
...
...
@@ -294,69 +241,6 @@ CV_EXPORTS_W void fastNlMeansDenoisingMulti( InputArrayOfArrays srcImgs, OutputA
int
imgToDenoiseIndex
,
int
temporalWindowSize
,
const
std
::
vector
<
float
>&
h
,
int
templateWindowSize
=
7
,
int
searchWindowSize
=
21
);
/** @brief Modification of fastNlMeansDenoising function for images
sequence where consequtive images have been captured in small period
of time. For example video. This version of the function is for
grayscale images or for manual manipulation with colorspaces. For more
details see
<http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.131.6394>. Uses
squared sum of absolute value distances instead of sum of squared
distances for weight calculation
@param srcImgs Input 8-bit or 16-bit 1-channel, 2-channel, 3-channel
or 4-channel images sequence. All images should have the same type and
size.
@param imgToDenoiseIndex Target image to denoise index in srcImgs sequence
@param temporalWindowSize Number of surrounding images to use for target image denoising. Should
be odd. Images from imgToDenoiseIndex - temporalWindowSize / 2 to
imgToDenoiseIndex - temporalWindowSize / 2 from srcImgs will be used to denoise
srcImgs[imgToDenoiseIndex] image.
@param dst Output image with the same size and type as srcImgs images.
@param templateWindowSize Size in pixels of the template patch that is used to compute weights.
Should be odd. Recommended value 7 pixels
@param searchWindowSize Size in pixels of the window that is used to compute weighted average for
given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater
denoising time. Recommended value 21 pixels
@param h Parameter regulating filter strength. Bigger h value
perfectly removes noise but also removes image details, smaller h
value preserves details but also preserves some noise
*/
CV_EXPORTS_W
void
fastNlMeansDenoisingMultiAbs
(
InputArrayOfArrays
srcImgs
,
OutputArray
dst
,
int
imgToDenoiseIndex
,
int
temporalWindowSize
,
float
h
=
3
,
int
templateWindowSize
=
7
,
int
searchWindowSize
=
21
);
/** @brief Modification of fastNlMeansDenoising function for images
sequence where consequtive images have been captured in small period
of time. For example video. This version of the function is for
grayscale images or for manual manipulation with colorspaces. For more
details see
<http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.131.6394>. Uses
squared sum of absolute value distances instead of sum of squared
distances for weight calculation
@param srcImgs Input 8-bit or 16-bit 1-channel, 2-channel, 3-channel
or 4-channel images sequence. All images should have the same type and
size.
@param imgToDenoiseIndex Target image to denoise index in srcImgs sequence
@param temporalWindowSize Number of surrounding images to use for target image denoising. Should
be odd. Images from imgToDenoiseIndex - temporalWindowSize / 2 to
imgToDenoiseIndex - temporalWindowSize / 2 from srcImgs will be used to denoise
srcImgs[imgToDenoiseIndex] image.
@param dst Output image with the same size and type as srcImgs images.
@param templateWindowSize Size in pixels of the template patch that is used to compute weights.
Should be odd. Recommended value 7 pixels
@param searchWindowSize Size in pixels of the window that is used to compute weighted average for
given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater
denoising time. Recommended value 21 pixels
@param h Array of parameters regulating filter strength, either one
parameter applied to all channels or one per channel in dst. Big h value
perfectly removes noise but also removes image details, smaller h
value preserves details but also preserves some noise
*/
CV_EXPORTS_W
void
fastNlMeansDenoisingMultiAbs
(
InputArrayOfArrays
srcImgs
,
OutputArray
dst
,
int
imgToDenoiseIndex
,
int
temporalWindowSize
,
const
std
::
vector
<
float
>&
h
,
int
templateWindowSize
=
7
,
int
searchWindowSize
=
21
);
/** @brief Modification of fastNlMeansDenoisingMulti function for colored images sequences
@param srcImgs Input 8-bit 3-channel images sequence. All images should have the same type and
...
...
modules/photo/src/denoising.cpp
浏览文件 @
9fff7896
...
...
@@ -116,106 +116,6 @@ void cv::fastNlMeansDenoising( InputArray _src, OutputArray _dst, const std::vec
}
}
void
cv
::
fastNlMeansDenoisingAbs
(
InputArray
_src
,
OutputArray
_dst
,
float
h
,
int
templateWindowSize
,
int
searchWindowSize
)
{
fastNlMeansDenoisingAbs
(
_src
,
_dst
,
std
::
vector
<
float
>
(
1
,
h
),
templateWindowSize
,
searchWindowSize
);
}
void
cv
::
fastNlMeansDenoisingAbs
(
InputArray
_src
,
OutputArray
_dst
,
const
std
::
vector
<
float
>&
h
,
int
templateWindowSize
,
int
searchWindowSize
)
{
int
hn
=
(
int
)
h
.
size
();
CV_Assert
(
hn
==
1
||
hn
==
CV_MAT_CN
(
_src
.
type
()));
Size
src_size
=
_src
.
size
();
CV_OCL_RUN
(
_src
.
dims
()
<=
2
&&
(
_src
.
isUMat
()
||
_dst
.
isUMat
())
&&
src_size
.
width
>
5
&&
src_size
.
height
>
5
,
// low accuracy on small sizes
ocl_fastNlMeansDenoising
(
_src
,
_dst
,
&
h
[
0
],
hn
,
templateWindowSize
,
searchWindowSize
,
true
))
Mat
src
=
_src
.
getMat
();
_dst
.
create
(
src_size
,
src
.
type
());
Mat
dst
=
_dst
.
getMat
();
switch
(
src
.
type
())
{
case
CV_8U
:
parallel_for_
(
cv
::
Range
(
0
,
src
.
rows
),
FastNlMeansDenoisingInvoker
<
uchar
,
int
,
unsigned
,
DistAbs
,
int
>
(
src
,
dst
,
templateWindowSize
,
searchWindowSize
,
&
h
[
0
]));
break
;
case
CV_8UC2
:
if
(
hn
==
1
)
parallel_for_
(
cv
::
Range
(
0
,
src
.
rows
),
FastNlMeansDenoisingInvoker
<
Vec2b
,
int
,
unsigned
,
DistAbs
,
int
>
(
src
,
dst
,
templateWindowSize
,
searchWindowSize
,
&
h
[
0
]));
else
parallel_for_
(
cv
::
Range
(
0
,
src
.
rows
),
FastNlMeansDenoisingInvoker
<
Vec2b
,
int
,
unsigned
,
DistAbs
,
Vec2i
>
(
src
,
dst
,
templateWindowSize
,
searchWindowSize
,
&
h
[
0
]));
break
;
case
CV_8UC3
:
if
(
hn
==
1
)
parallel_for_
(
cv
::
Range
(
0
,
src
.
rows
),
FastNlMeansDenoisingInvoker
<
Vec3b
,
int
,
unsigned
,
DistAbs
,
int
>
(
src
,
dst
,
templateWindowSize
,
searchWindowSize
,
&
h
[
0
]));
else
parallel_for_
(
cv
::
Range
(
0
,
src
.
rows
),
FastNlMeansDenoisingInvoker
<
Vec3b
,
int
,
unsigned
,
DistAbs
,
Vec3i
>
(
src
,
dst
,
templateWindowSize
,
searchWindowSize
,
&
h
[
0
]));
break
;
case
CV_8UC4
:
if
(
hn
==
1
)
parallel_for_
(
cv
::
Range
(
0
,
src
.
rows
),
FastNlMeansDenoisingInvoker
<
Vec4b
,
int
,
unsigned
,
DistAbs
,
int
>
(
src
,
dst
,
templateWindowSize
,
searchWindowSize
,
&
h
[
0
]));
else
parallel_for_
(
cv
::
Range
(
0
,
src
.
rows
),
FastNlMeansDenoisingInvoker
<
Vec4b
,
int
,
unsigned
,
DistAbs
,
Vec4i
>
(
src
,
dst
,
templateWindowSize
,
searchWindowSize
,
&
h
[
0
]));
break
;
case
CV_16U
:
parallel_for_
(
cv
::
Range
(
0
,
src
.
rows
),
FastNlMeansDenoisingInvoker
<
ushort
,
int64
,
uint64
,
DistAbs
,
int
>
(
src
,
dst
,
templateWindowSize
,
searchWindowSize
,
&
h
[
0
]));
break
;
case
CV_16UC2
:
if
(
hn
==
1
)
parallel_for_
(
cv
::
Range
(
0
,
src
.
rows
),
FastNlMeansDenoisingInvoker
<
Vec
<
ushort
,
2
>
,
int64
,
uint64
,
DistAbs
,
int
>
(
src
,
dst
,
templateWindowSize
,
searchWindowSize
,
&
h
[
0
]));
else
parallel_for_
(
cv
::
Range
(
0
,
src
.
rows
),
FastNlMeansDenoisingInvoker
<
Vec
<
ushort
,
2
>
,
int64
,
uint64
,
DistAbs
,
Vec2i
>
(
src
,
dst
,
templateWindowSize
,
searchWindowSize
,
&
h
[
0
]));
break
;
case
CV_16UC3
:
if
(
hn
==
1
)
parallel_for_
(
cv
::
Range
(
0
,
src
.
rows
),
FastNlMeansDenoisingInvoker
<
Vec
<
ushort
,
3
>
,
int64
,
uint64
,
DistAbs
,
int
>
(
src
,
dst
,
templateWindowSize
,
searchWindowSize
,
&
h
[
0
]));
else
parallel_for_
(
cv
::
Range
(
0
,
src
.
rows
),
FastNlMeansDenoisingInvoker
<
Vec
<
ushort
,
3
>
,
int64
,
uint64
,
DistAbs
,
Vec3i
>
(
src
,
dst
,
templateWindowSize
,
searchWindowSize
,
&
h
[
0
]));
break
;
case
CV_16UC4
:
if
(
hn
==
1
)
parallel_for_
(
cv
::
Range
(
0
,
src
.
rows
),
FastNlMeansDenoisingInvoker
<
Vec
<
ushort
,
4
>
,
int64
,
uint64
,
DistAbs
,
int
>
(
src
,
dst
,
templateWindowSize
,
searchWindowSize
,
&
h
[
0
]));
else
parallel_for_
(
cv
::
Range
(
0
,
src
.
rows
),
FastNlMeansDenoisingInvoker
<
Vec
<
ushort
,
4
>
,
int64
,
uint64
,
DistAbs
,
Vec4i
>
(
src
,
dst
,
templateWindowSize
,
searchWindowSize
,
&
h
[
0
]));
break
;
default:
CV_Error
(
Error
::
StsBadArg
,
"Unsupported image format! Only CV_8U, CV_8UC2, CV_8UC3, CV_8UC4, CV_16U, CV_16UC2, CV_16UC3 and CV_16UC4 are supported"
);
}
}
void
cv
::
fastNlMeansDenoisingColored
(
InputArray
_src
,
OutputArray
_dst
,
float
h
,
float
hForColorComponents
,
int
templateWindowSize
,
int
searchWindowSize
)
...
...
@@ -365,124 +265,6 @@ void cv::fastNlMeansDenoisingMulti( InputArrayOfArrays _srcImgs, OutputArray _ds
}
}
void
cv
::
fastNlMeansDenoisingMultiAbs
(
InputArrayOfArrays
_srcImgs
,
OutputArray
_dst
,
int
imgToDenoiseIndex
,
int
temporalWindowSize
,
float
h
,
int
templateWindowSize
,
int
searchWindowSize
)
{
fastNlMeansDenoisingMulti
(
_srcImgs
,
_dst
,
imgToDenoiseIndex
,
temporalWindowSize
,
std
::
vector
<
float
>
(
1
,
h
),
templateWindowSize
,
searchWindowSize
);
}
void
cv
::
fastNlMeansDenoisingMultiAbs
(
InputArrayOfArrays
_srcImgs
,
OutputArray
_dst
,
int
imgToDenoiseIndex
,
int
temporalWindowSize
,
const
std
::
vector
<
float
>&
h
,
int
templateWindowSize
,
int
searchWindowSize
)
{
std
::
vector
<
Mat
>
srcImgs
;
_srcImgs
.
getMatVector
(
srcImgs
);
fastNlMeansDenoisingMultiCheckPreconditions
(
srcImgs
,
imgToDenoiseIndex
,
temporalWindowSize
,
templateWindowSize
,
searchWindowSize
);
int
hn
=
(
int
)
h
.
size
();
CV_Assert
(
hn
==
1
||
hn
==
CV_MAT_CN
(
srcImgs
[
0
].
type
()));
_dst
.
create
(
srcImgs
[
0
].
size
(),
srcImgs
[
0
].
type
());
Mat
dst
=
_dst
.
getMat
();
switch
(
srcImgs
[
0
].
type
())
{
case
CV_8U
:
parallel_for_
(
cv
::
Range
(
0
,
srcImgs
[
0
].
rows
),
FastNlMeansMultiDenoisingInvoker
<
uchar
,
int
,
unsigned
,
DistAbs
,
int
>
(
srcImgs
,
imgToDenoiseIndex
,
temporalWindowSize
,
dst
,
templateWindowSize
,
searchWindowSize
,
&
h
[
0
]));
break
;
case
CV_8UC2
:
if
(
hn
==
1
)
parallel_for_
(
cv
::
Range
(
0
,
srcImgs
[
0
].
rows
),
FastNlMeansMultiDenoisingInvoker
<
Vec2b
,
int
,
unsigned
,
DistAbs
,
int
>
(
srcImgs
,
imgToDenoiseIndex
,
temporalWindowSize
,
dst
,
templateWindowSize
,
searchWindowSize
,
&
h
[
0
]));
else
parallel_for_
(
cv
::
Range
(
0
,
srcImgs
[
0
].
rows
),
FastNlMeansMultiDenoisingInvoker
<
Vec2b
,
int
,
unsigned
,
DistAbs
,
Vec2i
>
(
srcImgs
,
imgToDenoiseIndex
,
temporalWindowSize
,
dst
,
templateWindowSize
,
searchWindowSize
,
&
h
[
0
]));
break
;
case
CV_8UC3
:
if
(
hn
==
1
)
parallel_for_
(
cv
::
Range
(
0
,
srcImgs
[
0
].
rows
),
FastNlMeansMultiDenoisingInvoker
<
Vec3b
,
int
,
unsigned
,
DistAbs
,
int
>
(
srcImgs
,
imgToDenoiseIndex
,
temporalWindowSize
,
dst
,
templateWindowSize
,
searchWindowSize
,
&
h
[
0
]));
else
parallel_for_
(
cv
::
Range
(
0
,
srcImgs
[
0
].
rows
),
FastNlMeansMultiDenoisingInvoker
<
Vec3b
,
int
,
unsigned
,
DistAbs
,
Vec3i
>
(
srcImgs
,
imgToDenoiseIndex
,
temporalWindowSize
,
dst
,
templateWindowSize
,
searchWindowSize
,
&
h
[
0
]));
break
;
case
CV_8UC4
:
if
(
hn
==
1
)
parallel_for_
(
cv
::
Range
(
0
,
srcImgs
[
0
].
rows
),
FastNlMeansMultiDenoisingInvoker
<
Vec4b
,
int
,
unsigned
,
DistAbs
,
int
>
(
srcImgs
,
imgToDenoiseIndex
,
temporalWindowSize
,
dst
,
templateWindowSize
,
searchWindowSize
,
&
h
[
0
]));
else
parallel_for_
(
cv
::
Range
(
0
,
srcImgs
[
0
].
rows
),
FastNlMeansMultiDenoisingInvoker
<
Vec4b
,
int
,
unsigned
,
DistAbs
,
Vec4i
>
(
srcImgs
,
imgToDenoiseIndex
,
temporalWindowSize
,
dst
,
templateWindowSize
,
searchWindowSize
,
&
h
[
0
]));
break
;
case
CV_16U
:
parallel_for_
(
cv
::
Range
(
0
,
srcImgs
[
0
].
rows
),
FastNlMeansMultiDenoisingInvoker
<
ushort
,
int64
,
uint64
,
DistAbs
,
int
>
(
srcImgs
,
imgToDenoiseIndex
,
temporalWindowSize
,
dst
,
templateWindowSize
,
searchWindowSize
,
&
h
[
0
]));
break
;
case
CV_16UC2
:
if
(
hn
==
1
)
parallel_for_
(
cv
::
Range
(
0
,
srcImgs
[
0
].
rows
),
FastNlMeansMultiDenoisingInvoker
<
Vec
<
ushort
,
2
>
,
int64
,
uint64
,
DistAbs
,
int
>
(
srcImgs
,
imgToDenoiseIndex
,
temporalWindowSize
,
dst
,
templateWindowSize
,
searchWindowSize
,
&
h
[
0
]));
else
parallel_for_
(
cv
::
Range
(
0
,
srcImgs
[
0
].
rows
),
FastNlMeansMultiDenoisingInvoker
<
Vec
<
ushort
,
2
>
,
int64
,
uint64
,
DistAbs
,
Vec2i
>
(
srcImgs
,
imgToDenoiseIndex
,
temporalWindowSize
,
dst
,
templateWindowSize
,
searchWindowSize
,
&
h
[
0
]));
break
;
case
CV_16UC3
:
if
(
hn
==
1
)
parallel_for_
(
cv
::
Range
(
0
,
srcImgs
[
0
].
rows
),
FastNlMeansMultiDenoisingInvoker
<
Vec
<
ushort
,
3
>
,
int64
,
uint64
,
DistAbs
,
int
>
(
srcImgs
,
imgToDenoiseIndex
,
temporalWindowSize
,
dst
,
templateWindowSize
,
searchWindowSize
,
&
h
[
0
]));
else
parallel_for_
(
cv
::
Range
(
0
,
srcImgs
[
0
].
rows
),
FastNlMeansMultiDenoisingInvoker
<
Vec
<
ushort
,
3
>
,
int64
,
uint64
,
DistAbs
,
Vec3i
>
(
srcImgs
,
imgToDenoiseIndex
,
temporalWindowSize
,
dst
,
templateWindowSize
,
searchWindowSize
,
&
h
[
0
]));
break
;
case
CV_16UC4
:
if
(
hn
==
1
)
parallel_for_
(
cv
::
Range
(
0
,
srcImgs
[
0
].
rows
),
FastNlMeansMultiDenoisingInvoker
<
Vec
<
ushort
,
4
>
,
int64
,
uint64
,
DistAbs
,
int
>
(
srcImgs
,
imgToDenoiseIndex
,
temporalWindowSize
,
dst
,
templateWindowSize
,
searchWindowSize
,
&
h
[
0
]));
else
parallel_for_
(
cv
::
Range
(
0
,
srcImgs
[
0
].
rows
),
FastNlMeansMultiDenoisingInvoker
<
Vec
<
ushort
,
4
>
,
int64
,
uint64
,
DistAbs
,
Vec4i
>
(
srcImgs
,
imgToDenoiseIndex
,
temporalWindowSize
,
dst
,
templateWindowSize
,
searchWindowSize
,
&
h
[
0
]));
break
;
default:
CV_Error
(
Error
::
StsBadArg
,
"Unsupported image format! Only CV_8U, CV_8UC2, CV_8UC3, CV_8UC4, CV_16U, CV_16UC2, CV_16UC3 and CV_16UC4 are supported"
);
}
}
void
cv
::
fastNlMeansDenoisingColoredMulti
(
InputArrayOfArrays
_srcImgs
,
OutputArray
_dst
,
int
imgToDenoiseIndex
,
int
temporalWindowSize
,
float
h
,
float
hForColorComponents
,
...
...
modules/photo/test/ocl/test_denoising.cpp
浏览文件 @
9fff7896
...
...
@@ -103,36 +103,6 @@ OCL_TEST_P(FastNlMeansDenoising_hsep, Mat)
}
}
typedef
FastNlMeansDenoisingTestBase
FastNlMeansDenoisingAbs
;
OCL_TEST_P
(
FastNlMeansDenoisingAbs
,
Mat
)
{
for
(
int
j
=
0
;
j
<
test_loop_times
;
j
++
)
{
generateTestData
();
OCL_OFF
(
cv
::
fastNlMeansDenoisingAbs
(
src_roi
,
dst_roi
,
h
[
0
],
templateWindowSize
,
searchWindowSize
));
OCL_ON
(
cv
::
fastNlMeansDenoisingAbs
(
usrc_roi
,
udst_roi
,
h
[
0
],
templateWindowSize
,
searchWindowSize
));
OCL_EXPECT_MATS_NEAR
(
dst
,
1
);
}
}
typedef
FastNlMeansDenoisingTestBase
FastNlMeansDenoisingAbs_hsep
;
OCL_TEST_P
(
FastNlMeansDenoisingAbs_hsep
,
Mat
)
{
for
(
int
j
=
0
;
j
<
test_loop_times
;
j
++
)
{
generateTestData
();
OCL_OFF
(
cv
::
fastNlMeansDenoisingAbs
(
src_roi
,
dst_roi
,
h
,
templateWindowSize
,
searchWindowSize
));
OCL_ON
(
cv
::
fastNlMeansDenoisingAbs
(
usrc_roi
,
udst_roi
,
h
,
templateWindowSize
,
searchWindowSize
));
OCL_EXPECT_MATS_NEAR
(
dst
,
1
);
}
}
typedef
FastNlMeansDenoisingTestBase
FastNlMeansDenoisingColored
;
OCL_TEST_P
(
FastNlMeansDenoisingColored
,
Mat
)
...
...
@@ -152,10 +122,6 @@ OCL_INSTANTIATE_TEST_CASE_P(Photo, FastNlMeansDenoising,
Combine
(
Values
(
1
,
2
,
3
,
4
),
Bool
(),
Values
(
true
)));
OCL_INSTANTIATE_TEST_CASE_P
(
Photo
,
FastNlMeansDenoising_hsep
,
Combine
(
Values
(
1
,
2
,
3
,
4
),
Bool
(),
Values
(
true
)));
OCL_INSTANTIATE_TEST_CASE_P
(
Photo
,
FastNlMeansDenoisingAbs
,
Combine
(
Values
(
1
,
2
,
3
,
4
),
Bool
(),
Values
(
true
)));
OCL_INSTANTIATE_TEST_CASE_P
(
Photo
,
FastNlMeansDenoisingAbs_hsep
,
Combine
(
Values
(
1
,
2
,
3
,
4
),
Bool
(),
Values
(
true
)));
OCL_INSTANTIATE_TEST_CASE_P
(
Photo
,
FastNlMeansDenoisingColored
,
Combine
(
Values
(
3
,
4
),
Bool
(),
Values
(
false
)));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录