I use opencv 3.0.
I use a cv::Affine3d
declared like this:
cv::Vec3d om = ...;
cv::Vec3d T = ...;
cv::Affine3d aff(om, T);
Then I use aff
to transform X into Y like this:
cv::Vec3d X;
cv::Vec3d Y = aff*X;
Now, I would like do the inverse transformation to transform Y into X?
I would assume that
cv::Affine3d affInverse = aff.inv(); // Calls inv() on the internal matrix
// and returns a new object from that.
cv::Vec3d xPrime = affInverse * Y;
does the trick. See the header you mentioned for more information.
Also, the documentation should provide some more information about the Matx
stored in Affine3d
.
Hope that helps!