A new voxel layer leveraging modern 3D graphics tools to modernize navigation environmental representations
GNU Lesser General Public License v2.1
616
stars
183
forks
source link
大佬你好, 深度相机的fov计算应该是有点小bug, 一个 100°x100°的深度相机参数,画出来的模型,是长方形的,按道理应该是正方形。设置100x100的fov,后作者给的原始的如图中红色的所示: #273
Open
onlyliucat opened 1 year ago
修改后的相机模型的六个面的计算代码如下: ` // calculate the 8 vertices of the frustum float near_width = 2 _min_d tan(_hFOV / 2); float near_height = 2 _min_d tan(_vFOV / 2); float far_width = 2 _max_d tan(_hFOV / 2); float far_height = 2 _max_d tan(_vFOV / 2);
v_03 = far_top_left - near_top_left; Eigen::Vector3f T_t = -1*v_01.cross(v_03).normalized(); _plane_normals.push_back(VectorWithPt3D(T_t[0], T_t[1], T_t[2], near_top_left));
_plane_normals.push_back(VectorWithPt3D(0, 0, 1, far_top_left)); `
_Originally posted by @onlyliucat in https://github.com/SteveMacenski/spatio_temporal_voxel_layer/issues/238#issuecomment-1630065207_