是否有任何算法可以将图像投影到非平面上?

发布于 2024-08-21 20:37:12 字数 276 浏览 11 评论 0原文

是否有任何算法可以将图像投影到非平坦(变形)表面上?

并没有变形太多。它是一个真正的玻璃表面,上面覆盖着高质量、耐用的描图纸。我有一个它的 3 维模型。如何使用投影仪对其进行纹理化? projection

我想用 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? projection

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

掩饰不了的爱 2024-08-28 20:37:12

是的,有一个算法。除非您真的想要自己实现它,否则让现有的 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.

扎心 2024-08-28 20:37:12

根本不清楚标准纹理库将使用什么算法,并且它可能不是真正的投影,因此如果准确性很重要,您可能需要自己执行此操作(或者对给定的特定算法使用哪些特定算法进行一些研究图书馆)。

基本算法很简单。基本上,您只需要找到从投影点发出的线与表面相交的位置。更详细地说:

  1. 决定你的投影点
  2. 决定从你的投影点发出的一堆线,这将为你提供扭曲表面上所需的分辨率
  3. 确定这些线与你的表面相交的位置(确切的方法将取决于你的表面表示)
  4. 假设将平面图像放置在投影点和扭曲表面之间的某个位置,找到直线与平面的交点,并将该值分配给扭曲表面上的位置。

另一方面,如果您的表面是用数学方法描述的,则可能有一个简单的方程,例如,如果您将平面映射到球体,则可能会出现这种情况。

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:

  1. Decide on your projection point
  2. Decide on a bunch of lines emanating from your projection point that will give you resolution you need on your warped surface
  3. Determine where these lines intersect your surface (the exact method will depend on your surface representation)
  4. Assume that your flat image is placed somewhere between your projection point and warped surface and find the intersection of the line with the flat surface and assign this value to the location on the warped surface.

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.

风追烟花雨 2024-08-28 20:37:12

这称为图像畸变校正。

It's called image distortion correction.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文