简体   繁体   English

2D图像到3D视图

[英]2D images to 3D view

I need to be able to generate a 3D perspective from a bunch of 2D images of a pipe. 我需要能够从一堆管道的2D图像生成3D透视图。

Basically... We have written software that interprets combined data from laser and sonar units to give us an image slice from a section of pipe. 基本上...我们已经编写了软件,可以解释激光和声纳单元的组合数据,从而为我们提供一段管道的图像切片。 These units travel through the pipe and scan the inside of the pipe every 100mm. 这些单元穿过管道并每100毫米扫描管道内部。 All of this is working great. 所有这一切都很好。 My client now wants to take all these 2D image slices and generate a 3D view so they can "travel" through the pipe looking at defects etc.. that are picked up by the scans. 我的客户现在希望获取所有这些2D图像切片并生成3D视图,以便它们可以“穿越”管道以查看扫描所拾取的缺陷等。 We can see the defects in the 2D images but there can be hundreds of images in a single inspection - hence the requirement to be able to look through the pipe. 我们可以在2D图像中看到缺陷,但是一次检查可以包含数百个图像-因此需要能够通过管道查看。

I am doing this in VS2010 on the .NET 4 platform in C#. 我在C#的.NET 4平台上的VS2010中这样做。

I am honestly clueless as to where to start here. 老实说,我不知道从哪里开始。 I am not a graphics developer so this is all new territory to me. 我不是图形开发人员,所以这对我来说是新的领域。 I see it as a great challenge but need some help kicking off - and a bit of direction. 我认为这是一个巨大的挑战,但需要一些帮助,而且需要一些指导。

Any help appreciated :) 任何帮助表示赞赏:)

Mike 麦克风

嗯,每10厘米不是很详细。.但是,您需要扫描管道的像素,创建一个封闭的多边形列表,然后仅使用三角带将一组连接到下一组,一直沿管道向下。

Try to start with very basic 2d instead of full blown 3d rendering - may be good enough. 尝试从非常基本的2d而不是完整的3d渲染开始-可能足够好。 Pipe when you look at it from inside can be represented as several trapeze. 从内部看管道时,它可以表示为几个飞人。 Assuming your images are small cylinder portions of a pipe - map each stripe to trapezoids (4 would be good start - easy to position) and draw than in circular pattern. 假设您的图像是管道的较小圆柱部分-将每个条纹映射到梯形(4是一个很好的起点-易于放置),并绘制比圆形图案要多的图形。 You may draw several stripes this way at the same time. 您可以同时以此方式绘制多个条纹。 To move back/forward - just reassign images to trapezoids. 要后退/前进-只需将图像重新分配给梯形即可。

If you need full 3d - consider if WPF would work, if not - XNA or some OpenGL library will give you full 3d. 如果需要完整的3d,请考虑WPF是否可以使用,否则,XNA或OpenGL库将为您提供完整的3d。

You don't specify the context, 100mm sample intervals may be sparse (a 1m pipe) or detailed (10km pipe). 您无需指定上下文,100mm的采样间隔可能是稀疏的(1m管道)或详细的(10km管道)。 Nor do you specify how many sample points there are (number of cross sections and size of cross section image). 您也没有指定有多少个采样点(横截面数量和横截面图像的大小)。

A simple way to show the data is to use voxels where each pixel on a cross section is treated as a cube and adjacent samples form adjacent cubes (think Minecraft). 显示数据的一种简单方法是使用体素,将横截面上的每个像素都视为一个立方体,而相邻的样本形成相邻的立方体(请考虑Minecraft)。 The result will look blocky but as it's an engineering / scientific application this is probably preferable. 结果看似块状,但由于它是工程/科学应用,因此可能更可取。 Interpolating the model to produce a smooth surface may hide defects or make areas appear to be defective. 对模型进行插值以生成光滑表面可能会隐藏缺陷或使区域看起来有缺陷。 Also, rendering a cross section through a voxel is a bit easier than a polygon surface. 同样,通过体素渲染横截面比多边形曲面要容易一些。

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

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