Commit e8c03fc1 authored by Alexander Alekhin's avatar Alexander Alekhin

ximgproc: rename global functions with generic names

parent f94610a0
......@@ -94,7 +94,7 @@ namespace ximgproc {
* @param fdContour true src are Fourier Descriptors. fdContour false src is a contour
*
*/
CV_EXPORTS_W void transform(InputArray src, InputArray t,OutputArray dst, bool fdContour=true);
CV_EXPORTS_W void transformFD(InputArray src, InputArray t,OutputArray dst, bool fdContour=true);
/**
* @brief Contour sampling .
*
......@@ -106,12 +106,12 @@ namespace ximgproc {
CV_EXPORTS_W void contourSampling(InputArray src, OutputArray out, int nbElt);
/**
* @brief create
* @brief create ContourFitting algorithm object
*
* @param ctr number of Fourier descriptors equal to number of contour points after resampling.
* @param fd Contour defining second shape (Target).
*/
CV_EXPORTS_W Ptr<ContourFitting> create(int ctr = 1024, int fd = 16);
CV_EXPORTS_W Ptr<ContourFitting> createContourFitting(int ctr = 1024, int fd = 16);
//! @} ximgproc_fourier
}
......
......@@ -62,7 +62,7 @@ int main(void)
{
Mat r = getRotationMatrix2D(Point(p.xg, p.yg), p.angle, 10.0/ p.scale10);
ctrNoisy= NoisyPolygon(ctrRef,static_cast<double>(p.levelNoise));
transform(ctrNoisy, ctrNoisyRotate,r);
cv::transform(ctrNoisy, ctrNoisyRotate, r);
ctrNoisyRotateShift.clear();
for (int i=0;i<static_cast<int>(ctrNoisy.size());i++)
ctrNoisyRotateShift.push_back(ctrNoisyRotate[(i+(p.origin*ctrNoisy.size())/100)% ctrNoisy.size()]);
......@@ -112,7 +112,7 @@ int main(void)
cout << "Angle = " << t.at<double>(0, 1) * 180 / M_PI << " expected " << p.angle <<"\n";
cout << "Scale = " << t.at<double>(0, 2) << " expected " << p.scale10 / 10.0 << "\n";
Mat dst;
ximgproc::transform(ctrRot2d, t, dst, false);
ximgproc::transformFD(ctrRot2d, t, dst, false);
c.push_back(dst);
drawContours(img, c, 2, Scalar(0,255,255));
circle(img, c[2][0], 5, Scalar(0, 255, 255));
......
......@@ -281,7 +281,7 @@ void contourSampling(InputArray _src, OutputArray _out, int nbElt)
r.copyTo(_out);
}
void transform(InputArray _src, InputArray _t,OutputArray _dst, bool fdContour)
void transformFD(InputArray _src, InputArray _t,OutputArray _dst, bool fdContour)
{
if (!fdContour)
CV_Assert(_src.kind() == _InputArray::STD_VECTOR);
......@@ -325,7 +325,7 @@ void transform(InputArray _src, InputArray _t,OutputArray _dst, bool fdContour)
Mat(z).copyTo(_dst);
}
cv::Ptr<ContourFitting> create(int ctr, int fd)
cv::Ptr<ContourFitting> createContourFitting(int ctr, int fd)
{
return makePtr<ContourFitting>(ctr, fd);
}
......
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