Penultimate Returns

62 views
Skip to first unread message

a.hofmann

unread,
Nov 21, 2016, 6:11:16 AM11/21/16
to LAStools - efficient tools for LiDAR processing
Hi,

is there any way to use the penultimate return as a filter? Like "Last_Pulse" just "Penultimate_Pulse" or something like that?

I could have a use for this function in a pointcould which has some fauly points in our buildings! The buildings have the last return points inside of it, which is wrong in that case!

I attached a picture where i marked the "wrong" points. They are parallel to the roof and are of course last pulse!

The points could sorted out with using single and multireturn as a filter, but i also cutted out some vegetation points over buildings, which is not satisfying me now....


I know i could use the return numbers on thier own but i dont how many returns a tree over a building has, so 2nd 3rd or 4th return is always a trying out in this way!

I hope you understand my problem and my english writing.


Thx in advance

Alex
lastreturn_faulty_data.JPG

Terje Mathisen

unread,
Nov 21, 2016, 7:27:03 AM11/21/16
to last...@googlegroups.com
a.hofmann wrote:
> Hi,
>
> is there any way to use the penultimate return as a filter? Like
> "Last_Pulse" just "Penultimate_Pulse" or something like that?
>
> I could have a use for this function in a pointcould which has some
> fauly points in our buildings! The buildings have the last return
> points inside of it, which is wrong in that case!

I think what you need/want is a filter which removes returns _below_ a
surface determined to be a building roof?

This is similar to removing (marking as "withheld" or "noise"?) spurious
points below the ground surface TIN.

One possible problem is or course that you will normally get returns
below the roof surface when you are scanning close to the edge of said
roof, and while scanning from an angle you will also get returns from
the walls and ground which are underneath the overhang of the roof.

I.e. it is only when you are well inside the roof edges that you can
know for sure that such returns must be bogus.

Terje
>
> I attached a picture where i marked the "wrong" points. They are
> parallel to the roof and are of course last pulse!
>
> The points could sorted out with using single and multireturn as a
> filter, but i also cutted out some vegetation points over buildings,
> which is not satisfying me now....
>
>
> I know i could use the return numbers on thier own but i dont how many
> returns a tree over a building has, so 2nd 3rd or 4th return is always
> a trying out in this way!
>
> I hope you understand my problem and my english writing.
>
>
> Thx in advance
>
> Alex
> --
> Download LAStools at
> http://lastools.org
> http://rapidlasso.com
> Be social with LAStools at
> http://facebook.com/LAStools
> http://twitter.com/LAStools
> http://linkedin.com/groups/LAStools-4408378
> Manage your settings at
> http://groups.google.com/group/lastools/subscribe


--
- <Terje.M...@tmsw.no>
"almost all programming can be viewed as an exercise in caching"

a.hofmann

unread,
Nov 21, 2016, 8:12:29 AM11/21/16
to LAStools - efficient tools for LiDAR processing, terje.m...@tmsw.no
The thing about this is: The points below the roof which are walls etc. are not a real problem, the big problem is that there is "another" prarallel roof which is caused by weather or something like that!
Of course this filter would help, but for sure the "penultimate return" would help all the way cause this "wrong parallel roof" is the last pulse, where the real roof point is the penultimate one!


It is a bit hard to explain. Maybe i should add a small part of the lidar file here to show you my problem. The roof is classified as building, the wrong points are on class 19 atm. but there are also some good points at 19 which don´t have to be there imho.

I added 2 small tifs where u can see what the points cause. But every point has e parallel one which is in the "right" position. So i loose some points and in some roofs i loose a lot of points, which is kind of sad!
25815460.tif
25815460_drop19.tif

Tobias K Kohoutek

unread,
Nov 21, 2016, 8:49:01 AM11/21/16
to LAStools - efficient tools for LiDAR processing, terje.m...@tmsw.no
Your idea is to delete those points or would you be fine by having them all classified as class 6 (buildings/constructions)?

In that case you could use your pre-classified pointcloud and use:

lasboundary -i lidar.las -keep_class 6 -convavity 1.5 -o building_footprints.shp

to generate a shape file which you can then use in

lasclip -i  lidar.las -poly building_footprints.shp -o output.laz -classify 6 -interior -v

to classify all points inside the polygon as class 6.

Cheers,
Tobias

Martin Isenburg

unread,
Nov 21, 2016, 8:49:21 AM11/21/16
to LAStools - efficient command line tools for LIDAR processing
Hello,

