Skip to content

Commit 94dea84

Browse files
committed
Merge pull request opencv#12361 from alalek:fix_12359
2 parents 9f1218b + fcfa488 commit 94dea84

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

Diff for: modules/js/src/embindgen.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
'HOGDescriptor': ['load', 'HOGDescriptor', 'getDefaultPeopleDetector', 'getDaimlerPeopleDetector', 'setSVMDetector', 'detectMultiScale'],
121121
'CascadeClassifier': ['load', 'detectMultiScale2', 'CascadeClassifier', 'detectMultiScale3', 'empty', 'detectMultiScale']}
122122

123-
video = {'': ['CamShift', 'calcOpticalFlowFarneback', 'calcOpticalFlowPyrLK', 'createBackgroundSubtractorMOG2', 'estimateRigidTransform',\
123+
video = {'': ['CamShift', 'calcOpticalFlowFarneback', 'calcOpticalFlowPyrLK', 'createBackgroundSubtractorMOG2', \
124124
'findTransformECC', 'meanShift'],
125125
'BackgroundSubtractorMOG2': ['BackgroundSubtractorMOG2', 'apply'],
126126
'BackgroundSubtractor': ['apply', 'getBackgroundImage']}

Diff for: modules/video/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
set(the_description "Video Analysis")
2-
ocv_define_module(video opencv_imgproc opencv_calib3d WRAP java python js)
2+
ocv_define_module(video opencv_imgproc OPTIONAL opencv_calib3d WRAP java python js)

Diff for: modules/video/src/lkpyramid.cpp

+9-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@
4545
#include "lkpyramid.hpp"
4646
#include "opencl_kernels_video.hpp"
4747
#include "opencv2/core/hal/intrin.hpp"
48+
#ifdef HAVE_OPENCV_CALIB3D
4849
#include "opencv2/calib3d.hpp"
50+
#endif
4951

5052
#include "opencv2/core/openvx/ovx_defs.hpp"
5153

@@ -1402,7 +1404,10 @@ void cv::calcOpticalFlowPyrLK( InputArray _prevImg, InputArray _nextImg,
14021404
cv::Mat cv::estimateRigidTransform( InputArray src1, InputArray src2, bool fullAffine )
14031405
{
14041406
CV_INSTRUMENT_REGION()
1405-
1407+
#ifndef HAVE_OPENCV_CALIB3D
1408+
CV_UNUSED(src1); CV_UNUSED(src2); CV_UNUSED(fullAffine);
1409+
CV_Error(Error::StsError, "estimateRigidTransform requires calib3d module");
1410+
#else
14061411
Mat A = src1.getMat(), B = src2.getMat();
14071412

14081413
const int COUNT = 15;
@@ -1505,8 +1510,10 @@ cv::Mat cv::estimateRigidTransform( InputArray src1, InputArray src2, bool fullA
15051510
if (fullAffine)
15061511
{
15071512
return estimateAffine2D(pA, pB);
1508-
} else
1513+
}
1514+
else
15091515
{
15101516
return estimateAffinePartial2D(pA, pB);
15111517
}
1518+
#endif
15121519
}

Diff for: platforms/js/build_js.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def get_cmake_cmd(self):
129129
"-DWITH_ITT=OFF",
130130
"-DBUILD_ZLIB=ON",
131131
"-DBUILD_opencv_apps=OFF",
132-
"-DBUILD_opencv_calib3d=OFF",
132+
"-DBUILD_opencv_calib3d=ON",
133133
"-DBUILD_opencv_dnn=ON",
134134
"-DBUILD_opencv_features2d=OFF",
135135
"-DBUILD_opencv_flann=OFF",

0 commit comments

Comments
 (0)