SO503 Spring 2012
Matlab and LIDAR Point Clouds/3D graphics
LIDAR point clouds come in a wide variety of formats. The simplest are
ASCII text files, with three values per line, x, y, and z. It is quite
likely, however, that that files will be too big to deal with in Excel, at least
the older versions of the program.
There are two variants:
- Whether or not there is a header line, with the names of the columns.
You can add or remove this with an editor like Notepad or Wordpad, although
Matlab does not appear to be very fussy about this.
- What separates the values (the delimiter, which can commonly be a comma,
a space, or a tab). You should look up the dlmread
command in the Matlab help to see how you can set the correct delimiter.
You can also do a global search and replace in an ASCII editor, but this is
likely to be painfully slow.
For serious use, the most common format is LAS, which is binary and
substantially more compact that these ASCII files. LAS files can have
hundreds of millions of points (up to 15 points per square meter), and be
gigabytes in size.
You will use the following Point Clouds:
- v1-thin5.txt: from a historical ship.
(178,319 points; this was thinned by MICRODEM from a file 5 times
larger)--try a grid size of 0.1
- toronto.csv, from a Canadian city
(65,535 points; this was truncated by Excel from a larger file)--try a grid
size of 1
- 2008_NH_Portsmouth_30464_raw.txt (2326 points) --try a grid size of 1
We will be doing
Lab 1 in the reading, which starts on page 32. You have the data file
already, so you can jump to the middle of page 35 for directions on using Matlab.
We do not have an m file to start with, but you can use the code on page 38 as a
starting point. Note that these procedures will be happiest with data
imported as a matrix, which is a little different than we have used to date when
we have used vectors.
You will ultimately produce Figures for all three datasets; if your Matlab is
slow, you might think about which data set will be best (fewest or most points?) to use while you are
debugging your code.
Create the following figures (you might have to check the help on the
parameters to use with each; there are samples of all 5 below):
- surfl
- surface
- surfc
- trimesh
- scatter3
You can open the three files in MICRODEM (latest version only) with the Point
Clouds menu choice. You can also look at a
Baltimore LIDAR file in MICRODEM; its 2.8
million points will probably choke Matlab.
You will turn in for this lab:
- At least 5 figures, one from the commands above, with all three of the data
sets represented among your graphs so that I can be sure you successfully
imported each data set. You should insure that you export as dumb
pictures, and not as an embedded object, or you will have a painful slowdown
every time your Word screen tries to redraw. If that occurs when I try
to grade your paper, it will come back to you for correction.
- Your matlab source code, showing how you modified the code to deal with
the three different input files.
- A discussion about whether you think the three data files are
essentially identical, or if they have geometric differences which determine
which of the visualization options best depicts the data.
- A comparison of the advantages and disadvantages of using Matlab to
visualize this kind of data, compared to a more specialized program.
Links for this lab only available within USNA
Matlab figures for surfl, surface, surfc, trimesh, and
scatter3 for the smallest data set





MICRODEM Images for the two larger data sets


