1

I need to be able to generate a 3D perspective from a bunch of 2D images of a pipe.

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. 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. 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.

I am doing this in VS2010 on the .NET 4 platform in C#.

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

Michael Smit
  • 51
  • 1
  • 7
  • This could be an ideal candidate for out-sourcing / getting someone short term to do it for you (since there's a lot of ground work required to get a 3D image). – Skizz Mar 12 '12 at 17:09
  • Have you got any coordinates of the scans or can you deduce them from the collected data accurately? – Alexey Frunze Mar 12 '12 at 17:15
  • I have thought about out-sourcing it, but I also enjoy challenges. This may be a little over my head though. Will need to do a bit of groundwork first and will determine if I should get someone in to do it. I get X/Y values from the imported data that I use to currently draw the 2D image and based on the diameter of the pipe (fed in at import time) I can work out the percentage of defects in the pipe. – Michael Smit Mar 13 '12 at 20:51

3 Answers3

0

Well, every 10cm isn't very detailed.. However, you need to scan the pixels of the pipe, creating a list of closed polygons, then just use a trianglestrip to connect one set to the next, all the way down the pipe.

DanRedux
  • 9,119
  • 6
  • 23
  • 41
0

Try to start with very basic 2d instead of full blown 3d rendering - may be good enough. 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. 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.

Alexei Levenkov
  • 98,904
  • 14
  • 127
  • 179
  • Your points are interesting. I think perhaps a 2D approach is a good start to get me into this. – Michael Smit Mar 13 '12 at 20:55
  • I have been playing around with WPF. Found this sample on the web: http://thriple.codeplex.com/ This seems to do what I want to start off with. Basically a "stack" of 2D images that you can move through. Creating a suedo 3D effect. Excuse terminology if incorrect. Is there a way to do this with ViewPort3D or the like where you can feed it a bunch of images from the viewmodel and allow the user to step through the images? I would like the stack offest a bit down and to the right to resemble some kind of 3D setup. Real hack - but a start. – Michael Smit Mar 13 '12 at 22:22
  • I don't know. Better to ask separate question tagged with WPF. – Alexei Levenkov Mar 13 '12 at 22:31
0

You don't specify the context, 100mm sample intervals may be sparse (a 1m pipe) or detailed (10km pipe). 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). 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.

Skizz
  • 69,698
  • 10
  • 71
  • 108
  • Thanks for the direction. Will do some looking into voxels and how to apply them. I never specified the intervals or the length as it varies from inspection to inspection. When the data is imported into my system they set the parameters (length of pipe and intervals). I am already using this to calculate percentage of defects in the pipe and stuff. – Michael Smit Mar 13 '12 at 20:48