0
我试图用OpenCV Viz模块来模拟3D摄像机的运动。我想在世界坐标中找到三维相机的位置!我指定这样的相机的姿势!Viz:如何仿射用R&T矢量变换Point3D?
如何从姿势“Affine3d”中获取相机的位置?请注意,Origin位于Point3d(0,0,0)。我是否需要手动计算?如果是的话如何转换点?
Mat RotationVector(1,3,CV_64FC1,Scalar(0.0));
Mat TranslationVector(3,1,CV_64FC1,Scalar(1.0));
Affine3d AffineTransform= Affine3d(RotationVector,TranslationVector);
cout << "RotationVector: \n" << RotationVector <<endl;
cout << "TranslationVector: \n " << TranslationVector <<endl;
cout << "AffineTransform: \n" << AffineTransform.matrix <<endl;