MrNeRF/gaussian-splatting-cuda

is this an error when transfer from eigen matrix to torch?

zmxiaoj opened this issue · 0 comments

Eigen::Matrix4f getWorld2View2Eigen(const Eigen::Matrix3f& R, const Eigen::Vector3f& t,
const Eigen::Vector3f& translate /= Eigen::Vector3d::Zero()/, float scale /= 1.0/) {
Eigen::Matrix4f Rt = Eigen::Matrix4f::Zero();
Rt.block<3, 3>(0, 0) = R.transpose();
Rt.block<3, 1>(0, 3) = t;
Rt(3, 3) = 1.0;

Eigen::Matrix4f C2W = Rt.inverse();
Eigen::Vector3f cam_center = C2W.block<3, 1>(0, 3);
cam_center = (cam_center + translate) * scale;
C2W.block<3, 1>(0, 3) = cam_center;
Rt = C2W.inverse();
return Rt;

}

eigen matrix is stored column major by default