是否有任何算法可以将图像投影到非平面上?
是否有任何算法可以将图像投影到非平坦(变形)表面上?
并没有变形太多。它是一个真正的玻璃表面,上面覆盖着高质量、耐用的描图纸。我有一个它的 3 维模型。如何使用投影仪对其进行纹理化?
我想用 C\C++\C# for Windows 编写一个程序,这将是能够使用投影仪对 3 维模型给出的任何表面进行纹理化。
我需要一个算法或包含算法的开源库。
Is there any algorithm for projecting images onto a non-flat (deformed) surface?
It is not deformed too much. It is a really glassy surface covered with high-quality, durable tracing paper. I have a 3-dimensional model of it. How can I texturise it with a projector?
I want to write a program in C\C++\C# for Windows, which would be able to texturise any surface given by a 3-dimensional model using a projector.
I need an algorithm or open source libraries containing algorithms.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
是的,有一个算法。除非您真的想要自己实现它,否则让现有的 3D 图形实现为您完成这项工作可能会更容易 - OpenGL 和 DirectX 都可以让您将纹理应用到物体的表面。 3D模型。 NeHe 教程包含使用 OpenGL 基本思想的示例 。
Yes, there's an algorithm. Unless you really want to implement it on your own, it's probably easier to let an existing 3D graphics implementation do the job for you -- both OpenGL and DirectX will let you apply a texture to the surface of a 3D model. The NeHe tutorials include an example of the basic idea using OpenGL.
根本不清楚标准纹理库将使用什么算法,并且它可能不是真正的投影,因此如果准确性很重要,您可能需要自己执行此操作(或者对给定的特定算法使用哪些特定算法进行一些研究图书馆)。
基本算法很简单。基本上,您只需要找到从投影点发出的线与表面相交的位置。更详细地说:
另一方面,如果您的表面是用数学方法描述的,则可能有一个简单的方程,例如,如果您将平面映射到球体,则可能会出现这种情况。
It's not at all clear what algorithm a standard texturing library would use, and it's probably not a true projection, so if accuracy is important, you many need to do this yourself (or do some research into what specific algorithms are being used for a given library).
The basic algorithm is simple. Basically you just need to find where line emanating from your projection point intersect your surface. In more detail:
On the other hand, if your surface is described mathematically, there may be a simple equation for this, as would be the case, for example, if you were mapping a plane to a sphere.
这称为图像畸变校正。
It's called image distortion correction.