Merge pull request #11965 from alalek:issue_11944
This commit is contained in:
commit
4a3dfffd46
@ -271,7 +271,7 @@ void update_map(const Mat& src, Mat& map_x, Mat& map_y, const int remapMode )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PERF_TEST(Transform, getPerspectiveTransform)
|
PERF_TEST(Transform, getPerspectiveTransform_1000)
|
||||||
{
|
{
|
||||||
unsigned int size = 8;
|
unsigned int size = 8;
|
||||||
Mat source(1, size/2, CV_32FC2);
|
Mat source(1, size/2, CV_32FC2);
|
||||||
@ -280,12 +280,14 @@ PERF_TEST(Transform, getPerspectiveTransform)
|
|||||||
|
|
||||||
declare.in(source, destination, WARMUP_RNG);
|
declare.in(source, destination, WARMUP_RNG);
|
||||||
|
|
||||||
TEST_CYCLE()
|
PERF_SAMPLE_BEGIN()
|
||||||
|
for (int i = 0; i < 1000; i++)
|
||||||
{
|
{
|
||||||
transformCoefficient = getPerspectiveTransform(source, destination);
|
transformCoefficient = getPerspectiveTransform(source, destination);
|
||||||
}
|
}
|
||||||
|
PERF_SAMPLE_END()
|
||||||
|
|
||||||
SANITY_CHECK(transformCoefficient, 1e-5);
|
SANITY_CHECK_NOTHING();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@ -50,6 +50,7 @@
|
|||||||
#include "precomp.hpp"
|
#include "precomp.hpp"
|
||||||
#include "opencl_kernels_imgproc.hpp"
|
#include "opencl_kernels_imgproc.hpp"
|
||||||
#include "hal_replacement.hpp"
|
#include "hal_replacement.hpp"
|
||||||
|
#include <opencv2/core/utils/configuration.private.hpp>
|
||||||
#include "opencv2/core/hal/intrin.hpp"
|
#include "opencv2/core/hal/intrin.hpp"
|
||||||
#include "opencv2/core/openvx/ovx_defs.hpp"
|
#include "opencv2/core/openvx/ovx_defs.hpp"
|
||||||
#include "opencv2/core/softfloat.hpp"
|
#include "opencv2/core/softfloat.hpp"
|
||||||
@ -3061,7 +3062,9 @@ cv::Mat cv::getPerspectiveTransform( const Point2f src[], const Point2f dst[] )
|
|||||||
b[i+4] = dst[i].y;
|
b[i+4] = dst[i].y;
|
||||||
}
|
}
|
||||||
|
|
||||||
solve( A, B, X, DECOMP_SVD );
|
static int param_IMGPROC_GETPERSPECTIVETRANSFORM_SOLVE_METHOD =
|
||||||
|
(int)utils::getConfigurationParameterSizeT("OPENCV_IMGPROC_GETPERSPECTIVETRANSFORM_SOLVE_METHOD", (size_t)DECOMP_LU);
|
||||||
|
solve(A, B, X, param_IMGPROC_GETPERSPECTIVETRANSFORM_SOLVE_METHOD);
|
||||||
M.ptr<double>()[8] = 1.;
|
M.ptr<double>()[8] = 1.;
|
||||||
|
|
||||||
return M;
|
return M;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user