Commit b885d28c authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

fixed test failures; removed extra whitespaces

parent 7297f022
...@@ -123,19 +123,19 @@ The function transforms a binary blob image into a skeletized form using the tec ...@@ -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); CV_EXPORTS_W void thinning( InputArray src, OutputArray dst, int thinningType = THINNING_ZHANGSUEN);
/** @brief Performs anisotropic diffusian on an image. /** @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: 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] \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: Suggested functions for c(x,y,t) are:
\f[c\left(\|\nabla I\|\right)=e^{{-\left(\|\nabla I\|/K\right)^{2}}}\f] \f[c\left(\|\nabla I\|\right)=e^{{-\left(\|\nabla I\|/K\right)^{2}}}\f]
or or
\f[ c\left(\|\nabla I\|\right)={\frac {1}{1+\left({\frac {\|\nabla I\|}{K}}\right)^{2}}} \f] \f[ c\left(\|\nabla I\|\right)={\frac {1}{1+\left({\frac {\|\nabla I\|}{K}}\right)^{2}}} \f]
@param src Grayscale Source image. @param src Grayscale Source image.
@param dst Destination image of the same size and the same number of channels as src . @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). @param alpha The amount of time to step forward by on each iteration (normally, it's between 0 and 1).
......
...@@ -169,7 +169,7 @@ public: ...@@ -169,7 +169,7 @@ public:
} }
j *= 3; j *= 3;
#endif #endif
for( ; j < cols*cn; j += cn ) for( ; j < cols*cn; j += cn )
{ {
int c0 = psrc0[j], c1 = psrc0[j+1], c2 = psrc0[j+2]; int c0 = psrc0[j], c1 = psrc0[j+1], c2 = psrc0[j+2];
...@@ -192,7 +192,7 @@ public: ...@@ -192,7 +192,7 @@ public:
} }
} }
} }
const Mat* src; const Mat* src;
Mat* dst; Mat* dst;
const float* exptab_; const float* exptab_;
...@@ -283,7 +283,7 @@ void anisotropicDiffusion(InputArray src_, OutputArray dst_, float alpha, float ...@@ -283,7 +283,7 @@ void anisotropicDiffusion(InputArray src_, OutputArray dst_, float alpha, float
ADBody body(&src, &dst, exptab, alpha); ADBody body(&src, &dst, exptab, alpha);
parallel_for_(Range(0, rows), body, 8); parallel_for_(Range(0, rows), body, 8);
std::swap(temp0, temp1); std::swap(temp0, temp1);
std::swap(temp0x, temp1x); std::swap(temp0x, temp1x);
} }
...@@ -291,4 +291,3 @@ void anisotropicDiffusion(InputArray src_, OutputArray dst_, float alpha, float ...@@ -291,4 +291,3 @@ void anisotropicDiffusion(InputArray src_, OutputArray dst_, float alpha, float
} }
} }
...@@ -5,7 +5,7 @@ using namespace std; ...@@ -5,7 +5,7 @@ using namespace std;
TEST(ximgproc_AnisotropicDiffusion, regression) 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"; string original_path = folder + "fruits.png";
Mat original = imread(original_path, IMREAD_COLOR); Mat original = imread(original_path, IMREAD_COLOR);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment