I do have two sets of points and I want to find the best transformation between them. In OpenCV, you have the following function:
Mat H = Calib3d.findHomography(src_points, dest_points);
that returns you a 3x3 Homography matrix, using RANSAC. My problem is now, that I only need translation and rotation (& maybe scale), I don't need affine and perspective.
The thing is, my points are only in 2D.
(1) Is there a function to compute something like a homography but with less degrees of freedom?
(2) If there is none, is it possible to extract a 3x3 matrix that does only translation and rotation from the 3x3 homography matrix?
Thanks in advance for any help!
Isa
estimateRigidTransform
: docs.opencv.org/modules/video/doc/… – MickaestimateRigidTransform
isn't appropriate for you because it doesn't use RANSAC, you might have to progam your own RANSAC, which is not that hard. Unfortunately, as far as I know, openCV only provides outlier omitting transformation optimization for 8-dof homographies. – MickaestimateRigidTransform
myself, so I can't help you how to use it. Maybe it returns an empty matrix because the src/dst point matrix isn't formatted correctly, or there are too many outlier which prevent computation of a rigid transform (since that function doesn't use RANSAC or other outlier control). But that's just a guess. In principle, a rigid transform is exactly what you asked for. – Micka