mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 00:03:03 +04:00
Merge pull request #12248 from hrnr:video_remove_ransac
* video: remove duplicate RANSAC code * remove RANSAC code video module. The module now uses RANSAC estimators from calib3d. * deprecate estimateRigidTransform * replace internal usage of deprecated estimateRigidTransform * remove from wrappers * replace usage in shape module. shape module now links to calib3d instead of video module. * reprecate also C API version * remove cvEstimateRigidTransform * supress deprecated warnings in estimateRigidTransform test * the function is now deprecated
This commit is contained in:
committed by
Alexander Alekhin
parent
7d4bb9428b
commit
49283ec035
@@ -1,2 +1,2 @@
|
||||
set(the_description "Shape descriptors and matchers")
|
||||
ocv_define_module(shape opencv_core opencv_imgproc opencv_video WRAP python)
|
||||
ocv_define_module(shape opencv_core opencv_imgproc opencv_calib3d WRAP python)
|
||||
|
||||
@@ -222,12 +222,18 @@ void AffineTransformerImpl::estimateTransformation(InputArray _pts1, InputArray
|
||||
shape2.push_back(pt2);
|
||||
}
|
||||
|
||||
// estimateRigidTransform //
|
||||
Mat affine;
|
||||
estimateRigidTransform(shape1, shape2, fullAffine).convertTo(affine, CV_32F);
|
||||
if (fullAffine)
|
||||
{
|
||||
estimateAffine2D(shape1, shape2).convertTo(affine, CV_32F);
|
||||
} else
|
||||
{
|
||||
estimateAffinePartial2D(shape1, shape2).convertTo(affine, CV_32F);
|
||||
}
|
||||
|
||||
if (affine.empty())
|
||||
affine=_localAffineEstimate(shape1, shape2, fullAffine); //In case there is not good solution, just give a LLS based one
|
||||
//In case there is not good solution, just give a LLS based one
|
||||
affine = _localAffineEstimate(shape1, shape2, fullAffine);
|
||||
|
||||
affineMat = affine;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
#include <cmath>
|
||||
#include <iostream>
|
||||
|
||||
#include "opencv2/video/tracking.hpp"
|
||||
#include "opencv2/calib3d.hpp"
|
||||
#include "opencv2/imgproc.hpp"
|
||||
#include "opencv2/shape.hpp"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user