将表示对象所有维度的一组 2D 图像转换为 3D 模型
给定一组覆盖对象所有尺寸的 2D 图像(例如汽车及其屋顶/侧面/前面/阅读),我如何将其转换为 3D objdct?
有没有可以做到这一点的图书馆?
谢谢
Given a set of 2d images that cover all dimensions of an object (e.g. a car and its roof/sides/front/read), how could I transform this into a 3d objdct?
Is there any libraries that could do this?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这些“2D 图像”通常称为“纹理”。您可能需要一个 3D 库,它允许您指定具有位图纹理的 3D 模型。该库将取决于您使用的平台,但首先要查看 OpenGL!
PHP 的 OpenGL
Java 版 OpenGL
... ETC。
These "2D images" are usually called "textures". You probably want a 3D library which allows you to specify a 3D model with bitmap textures. The library would depend on platform you are using, but start with looking at OpenGL!
OpenGL for PHP
OpenGL for Java
... etc.
我听说过程序“Poser”使用人类形态的启发式方法来做到这一点,但除此之外我不相信这实际上在理论上是可能的。您要求从平面数据构造体积数据(推断第三维)。
我认为您必须对几何形状做出大量假设,即使这样,您也只能真正拥有对象的外壳。如果你做得好,你就会有一个代表对象边界的连续表面 - 而不是体积对象本身。
正如托马斯建议的那样,你可以做的就是将这些二维图像贴到某个东西上。但是,您仍然需要构造一个三角形网格曲面,并实际完成所有建模,以呈现 3D 曲面。
我希望这有帮助。
I've heard of the program "Poser" doing this using heuristics for human forms, but otherwise I don't believe this is actually theoretically possible. You are asking to construct volumetric data from flat data (inferring the third dimension.)
I think you'd have to make a ton of assumptions about your geometry, and even then, you'd only really have a shell of the object. If you did this well, you'd have a contiguous surface representing the boundary of the object - not a volumetric object itself.
What you can do, like Tomas suggested, is slap these 2d images onto something. However, you still will need to construct a triangle mesh surface, and actually do all the modeling, for this to present a 3D surface.
I hope this helps.
目前可以自动完成任何接近您所要求的事情的东西是非常专有的。没有图书馆,但有一些产品。
这个核心问题是匹配图像中的对应点,并且能够说,图像 A 中的这个点就是图像 B 中的这个点,并且它们都匹配图像 C 中的这个点,等等。
有三种方法可以解决这个问题,手动匹配(你有照片,必须用自己的大脑找到对应的点)、编码目标和纹理匹配。
PhotoModeller,www.photomodeller.com,1,145.00 美元,支持手动匹配和编码目标。您打印出一堆图像,将它们附加到您的物体上,拍摄照片,然后软件会找到每张图片中的目标,并根据这些点创建 3D 物体。
PhotoModeller 扫描仪,2,595.00 美元,增加了纹理匹配。比较图像的微小部分,看看它们是否代表相同的源区域。
这两种 PhotoModeller 产品都依赖于使用校准相机拍摄图像,每次拍摄都使用一致的焦距,并通过校准过程来映射相机的镜头畸变。
如果您可以进行手动匹配,Google SketchUp 的“匹配照片”功能可以完成这项工作,而且 SketchUp 是免费的。如果您可以拍摄新照片,则可以将自己的目标(例如彩色贴纸点)添加到对象上,以帮助您生成轮廓。
如果您的图像是图纸,如剖面图、平面图等,PhotoModeller 不会帮助您,但 SketchUp 可能正是您需要的工具。您将必须手动构建每个部分,因为您必须提供智能来识别从绘图到绘图对应的线和点。
我希望这有帮助。
What there is currently that can do anything close to what you are asking for automagically is extremely proprietary. No libraries, but there are some products.
This core issue is matching corresponding points in the images and being able to say, this spot in image A is this spot in image B, and they both match this spot in image C, etc.
There are three ways to go about this, manually matching (you have the photos and have to use your own brain to find the corresponding points), coded targets, and texture matching.
PhotoModeller, www.photomodeller.com, $1,145.00US, supports manual matching and coded targets. You print out a bunch of images, attach them to your object, shoot your photos, and the software finds the targets in each picture and creates a 3D object based on those points.
PhotoModeller Scanner, $2,595.00US, adds texture matching. Tiny bits of the the images are compared to see if they represent the same source area.
Both PhotoModeller products depend on shooting the images with a calibrated camera where you use a consistent focal length for every shot and you got through a calibration process to map the lens distortion of the camera.
If you can do manual matching, the Match Photo feature of Google SketchUp may do the job, and SketchUp is free. If you can shoot new photos, you can add your own targets like colored sticker dots to the object to help you generate contours.
If your images are drawings, like profile, plan view, etc. PhotoModeller will not help you, but SketchUp may be just the tool you need. You will have to build up each part manually because you will have to supply the intelligence to recognize which lines and points correspond from drawing to drawing.
I hope this helps.