cv::Affine3d 变换如何逆向
how inverse an cv::Affine3d transformation
我用的是opencv 3.0.
我使用这样声明的cv::Affine3d
:
cv::Vec3d om = ...;
cv::Vec3d T = ...;
cv::Affine3d aff(om, T);
然后我使用 aff
将 X 转换为 Y,如下所示:
cv::Vec3d X;
cv::Vec3d Y = aff*X;
现在,我想做逆变换,把Y变成X?
我认为
cv::Affine3d affInverse = aff.inv(); // Calls inv() on the internal matrix
// and returns a new object from that.
cv::Vec3d xPrime = affInverse * Y;
成功了。有关详细信息,请参阅您提到的 header。
此外,documentation 应该提供更多关于 Affine3d
中存储的 Matx
的信息。
希望对您有所帮助!
我用的是opencv 3.0.
我使用这样声明的cv::Affine3d
:
cv::Vec3d om = ...;
cv::Vec3d T = ...;
cv::Affine3d aff(om, T);
然后我使用 aff
将 X 转换为 Y,如下所示:
cv::Vec3d X;
cv::Vec3d Y = aff*X;
现在,我想做逆变换,把Y变成X?
我认为
cv::Affine3d affInverse = aff.inv(); // Calls inv() on the internal matrix
// and returns a new object from that.
cv::Vec3d xPrime = affInverse * Y;
成功了。有关详细信息,请参阅您提到的 header。
此外,documentation 应该提供更多关于 Affine3d
中存储的 Matx
的信息。
希望对您有所帮助!