1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

build: fix js build (make video->calib3d dependency optional)

- estimateRigidTransform() is excluded from JS bindings
This commit is contained in:
Alexander Alekhin
2018-08-31 14:26:36 +03:00
parent 90f47eb952
commit fcfa488250
4 changed files with 12 additions and 5 deletions
+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
}