Lasclassify: argument position and classification process for mobile LiDAR

737 views
Skip to first unread message

K.H.

unread,
May 5, 2016, 12:19:42 PM5/5/16
to LAStools - efficient tools for LiDAR processing
Hello, 

I am working on classification and tried to use some argument such as '-planar 0.2' and '-keep_class ~' in lasclassify, but I was not really sure where I can put this in the command.


I tried to put those where the red marks are, but not recognized and did not run it. Any advice where I can place it?? 


"C:\software\LAStools\bin\lasclassify.exe" -v -i "D:\LiDAR\0502\processing\las_original_manual2_lasheight.las"      -small_buildings -olas -odir "D:\LiDAR\0502\processing" -odix "_class"     



I am very new in LiDAR (my first time to process), and doing some exploration on mobile LiDAR data currently. I ran the lascalssify on my raw LiDAR data, and the points were classified as buildings, high vegetation and unassigned. However there were still many of building points (mostly wall) classified as unassigned, and that's why I would like to use the additional argument to see if it makes any difference.

Does anyone have experience in mobile LiDAR data? Ideally, I would like to classify entire buildings, lamp posts, and power lines.. etc. For better building classification,  I tried reclassify 'unassigned' points from the first classification. so I got unassigned building points(mostly walls) as high vegetation, then changed its class code to building in order to merge with my previous building class points. It seemed work.. but a lot of extra work to do.

Thank you. 

Martin Isenburg

unread,
May 6, 2016, 4:01:01 PM5/6/16
to LAStools - efficient command line tools for LIDAR processing
Hello,

