1

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.

Dima
  • 38,860
  • 14
  • 75
  • 115
  • According to [this](http://www.mathworks.co.uk/help/images/ref/projective2dclass.html), `projective2D` requires a 3x3 matrix, if given input. – Roger Rowland Jan 08 '14 at 20:31
  • 1
    It may be not present in your MATLAB version (or you don't have the right toolbox, or the toolbox is not on your MATLAB path). – nkjt Jan 08 '14 at 21:47

1 Answers1

0

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.

Dima
  • 38,860
  • 14
  • 75
  • 115