OpenGL: visualize a 3D point cloud

I have a point cloud (x, y, z) of points with color and rendered in an openGL window using glDrawArray (). Now I have a camera pose, and I would like to display the points from this camera, which basically projects all 3D points in this frame with reference to this camera, for example, the camera’s internal parameters, for example. focal length, etc. and [R | t].

I am wondering if there is an easy way to make this image, and not write a piece of code that loops all the points and projects them in the image plane and gives me color. Does OpenGL have some kind of function built into this work? Another thing I would like to know is a function that indicates which points are visible in the frame, rather than iterating over all N 3D points. Is there anything similar to do this efficiently?

+4
source share
1 answer

If you don’t assign your points to something like a BSP tree , you will have to go through them all to see if they are visible or not.

However, using some spatial hierarchy, you can quickly decide which points are not visible. For example, if you divide your space into a grid of 10 x 10 x 10 cells and assign points to one of the cells, you can then check the bounding box of each cell to determine if that cell is visible or not. So if you have 100,000 points, you will have 1000 cells and (if your points are evenly distributed), you will check 6 points (box corners) instead of 100 for each cell.

You can quickly determine which cells are fully visible or completely invisible, and then you only need to check the contents of those cells that are partially visible.

Expanding the hierarchy, so your top-level cells contain smaller cells, not points that you can handle large point clouds.

You can also resize the cells so that they all contain the same number of points.

+2
source

All Articles