Skip to content

Commit

Permalink
fixed test failures; removed extra whitespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
vpisarev committed May 23, 2017
1 parent 7297f02 commit b885d28
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
14 changes: 7 additions & 7 deletions modules/ximgproc/include/opencv2/ximgproc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
7 changes: 3 additions & 4 deletions modules/ximgproc/src/anisodiff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ class ADBody : public ParallelLoopBody
}
j *= 3;
#endif

for( ; j < cols*cn; j += cn )
{
int c0 = psrc0[j], c1 = psrc0[j+1], c2 = psrc0[j+2];
Expand All @@ -192,7 +192,7 @@ class ADBody : public ParallelLoopBody
}
}
}

const Mat* src;
Mat* dst;
const float* exptab_;
Expand Down Expand Up @@ -283,12 +283,11 @@ 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);
}
}

}
}

2 changes: 1 addition & 1 deletion modules/ximgproc/test/test_anisodiff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b885d28

Please sign in to comment.