Merge pull request #12361 from alalek:fix_12359

This commit is contained in:
Alexander Alekhin
2018-08-31 13:27:56 +00:00
4 changed files with 12 additions and 5 deletions
+1 -1
View File
@@ -1,2 +1,2 @@
set(the_description "Video Analysis")
ocv_define_module(video opencv_imgproc opencv_calib3d WRAP java python js)
ocv_define_module(video opencv_imgproc OPTIONAL opencv_calib3d WRAP java python js)
+9 -2
View File
@@ -45,7 +45,9 @@
#include "lkpyramid.hpp"
#include "opencl_kernels_video.hpp"
#include "opencv2/core/hal/intrin.hpp"
#ifdef HAVE_OPENCV_CALIB3D
#include "opencv2/calib3d.hpp"
#endif
#include "opencv2/core/openvx/ovx_defs.hpp"
@@ -1402,7 +1404,10 @@ void cv::calcOpticalFlowPyrLK( InputArray _prevImg, InputArray _nextImg,
cv::Mat cv::estimateRigidTransform( InputArray src1, InputArray src2, bool fullAffine )
{
CV_INSTRUMENT_REGION()
#ifndef HAVE_OPENCV_CALIB3D
CV_UNUSED(src1); CV_UNUSED(src2); CV_UNUSED(fullAffine);
CV_Error(Error::StsError, "estimateRigidTransform requires calib3d module");
#else
Mat A = src1.getMat(), B = src2.getMat();
const int COUNT = 15;
@@ -1505,8 +1510,10 @@ cv::Mat cv::estimateRigidTransform( InputArray src1, InputArray src2, bool fullA
if (fullAffine)
{
return estimateAffine2D(pA, pB);
} else
}
else
{
return estimateAffinePartial2D(pA, pB);
}
#endif
}