5

I have a 3d point cloud image (see below).

And I would like to cull all the points which are theoretically behind other points (e.g points around the back of the person will not be visible since it's obstructed by the points around the chest and abdomen).

How do I go and solve this problem ?

All I need are just points which are not obstructed from frontal view, so that I can use it to for other purposes.

Edit: It's not really for viewing purposes. I am trying to isolate only the unobstructed vertices to calculate surface normal later on in order to extract depth image features.

enter image description here

sub_o
  • 2,642
  • 5
  • 28
  • 41
  • Why you need surface normal to extract depth? – JAre Nov 21 '12 at 13:09
  • Not extracting depth, but using surface normal as features for depth image. It's more of a computer vision thing. I'm using some OBJ models to temporarily emulate point cloud data obtained from Kinect. And since it's a depth sensor, only the frontal part of the object is acquired by Kinect – sub_o Nov 21 '12 at 13:24
  • You can render mesh normals as fragment color (R G B) and depth as alpha to texture and lookup random points from it or apply mask that contians 1 and 0 and mutliply shader output on it so you will get texture with points instead of solid surface. – JAre Nov 21 '12 at 13:44
  • If you need example how to extract normal and depth and put it to texture google for [Deferred Shading](http://en.wikipedia.org/wiki/Deferred_shading) – JAre Nov 21 '12 at 13:55

2 Answers2

3

You can't obscure something with a point - it has no dimensions.

If you have a mesh (i.e. you know which points "connect" to which) you can hide things that are obscured behind that mesh.

If you don't, the easiest trick I know of to achieve something like your requirement is to use z-related fading - just make points at the rear fainter.

Alnitak
  • 334,560
  • 70
  • 407
  • 495
  • If you consider a line (ray) between your point of view and a point in the model, won't all the points in that line be "obscured" by the point closest to the camera model? – Rui Marques Mar 29 '14 at 22:11
  • @RuiMarques only if they're _exactly_ on line, but a point has zero size, so can't really obscure anything. – Alnitak Mar 30 '14 at 12:35
  • Sure, I guess the OP means points obscured by surfaces defined by other points. – Rui Marques Mar 30 '14 at 12:50
  • Because if you want a depth image you are only interested in the surfaces closest to the view point. Picture a robot avoiding obstacles, you want it to avoid the wall surface, not the other end of the wall in the next room division.. – Rui Marques Mar 30 '14 at 12:56
1

How about rendering polygonal mesh with texture of points? Another way is rendering polygonal mesh to z-buffer(you need only depth) and using it to discard(far points will fail z-test) points that are behind mesh.

JAre
  • 4,666
  • 3
  • 27
  • 45