Rectification-projective2d

1.2k views Asked by At

Does any one know how this function (projective2d) works? I have a code for rectification and my Matlab have error with this function (Undefined function 'projective2d' for input arguments of type 'double'), however I think it should work for double input. In the other hand when I search it in the help, there is not any function with this name. It is a part of my code:

[t1, t2] = estimateUncalibratedRectification(fMatrix, ...
  inlierPoints1.Location, inlierPoints2.Location, size(I2));
I1Rect = imwarp(I1, projective2d(t1), 'OutputView', imref2d(size(I1)));
I2Rect = imwarp(I2, projective2d(t2), 'OutputView', imref2d(size(I2)));

I would appreciate if anyone help me.

1

There are 1 answers

0
Dima On

projective2d is a constructor of a MATLAB class, which returns an object that encapsulates a projective transformation. The error you are getting means that you have an older version of MATLAB, which doesn't have it. Try using imtransform instead of imwarp, and pass t1 and t2 directly into it, without creating projective2d objects.