Skip to main content

LIDAR Point Cloud Visualization

A common question we get asked is how to visualize the point cloud data produced by either the Linear-mode or Geiger-mode LIDAR simulations. First, you should remember that the point cloud files produced by the "APD Processor" are simple ASCII/text files. Each line is the entry for a single return or "point" in the point cloud, including the point location and some attributes that vary depending on whether you modeled a Linear-mode or Geiger-mode system.

For a Linear-mode system, a point cloud file will generally look like the example below:
12.7388 -45.3612 -0.0256 5.0290 0 0 0 0
12.8169 -45.3612 -0.0264 4.8362 0 1 0 0
12.8950 -45.3612 -0.0271 4.8362 0 2 0 0
...
32.4008 -25.5446 10.5945 4.6783 0 65533 0 0
32.4781 -25.5446 10.5953 5.8959 0 65534 0 0
32.5360 -25.5640 12.5408 5.9185 0 65535 0 0
The first three columns are the X/Y/Z location of the point return. The 4th column is the intensity (in photons). Since Linear mode can support multiple returns per pulse, the 5th column is the return number. The 6th column is the pixel number, followed by the pulse number and the task number.

The following tools are available as either freeware or trial-ware that are specifically designed to visualize and analyze LIDAR point cloud data:
However, since the data is simple 3D point data almost any 3D plotting tool can be used. That includes the plotting capabilities in tools like Matlab, IDL, etc. One of the easiest tools to acquire is GNUplot, which is available for free on nearly every platform. This article will show you some easy ways to use GNUplot to visualize ASCII/text point cloud data.

In these examples, I have a point cloud file that I produced using the Linear-mode model (the file is named "lmapd.xyz"). The following GNUplot command produces a basic 3D point plot:
gnuplot> splot "lmapd.xyz" using 1:2:3 with points
The "splot" command takes the filename and a few options. The "using 1:2:3" option tells it to use the 1st, 2nd and 3rd columns for the X/Y/Z point location. The "with points" option tells it to draw the points using the "points" style. This command results in the plot below:
This simple command shows us that there is some 3D structure in the data, but it is very hard to make sense of it because the points are big and hard to distinguish. GNUplot has an option to color-code the points based on an attribute with each point. The following plot command will color code based on the Z (height):
gnuplot> splot "lmapd.xyz" using 1:2:3:3 with dots palette
The "with dots" option plots each point with a smaller symbol and the "palette" option will color-code the points based on the 3rd field, which is the Z height (note the 4th token in the "using" option defines which column is used to drive the color). The resulting plot is shown below:
Note that with the height color coded and the smaller plot symbols we can start to make out that this is a flat field near a tree line. When modeling a Linear-mode detector, the 4th column in the point cloud file is the intensity. We can using that field to drive the point color using the following plot command:
gnuplot> splot "lmapd.xyz" using 1:2:3:4 with dots palette
which results in the plot below:
Notice that you can now see some variation in the ground reflectance and visually identify two different tree species (the brighter yellow tree in the back corner and the darker orange ones). The intensity also reveals that there is an object under the trees that is much darker than the rest of the area. In this case, that object is a tank and at this wavelength (1064 nm) the paint is much darker than the vegetation (vegetation has high reflectance in the near-IR region).

Note that this article shows static views of the point cloud, but on most platforms you can click and drag to rotate the GNUplot display interactively. Where GNUplot starts to struggle is with really large point clouds. Most of the LIDAR specific visualizers use "level of detail" and "point culling" techniques to make the display fast regardless of how many points are being displayed. Although GNUplot lets you set the range of points to plot (see the "set xrange", "set yrange", etc. commands), it is a brute-force plotting tool and draws every single point.

This article focused on visualizing output of a Linear-mode system, but the same basic commands can be used on used on Geiger-mode point clouds. Since GmAPD systems tend to pulse the same area multiple times, I sometimes associate the "palette" color with the pulse number so I can see which overlapping points are associated with which pulse.

Comments

Roger said…
Interesting post, thanks. Any pointers on some techniques for auto-culling, so that large point-clouds can be visualized this way?
Niek Sanders said…
For large point clouds, you're probably better off using one of the specialized tools that we've listed.

As for auto-culling algorithms specifically, I don't have anything handy.
Unknown said…
FYI -- We've been developing and maintaining a capability developed by University of California, Santa Cruz, that has some nice capabilities for 3D point cloud viewing. Check out Slugview.
https://websites.pmc.ucsc.edu/~seisweb/SlugView/Slugview.html

Popular posts from this blog

Viewing and Importing DIRSIG Output Images

We are often asked what programs can view DIRSIG's image outputs and how to import the raw DIRSIG image data files into other tools for further processing. For basic image viewing, DIRSIG-4.4.0 now includes a very simple viewing tool. Launch it from the main simulation editor window by selecting the "Start image viewer" option from the "Tools" menu. If you run your simulation from the GUI simulation editor, new image files are automatically added to the list in the image viewer as they are generated. If you want to manually add files to the list, simply select the "Open" item from the "File" menu or the toolbar. Here is a screenshot of the main image viewer window. The top part contains the list of currently opened files and the bands within those image files. To view a single band as a gray-scale image, choose "Single Band Display" from the combo box and then click on the image band that you want. Finally, click "Load Band

Using MODTRAN6 with DIRSIG

It has been a pretty exciting year for the team at Spectral Sciences, Inc.  with the release of MODTRAN6 . This latest version marks a major milestone in the continued development of one of the most popular and trusted codes for simulating radiative transfer in the atmosphere. In addition to important science related advancements, this latest code also includes significant improvements to the general usability of the software. This includes a new graphical user interface (GUI) and the introduction of a formal application programmer interface (API), which let's codes like DIRSIG interact with MODTRAN in a far more robust way than previous versions allowed. New MODTRAN, new interfaces The major development in the interface area is a shift from the old "tape5" style inputs to a new JSON (JavaScript Object Notation) style input. In addition to improving the general readability of the input, the JSON document format is much easier to read in, modify and write back out. The