Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
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_contrib
Commits
b885d28c
Commit
b885d28c
authored
May 23, 2017
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed test failures; removed extra whitespaces
parent
7297f022
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
12 deletions
+11
-12
ximgproc.hpp
modules/ximgproc/include/opencv2/ximgproc.hpp
+7
-7
anisodiff.cpp
modules/ximgproc/src/anisodiff.cpp
+3
-4
test_anisodiff.cpp
modules/ximgproc/test/test_anisodiff.cpp
+1
-1
No files found.
modules/ximgproc/include/opencv2/ximgproc.hpp
View file @
b885d28c
...
...
@@ -123,19 +123,19 @@ The function transforms a binary blob image into a skeletized form using the tec
CV_EXPORTS_W
void
thinning
(
InputArray
src
,
OutputArray
dst
,
int
thinningType
=
THINNING_ZHANGSUEN
);
/** @brief Performs anisotropic diffusian on an image.
The function applies Perona-Malik anisotropic diffusion to an image. This is the solution to the partial differential equation:
\f[{\frac {\partial I}{\partial t}}={\mathrm {div}}\left(c(x,y,t)\nabla I\right)=\nabla c\cdot \nabla I+c(x,y,t)\Delta I\f]
Suggested functions for c(x,y,t) are:
\f[c\left(\|\nabla I\|\right)=e^{{-\left(\|\nabla I\|/K\right)^{2}}}\f]
or
\f[ c\left(\|\nabla I\|\right)={\frac {1}{1+\left({\frac {\|\nabla I\|}{K}}\right)^{2}}} \f]
@param src Grayscale Source image.
@param dst Destination image of the same size and the same number of channels as src .
@param alpha The amount of time to step forward by on each iteration (normally, it's between 0 and 1).
...
...
modules/ximgproc/src/anisodiff.cpp
View file @
b885d28c
...
...
@@ -169,7 +169,7 @@ public:
}
j
*=
3
;
#endif
for
(
;
j
<
cols
*
cn
;
j
+=
cn
)
{
int
c0
=
psrc0
[
j
],
c1
=
psrc0
[
j
+
1
],
c2
=
psrc0
[
j
+
2
];
...
...
@@ -192,7 +192,7 @@ public:
}
}
}
const
Mat
*
src
;
Mat
*
dst
;
const
float
*
exptab_
;
...
...
@@ -283,7 +283,7 @@ void anisotropicDiffusion(InputArray src_, OutputArray dst_, float alpha, float
ADBody
body
(
&
src
,
&
dst
,
exptab
,
alpha
);
parallel_for_
(
Range
(
0
,
rows
),
body
,
8
);
std
::
swap
(
temp0
,
temp1
);
std
::
swap
(
temp0x
,
temp1x
);
}
...
...
@@ -291,4 +291,3 @@ void anisotropicDiffusion(InputArray src_, OutputArray dst_, float alpha, float
}
}
modules/ximgproc/test/test_anisodiff.cpp
View file @
b885d28c
...
...
@@ -5,7 +5,7 @@ using namespace std;
TEST
(
ximgproc_AnisotropicDiffusion
,
regression
)
{
string
folder
=
string
(
cvtest
::
TS
::
ptr
()
->
get_data_path
())
+
"shared/"
;
string
folder
=
string
(
cvtest
::
TS
::
ptr
()
->
get_data_path
())
+
"
cv/
shared/"
;
string
original_path
=
folder
+
"fruits.png"
;
Mat
original
=
imread
(
original_path
,
IMREAD_COLOR
);
...
...
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