给定相机外部设备,将纹理面膜投射到现有的3D网格
鉴于图像掩码,我想将像素投影到相机的位置和方向上的网格上,然后将这些像素转换为点云。我在世界上具有相机的内在和外在参数,以及网格在世界坐标中的位置。我知道从世界坐标到相机图像的映射如下:
imgpoint =内在 *外部 * worldpoint
所以当我想相反时,我会做固有和外在矩阵的倒数:
worldPoint = intincienc^(-1) *外部^(-1) * imgpoint
但是,我的想法是从一个具有不同深度值的一个像素中获得两个点,以获得一条线,然后寻找最接近的交叉点我想要的线条,但我不知道如何与原始摄像机平面合理地生成一个点。我该如何找到这个额外的点和/或使这个问题复杂化?
Given an image mask, I want to project the pixels onto a mesh in respect to the position and orientation of the camera and convert these pixels into a pointcloud. I have the intrinsic and extrinsic parameters of the camera in respect to the world, and the location of the mesh in world coordinates. I know the mapping from world coordinates to camera image is as follow:
imgpoint = Intrinsic * Extrinsic * worldpoint
So when I want to the opposite i do the inverse of the intrinsic and extrinsic matrices:
worldpoint= Intrinsic^(-1) * Extrinsic^(-1) * imgpoint
However, the idea that I had was to obtain two points from one pixel, with different depth values, to obtain a line and then look for the closest intersection for the mesh I want with the line, but I do not know how to properly generate a point away from the original camera plane. How can I find this extra point and/or am I complicating this problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
下面的顶部方程式显示了如何将点(x,y,z)投影到像素(u,v)上;
外部参数是3x3旋转矩阵 r 和翻译 t 。
内在参数是焦点距离 f_x,f_y 和
主点 (C_X,C_Y)。值 alpha 是划分的透视图预先术语。
底部方程通过描述如何进行项目来逆转该过程
从摄像机位置通过像素(u,v)从0到无穷大的变化时,从摄像机位置 。
现在我们将问题转换为 ray casting 问题。
找到射线与您的网格的交集,这是一个
标准的计算机图形问题。
The top equation below shows how to project a point (x,y,z) onto a pixel (u,v);
The extrinsic parameters are the 3x3 rotation matrix R and translation t.
The intrinsic parameters are the focal distances f_x, f_y and
principal point (c_x, c_y). The value alpha is the perspective foreshortening term that is divided out.
The bottom equation reverses the process by describing how to project
a ray from the camera position through through the pixel (u,v) out into the scene as the parameter alpha varies from 0 to infinity.
Now we have converted the problem into a ray casting problem.
Find the intersection of the ray with your mesh which is a
standard computer graphics problem.