Reputation: 787
I have moved from 3.4 to 4.0 and cv2 is missing the estimateRigidTransform function. The documentation shows it is still there in the C++ library but it is not in cv2. Has it been renamed or am I missing something stupid when im building it?
I checked 3.5 and it looks like it is the first version where it is missing.
Upvotes: 0
Views: 2251
Reputation: 594
You can use the estimateAffine3D as follows:
cv::Mat get_rigid_transform(std::vector<cv::points3d> poinst1 , std::vector<cv::points3d> points2)
{
cv::Mat affine_transformation = cv::Mat::eye(3, 4, CV_64F);
std::vector<uchar> inliers;
cv::estimateAffine3D(points1, poinst2, affine_transformation, inliers);
return affine_transformation;
}
Upvotes: 0
Reputation: 41775
As you can see in the doc, estimateRigidTransform
is now deprecated.
You should use estimateAffine2D
or estimateAffinePartial2D
Also, I'm pretty sure that OpenCV 3.5 does not exists: you go from 3.4.4 to 4.0.0.
Upvotes: 2