adding those command-line parameters in various places works without trouble for me. Note that '-keep_class ~' makes is not a valid command and '-keep_class 3 4 5' as I am doing below does not really make sense (and leads to poor results). Also ... you cannot expect lasclassify to work for mobile data (see the README file) as the expectation is that there are roofs scanned from above. That is what lasclassify does: looking for horizontal planar areas that are 2 meters or higher above the ground. I do not have a solution for finding the sides of buildings in LAStools (well ... there sort of is one by making density grids with lasgrid as building facades turn into lines of very high density in the raster.

Regards,

Martin @rapidlasso

D:\LAStools\bin>lasclassify -version
LAStools (by mar...@rapidlasso.com) version 160429 (academic)

D:\LAStools\bin>lasclassify -v -i ..\data\fusa.laz  -small_buildings -olas -odir "D:\LAStools\bin\mist" -odix "_class"
processing file '..\data\fusa.laz'.
reading 277573 points. step 2 m, ground offset 2.00 m, planar 0.1, rugged 0.4, sub 5 ...
took 0.109 sec. finding buildings and vegetation ...
took 1.532 sec. adding gutter points ...
took 0.343 sec. added 3603. removing overhanging vegetation points ...
took 0.016 sec. removed 1877. removing small trees ...
took 0.047 sec. removed 1088. outputting ...
took 0.14 sec. 43020 building points. 35638 vegetation points.
done with 'D:\LAStools\bin\mist\fusa_class.las'. total time 2.187 sec.

D:\LAStools\bin>lasclassify -v -i ..\data\fusa.laz -planar 0.2 -small_buildings -olas -odir "D:\LAStools\bin\mist" -odix "_class"
processing file '..\data\fusa.laz'.
reading 277573 points. step 2 m, ground offset 2.00 m, planar 0.2, rugged 0.4, sub 5 ...
took 0.109 sec. finding buildings and vegetation ...
took 1.505 sec. adding gutter points ...
took 0.364 sec. added 5184. removing overhanging vegetation points ...
took 0.031 sec. removed 4211. removing small trees ...
took 0.031 sec. removed 1446. outputting ...
took 0.141 sec. 48678 building points. 27301 vegetation points.
done with 'D:\LAStools\bin\mist\fusa_class.las'. total time 2.181 sec.

D:\LAStools\bin>lasclassify -v -i ..\data\fusa.laz -planar 0.2 -small_buildings -olas -odir "D:\LAStools\bin\mist" -odix "_class" -keep_class 3 4 5 6
processing file '..\data\fusa.laz'.
reading 277573 points. step 2 m, ground offset 2.00 m, planar 0.2, rugged 0.4, sub 5 ...
took 0.109 sec. finding buildings and vegetation ...
took 0.875 sec. adding gutter points ...
took 0.377 sec. added 5501. removing overhanging vegetation points ...
took 0.015 sec. removed 5816. removing small trees ...
took 0.016 sec. removed 1425. outputting ...
WARNING: written 79152 points but expected 277573 points
took 0.109 sec. 61861 building points. 9892 vegetation points.
done with 'D:\LAStools\bin\mist\fusa_class.las'. total time 1.501 sec.



K.H.

unread,
May 7, 2016, 3:17:56 AM5/7/16
to LAStools - efficient tools for LiDAR processing
Hello Martin, 

Thank you again for your advice. I thought lasclassify would work for the mobile LiDAR data. Well,I still get some building class by using this tool, so that should be okay at this test. 

The only reason I tried to use 'keep_class' (I tried to use 3, 4, 5, 6) was because I did not have any result in class 3 or 4 (low and medium vegetation) after running Lasclassify, and I thought it would work for determining class 3 and 4 if I use that command (I guess I did not fully understand how it works). All my classification results were in 1, 2, 5 and 6 although there are some vegetation areas can be considered as low/ medium vegetation. Is there any way that I can extract those vegetation as well? Or it is just not in the data, so I could not extract? 

Martin Isenburg

unread,
May 7, 2016, 5:31:46 AM5/7/16
to LAStools - efficient command line tools for LIDAR processing

Hello,

The lasclassify tool only classifies high vegetation. I am not sure if other LiDAR software classifies medium and low vegetation  based on the distribution of points. I think it is often done based on height above ground on whatever points remain unclassified. Try if this works for you *after* running lasclassify:

lasheight -i classified.laz ^
                  -ignore_class 5 6 ^
                  -classify_between 0.5 1.0 3 ^
                  -classify_between 1.0 2.0 4 ^
                  -o classified_low_med_veg.laz

Regards,

Martin @rapidlasso

Terje Mathisen

unread,
May 7, 2016, 6:48:39 AM5/7/16
to last...@googlegroups.com
Martin Isenburg wrote:
>
> Hello,
>
> The lasclassify tool only classifies high vegetation. I am not sure if
> other LiDAR software classifies medium and low vegetation based on
> the distribution of points. I think it is often done based on height
> above ground on whatever points remain unclassified. Try if this works
> for you *after* running lasclassify:
>
> lasheight -i classified.laz ^
> -ignore_class 5 6 ^
> -classify_between 0.5 1.0 3 ^
> -classify_between 1.0 2.0 4 ^
> -o classified_low_med_veg.laz
>

I do this in the lasheight step:

$cmd = sprintf(q(lasheight -i %s -drop_below -5 -drop_above 100
-classify_between %f %f 3 -classify_between %f %f 4 -classify_between %f
100 5 -o %s 2>nul),
$gfile, $LOW_START, $LOW_MED, $LOW_MED, $MED_HIGH, $MED_HIGH,
$hfile);

I.e. I use the -classify_between <low> <high> <class> options to define
the height classes for low/medium/high veg.

Terje

> Regards,
>
> Martin @rapidlasso
>
> On May 7, 2016 9:17 AM, "K.H." <j.ke...@gmail.com
- <Terje.M...@tmsw.no>
"almost all programming can be viewed as an exercise in caching"

sri...@vassarlabs.com

unread,
Mar 29, 2018, 8:52:35 PM3/29/18
to LAStools - efficient tools for LiDAR processing
Hi Martin,

The lasclassify tool is giving ground and high vegetation only not buildings. 

Steps 

lasground -i ELURU_NADIR_group1_densified_point_cloud_part_15.las -o ELURU_NADIR_group1_densified_point_cloud_part_15_earth.las -city -feet -elevation_feet 
lasheight -i ELURU_NADIR_group1_densified_point_cloud_part_15_earth.las -o ELURU_NADIR_group1_densified_point_cloud_part_15_heights.las
lasclassify -i ELURU_NADIR_group1_densified_point_cloud_part_15_heights.las -o ELURU_NADIR_group1_densified_point_cloud_part_15_classified.las -feet -elevation_feet


histogram of classification of points:
         8583381  unclassified (1)
        10798161  ground (2)
         2416147  high vegetation (5)

Please let me know to how to classify the buildings, Road Surface.

Thanks,
Sridhar.B

Martin Isenburg

unread,
Mar 29, 2018, 10:21:47 PM3/29/18
to LAStools - efficient command line tools for LIDAR processing
Hello Sridhar,

judging by your file names you are working not with LiDAR but with photogrammetric point clouds. For those it is much harder to tell buildings from vegetation as the point cloud does not have points under *and* on top of and in the middle of the vegetation. This is what makes buildings different from vegetation in LiDAR. The laser penetrates and generates points on many different heights in vegetation but only along a (assumed) planar roof on buildings. I would expect that with the default parameters you should find mostly buildings with many (smooth) canopies being miss-classified as buildings instead of the other way round. Unless, however, your  photogrammetric points are noisy and do not form a planar surface on the building roofs. I wonder how others have fared in trying to classify point clouds from dense-matching into vegetation and buildings. Already getting a good ground is typically hard. We have a number of articles on on how to use LAStools to get reasonable DTMs from dense-matching photogrammetry on our company blog that often provide the data and guide you through step by step:


Regards,

Martin @rapidlasso


Reply all
Reply to author
Forward
0 new messages