1
$\begingroup$

Suppose I have code to generate a bunch of frames, each of which is a depth map(I have access to the matrices which represent depth) which in turn is used to generate a point cloud. One frame would look like this:

enter image description here

In short I have a point cloud corresponding to each frame. How would I generate a video where each point cloud in a frame is meshed together?

Are there frameworks which handle this kind of data? I am assuming OpenGL should help but I am not sure if it can do this.

$\endgroup$
1

2 Answers 2

1
$\begingroup$

Depending on your application, you could use image-based solutions that are much cheaper than meshing a uniformly sampled set of points. For example, you could use the depth map as a height map.

There are many techniques that allow you to render it in an efficient way, the more realistic the more difficult to code as a shader (but not too much). From easiest to harder:

$\endgroup$
2
  • $\begingroup$ I was looking to create something like this vimeo.com/125511537. Didn't know how it's done. I kinda assumed the workflow I mentioned in the question and hypothesised that's how it's done. $\endgroup$ Commented Apr 11, 2019 at 6:44
  • $\begingroup$ As far as you have the depth map, I guess the shadow in that video is rendered with shadow mapping. The main object may be rendered in many ways. The easiest technique (if scanner resolution is not too high) consist on generate a quad per pixel in your depth map and set the axis coordinate according to depth values in the vertexes. If you want to do it in a more efficient way or scanner resolution may vary with time, the quads can be generated by a geometry shader from a more basic mesh. $\endgroup$
    – David
    Commented Apr 11, 2019 at 10:50
1
$\begingroup$

There are plenty of algorithms for generating meshes from point clouds. I am going to suggest looking at the libraries CGAL and PCL, if only because their documentation has excellent references which should give you ideas on where to look in the literature if you need to roll your own.

Jonathan Shewchuk also has some more 2.5D-ish algorithms that may suit your needs.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.