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
c4448862
Commit
c4448862
authored
Mar 09, 2015
by
Erik Karlsson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed parameters of fastNlMeansDenoising[Multi][Abs] from float * to std::vector<float>
parent
21160137
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
22 deletions
+23
-22
photo.hpp
modules/photo/include/opencv2/photo.hpp
+20
-20
denoising.cpp
modules/photo/src/denoising.cpp
+0
-0
test_denoising.cpp
modules/photo/test/ocl/test_denoising.cpp
+3
-2
No files found.
modules/photo/include/opencv2/photo.hpp
View file @
c4448862
...
...
@@ -149,10 +149,10 @@ 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,
one per
channel. Big h value perfectly removes noise but also removes imag
e
details, smaller h value preserves details but also preserves some
noise
@param h Array of parameters regulating filter strength,
either one
parameter applied to all channels or one per channel in src. Big h valu
e
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
...
...
@@ -160,7 +160,7 @@ 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
,
float
*
h
,
CV_EXPORTS_W
void
fastNlMeansDenoising
(
InputArray
src
,
OutputArray
dst
,
std
::
vector
<
float
>
h
,
int
templateWindowSize
=
7
,
int
searchWindowSize
=
21
);
/** @brief Perform image denoising using Non-local Means Denoising
...
...
@@ -201,10 +201,10 @@ 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,
one per
channel. Big h value perfectly removes noise but also removes imag
e
details, smaller h value preserves details but also preserves some
noise
@param h Array of parameters regulating filter strength,
either one
parameter applied to all channels or one per channel in src. Big h valu
e
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
...
...
@@ -212,7 +212,7 @@ 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
fastNlMeansDenoisingAbs
(
InputArray
src
,
OutputArray
dst
,
float
*
h
,
CV_EXPORTS_W
void
fastNlMeansDenoisingAbs
(
InputArray
src
,
OutputArray
dst
,
std
::
vector
<
float
>
h
,
int
templateWindowSize
=
7
,
int
searchWindowSize
=
21
);
/** @brief Modification of fastNlMeansDenoising function for colored images
...
...
@@ -283,14 +283,14 @@ 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,
one for each
channel. Bigger h value perfectly removes noise but also removes imag
e
details, smaller h value preserves details but also preserves some
noise
@param h Array of parameters regulating filter strength,
either one
parameter applied to all channels or one per channel in src. Big h valu
e
perfectly removes noise but also removes image details, smaller h
value preserves details but also preserves some
noise
*/
CV_EXPORTS_W
void
fastNlMeansDenoisingMulti
(
InputArrayOfArrays
srcImgs
,
OutputArray
dst
,
int
imgToDenoiseIndex
,
int
temporalWindowSize
,
float
*
h
,
int
templateWindowSize
=
7
,
int
searchWindowSize
=
21
);
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
...
...
@@ -346,14 +346,14 @@ 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,
one for each
channel. Bigger h value perfectly removes noise but also removes imag
e
details, smaller h value preserves details but also preserves some
noise
@param h Array of parameters regulating filter strength,
either one
parameter applied to all channels or one per channel in src. Big h valu
e
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
,
int
templateWindowSize
=
7
,
int
searchWindowSize
=
21
);
std
::
vector
<
float
>
h
,
int
templateWindowSize
=
7
,
int
searchWindowSize
=
21
);
/** @brief Modification of fastNlMeansDenoisingMulti function for colored images sequences
...
...
modules/photo/src/denoising.cpp
View file @
c4448862
This diff is collapsed.
Click to expand it.
modules/photo/test/ocl/test_denoising.cpp
View file @
c4448862
...
...
@@ -16,7 +16,7 @@ namespace ocl {
PARAM_TEST_CASE
(
FastNlMeansDenoisingTestBase
,
Channels
,
bool
,
bool
)
{
int
cn
,
templateWindowSize
,
searchWindowSize
;
float
h
[
4
]
;
std
::
vector
<
float
>
h
;
bool
use_roi
,
use_image
;
TEST_DECLARE_INPUT_PARAMETER
(
src
);
...
...
@@ -31,7 +31,7 @@ PARAM_TEST_CASE(FastNlMeansDenoisingTestBase, Channels, bool, bool)
templateWindowSize
=
7
;
searchWindowSize
=
21
;
ASSERT_TRUE
(
cn
>
0
&&
cn
<=
4
);
h
.
resize
(
cn
);
for
(
int
i
=
0
;
i
<
cn
;
i
++
)
h
[
i
]
=
3.0
f
+
0.5
f
*
i
;
}
...
...
@@ -51,6 +51,7 @@ PARAM_TEST_CASE(FastNlMeansDenoisingTestBase, Channels, bool, bool)
Border
srcBorder
=
randomBorder
(
0
,
use_roi
?
MAX_VALUE
:
0
);
randomSubMat
(
src
,
src_roi
,
roiSize
,
srcBorder
,
type
,
0
,
255
);
if
(
use_image
)
{
ASSERT_TRUE
(
cn
>
0
&&
cn
<=
4
);
if
(
cn
==
2
)
{
int
from_to
[]
=
{
0
,
0
,
1
,
1
};
src_roi
.
create
(
roiSize
,
type
);
...
...
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