you could first see if the singling out of "second-to-last" or "penultimate" returns will really solve your problem by first reclassifying them into a different class and then see if this accomplishes something. Attached a screenshot where the second of three returns are red (8), the third of four returns are blue (9), and the fourth of five returns are yellow (12).

:: reclassify second of three

las2las -i ..\data\sample.laz ^
            -keep_return 2 -keep_triple ^
            -filtered_transform ^
            -set_classification 8 ^
            -o modified1.laz

lasview -i modified1.laz

:: reclassify third of four

las2las -i modified1.laz ^
            -keep_return 3 -keep_quadruple ^
            -filtered_transform ^
            -set_classification 9 ^
            -o modified2.laz

lasview -i modified2.laz

:: reclassify fourth of five 

las2las -i modified2.laz ^
            -keep_return 4 -keep_quintuple ^
            -filtered_transform ^
            -set_classification 12 ^
            -o modified3.laz

lasview -i modified3.laz

But looking at your hillshades I'd say this is a case for the "spike-free" algorithm as this may cover up (via "freezing" of higher triangles" exactly those unwanted "penetrations" into the roof.

Regards,

Martin @rapidlasso

las2las_marking_second_to_last_returns.jpg

a.hofmann

unread,
Nov 22, 2016, 5:56:39 AM11/22/16
to LAStools - efficient tools for LiDAR processing
Good Morning,

i´m going to check out what you advised me. The thing about clipping is, afaik the shp is not used as a 3D polygon, so no Z values are used in lasclip. Correct me please if i´m wrong with that.

As soon as i am ready with checking out i´m telling you my results.

The Problem doesn´t seem hard to solve, the only thing is that there are buildings with tree overhangs or some wire connectors. So i have my "wrong last pulse" and my good "penultimate pulse" and than lets say pulse 1 and 2 some tree points...

If the pulses would start from ground to "heaven" i could say the right pulse or point i need is always the second, but as is it the opposite and right way :-) , i can´t


Thx for your help so far, i hope i can fix the problem fast.

a.hofmann

unread,
Nov 24, 2016, 5:51:31 AM11/24/16
to LAStools - efficient tools for LiDAR processing
Good morning again,

as i said i tried out your advices and it went pretty good in one hand, but on the other hand i got the problems which i expected to get.

The "good points" are on return 1 (of 2) on buildings with no trees or any other vegetation, but but as soon as there is something like a tree or wire connector the good  points are on return 2 (of 3) or some really few on 3 (of 4) so its always the penultimate return which has my good points in it.

Of course i can separate all files now and just extract them, but isn´t there an easier way?

@ Martin, to the point where you said i should use the "spike_free" algorithm, i used it before and results where great! In this case i just wanted to show you all a really fast example of my problems! But thx again for implementing that, it´s a really great filter!

Kindest regards and thx in advance

Alex


Am Montag, 21. November 2016 12:11:16 UTC+1 schrieb a.hofmann:

Martin Isenburg

unread,
Jan 4, 2017, 3:53:52 PM1/4/17
to LAStools - efficient command line tools for LIDAR processing
Hello,

the new filters '-keep_second_last' and '-drop_second_last' that were requested by Alex are implemented and available in all tools of the latest version of LAStools (170102). Here an example of how to use it:

lasview -i ..\data\sample.laz -keep_second_last
lasview -i ..\data\sample.laz -drop_second_last

Some more background on the issue that require these filters. Apparently the noise comes from a "kind of special“ roof constellation. Like a wet roof or frozen roof that is then scanned. The scan happened in February last year where it was quite cold. The company which did the scanning explained it is because the laser light is "getting caught" in something like an ice or a waterdrop for longer than the direct reflection, just some nanoseconds and that causes the noise. They also said that this is a quite common thing. Has anybody else experienced that?

Attached some images from the situation. Looks at this sparse sheet of "ghost returns" that are hanging under the roof of the house. If you simply interpolate the last returns you get very very ugly spikes in the roof as those "ghost returns" are all numbered as the last return of the shots for which they happened ... maybe another application for our spike-free DSM algorithm?

Regards,

Martin @rapidlasso

--
penultimate_return_issue_0.jpg
penultimate_return_issue_1.jpg
penultimate_return_issue_2.jpg
penultimate_return_issue_3.jpg
Reply all
Reply to author
Forward
0 new messages