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