Populating Intensity field and user field

115 views
Skip to first unread message

Alejandro Hinojosa

unread,
Oct 19, 2016, 9:40:29 AM10/19/16
to last...@googlegroups.com
Hi LAStools group enthusiats,

Lately I have been working with photogrametric derived dense point clouds using RGB and near infrared (NIR) cameras, mainly using Pix4D with  photos taken by Ebee fixed wing drone and saving point cloud as LAS or LAZ (1.2) format.

I wonder if I can populate  the point cloud  intensity field in LAS format  doing an avergare of the RGB color vectors.

Also it would be interesting populating a field (user field?) with the NDVI vegetation index from the NIR point cloud calculated form the RGB components using the formula (red-green)/(red+green). The red channel holds the NIR component and the green channel the red. The formula generates values from -1 to +1, but it could be scaled to an signed short int between -128 to 128. It could also be scaled using the same scheme as the 3D coordinates; NDVI=ndvi*scale +offset,...

I know some of you had thought of this, Martin?

--
Alejandro Hinojosa
CICESE

Martin Isenburg

unread,
Oct 23, 2016, 8:29:41 AM10/23/16
to LAStools - efficient command line tools for LIDAR processing
Hello Alejandro,

turns out you are not the only one who has LAS /LAZ files with xyz coordinates and CIR values stored as RGB. For this purpose a new filter has been added that computes the NDVI on-the-fly and then keeps the NDVI range [0.4 or 0.8] or whichever else you want:

lasview -i xyzCIR.laz -keep_NDVI_from_CIR 0.4 0.8 

The above assumes that CIR is stored as RGB with the NIR channel in G and the red channel in B. If instead the RGB is in fact RGB and the NIR channel was stored to the intensity field then you should use

lasview -i xyzCIR.laz -keep_NDVI_intensity_is_NIR 0.4 0.8

instead. If you have LAS 1.4 points of point type 8 with the NIR channel populated then

lasview -i xyzCIR.las -keep_NDVI 0.4 0.8

would do the trick. Combine "on-the-fly" NDVI filtering with a '-filtered_transform' to set classifications based on NDVI.

las2las -i xyzCIR.laz ^
            -keep_NDVI_from_CIR 0.4 0.8 ^
            -filtered_transform ^
            -set_classification 9 ^
            -odix _class -olaz 

Here a complete list of the updates in the most recent release that can always be found at 


16 October 2016 -- laslayers: new option '-add' to add filters and transforms as LASlayers to LAY files
16 October 2016 -- LASlib, las2las: new filters '-keep_attribute_between' and '-drop_attribute_between'
15 October 2016 -- las2dem, las2iso, las2tin: no more endless loop when '-lakes' or '-creeks' input is emtpy
30 September 2016 -- LASlib, las2las: new filter -keep_NDVI_blue_is_NIR -0.1 0.5 (computed from R of RGB and B = NIR)
30 September 2016 -- LASlib, las2las: new filter -keep_NDVI_green_is_NIR 0.4 0.8 (computed from R of RGB and G = NIR)
30 September 2016 -- LASlib, las2las: new filter -keep_NDVI_intensity_is_NIR -0.2 0.2 (computed from R of RGB and intensity = NIR)
30 September 2016 -- LASlib, las2las: new filter -keep_NDVI_from_CIR 0.4 0.8 (computed from RGB = CIR)
30 September 2016 -- LASlib, las2las: new filter -keep_NDVI 0.2 0.7 (computed from R+NIR for point type 8)
29 September 2016 -- LASlib, las2las: new filters -keep_extended_scanner_channel 1 and -drop_extended_scanner_channel 0
25 September 2016 -- lasgrid: better '-false' and '-gray' colors when used with option '-classification'  

Regards from Sri Lanka,

Martin @rapidlasso

las2las_new_ndvi_filter_1.jpg
las2las_new_ndvi_filter_2.jpg
las2las_new_ndvi_filter_3.jpg
Reply all
Reply to author
Forward
0 new messages