映射来自2D投影回三维点云 [英] Mapping from 2D projection back to 3D point cloud

查看:1147
本文介绍了映射来自2D投影回三维点云的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个3D模型由点顶点(XYZ),并最终三角形面的。 使用OpenGL或摄像机视图矩阵投影,我可以投射三维模型到二维平面上,即视图窗口或M * N号决议的图像。

I have a 3D model consisting of point vertices (XYZ) and eventually triangular faces. Using OpenGL or camera-view-matrix-projection I can project the 3D model to a 2D plane, i.e. a view window or an image with m*n resolution.

现在的问题是我怎么能确定从2D投影计划中的像素从原来的3D模型,其相应的顶点(或面)之间的对应关系。

The question is how can I determine the correspondence between a pixel from the 2D projection plan and its corresponding vertex (or face) from the original 3D model.

也就是说,
什么是最接近的顶点三维模型从2D投影给定像素?
这听起来像采摘OpenGL或光线跟踪问题。有没有然而,任何简单的解决方案?

Namely,
What is the closest vertices in 3D model for a given pixel from 2D projection?
It sounds like picking in openGL or raytracing problem. Is there however any easy solution?

随着光线追踪它实际上是关于寻找的第一个顶点/面相交从一个视点的射线的想法。有人能告诉我一些教程或例子?我想找到一个算法独立于使用OpenGL。

With the idea of ray tracing it is actually about finding the first vertex/face intersected with the ray from a view point. Can someone show me some tutorial or examples? I would like to find an algorithm independent from using OpenGL.

推荐答案

在OpenGL的命中测试通常都是在没有光线追踪。相反,当每个基元被渲染,在输出一个平面,用于存储原始的唯一ID。点击测试是那么简单,只要读取ID平面上的光标位置。

Hit testing in OpenGL usually is done without raytracing. Instead, as each primitive is rendered, a plane in the output is used to store the unique ID of the primitive. Hit testing is then as simple as reading the ID plane at the cursor location.

这篇关于映射来自2D投影回三维点云的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