imgproc(getPerspectiveTransform): add configuration parameter
authorAlexander Alekhin <alexander.alekhin@intel.com>
Fri, 13 Jul 2018 11:57:46 +0000 (14:57 +0300)
committerAlexander Alekhin <alexander.alekhin@intel.com>
Fri, 13 Jul 2018 12:31:33 +0000 (15:31 +0300)
modules/imgproc/src/imgwarp.cpp

index dea61f8..66981e8 100644 (file)
@@ -50,6 +50,7 @@
 #include "precomp.hpp"
 #include "opencl_kernels_imgproc.hpp"
 #include "hal_replacement.hpp"
+#include <opencv2/core/utils/configuration.private.hpp>
 #include "opencv2/core/hal/intrin.hpp"
 #include "opencv2/core/openvx/ovx_defs.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;
     }
 
-    solve(A, B, X, DECOMP_LU);
+    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.;
 
     return M;