简体   繁体   English

从2D图像创建设备的3D模型

[英]create 3d model of an equipment from 2d images

GOAL: I have to create a 3d model of a machine part. 目标:我必须创建机器零件的3D模型。 I have about 25 images of the same thing taken from different angles. 我从不同角度拍摄了大约25张同一事物的图像。

Progress: I am able to extract the coordinates for a label that is on the machine for most of the images. 进度:我能够为大多数图像提取机器上标签的坐标。

Problem: but I have no idea how to proceed. 问题:但是我不知道如何进行。 I have read a bit about aero-triangulation, but I couldn't figure out how to implement it. 我已经阅读了一些有关航空三角测量的知识,但是我不知道该如何实现。 I would really appreciate it, if you could guide me in the right direction. 如果您能引导我朝正确的方向前进,我将不胜感激。

It would be really helpful, if you could provide your solutions using python and opencv. 如果您可以使用python和opencv提供解决方案,那将非常有帮助。

Edit : sorry but I cannot upload the code for this one as it is confidential. 编辑 :对不起,但我不能上载此代码,因为它是保密的。 don't blame me please I am just an intern. 请不要怪我,我只是一名实习生。 Although I can tell that I cropped a template of the label from an image and then used Sift to match that template on all the images to get the coordinates of the label. 尽管可以告诉我我是从图像中裁剪出标签的模板,然后使用Sift在所有图像上匹配该模板以获取标签的坐标。

If you want to implement things yourself with OpenCV, I would command looking at SIFT (or SURF) features, RANSAC and the epipolar constraint. 如果您想用OpenCV自己实现,我将命令查看SIFT(或SURF)功能,RANSAC和对极约束。 I believe the OpenCV cookbook describe those. 我相信OpenCV食谱可以描述这些内容。 Warning: math involved. 警告:涉及数学。 And I don't know how to do dense mapping in OpenCV. 而且我不知道如何在OpenCV中进行密集映射。

I know the GUI program "VisualSFM" that can automatically recreate 3D model from images. 我知道GUI程序“ VisualSFM”可以自动从图像重新创建3D模型。 It uses SFM and other command line utilities behind the scenes. 它在后台使用SFM和其他命令行实用程序。 Since everything is opensource, you could create a python wrapper around the actual libraries (I found https://github.com/mapillary/OpenSfM asking Google). 由于所有内容都是开源的,因此您可以在实际的库周围创建一个python包装器(我发现https://github.com/mapillary/OpenSfM问Google)。 VisualSFM prints the command it calls, so a hacky way could be to call the same commands from python. VisualSFM会打印它调用的命令,因此一种骇人听闻的方法可能是从python调用相同的命令。

If it is a simple shape and you don't want to automate it, it could be faster to model it yourself (and the result could look better). 如果它是一个简单的形状,并且您不想使其自动化,则可以自己进行建模更快(并且结果看起来更好)。 In 1.5 week I managed to learn the basics of blender and to model a guitar necklace: https://youtu.be/BCGKsh51TNA . 在1.5周的时间里,我设法学习了搅拌器的基础知识并为吉他项链建模: https//youtu.be/BCGKsh51TNA And I would now be able to do it in less than 1h. 我现在可以在不到1小时的时间内完成操作。 How long are you ready to invest to find a solution with OpenCV? 您准备投资多长时间找到OpenCV解决方案?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM