def test_estimate_rigid_transform_triggers_estimateAffinePartial2D_for_opencv4_when_use_full_false(self, cv2_mock): OpencvDetectorInterface.OPENCV_MAJOR = "4" interface = OpencvDetectorInterface() img1 = Mock() img2 = Mock() interface.estimate_rigid_transform(img1, img2, False) cv2_mock.assert_called_once_with(img1, img2)
def test_estimate_rigid_transform_triggers_estimateRigidTransform_for_opencv2(self, cv2_mock): OpencvDetectorInterface.OPENCV_MAJOR = "2" interface = OpencvDetectorInterface() img1 = Mock() img2 = Mock() interface.estimate_rigid_transform(img1, img2, True) cv2_mock.assert_called_once_with(img1, img2, fullAffine=True)