[SOLVED] CSF PLUGIN Top to bottom projection

To post any request/idea for new functionalities
PablerasBCN
Posts: 296
Joined: Sat Jan 20, 2018 1:57 pm

[SOLVED] CSF PLUGIN Top to bottom projection

Post by PablerasBCN »

Request: add checkbox so the projection of the cloth is done upside down instead botton-up.

Why?

To extract the top layer of the forest for smoother realtime visualization of the data, getting rid of points that would be rendered yet ocluded. Not to mention the file size, hence smoother streaming.

Removing the ground is not just enough.

I did test this idea rotating a cloud tile 180, and playing with the threshold it can be easily defined how deep from the canopy go with the selection.

If implemented please also consider CLI command option.
Last edited by PablerasBCN on Sat Dec 30, 2023 3:24 pm, edited 1 time in total.
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: CSF PLUGIN Top to bottom projection

Post by daniel »

Won't it work if you simply multiply the Z coordinate of the cloud by '-1' (before calling CSF) and then multiply the Z coordinate of the resulting mesh vertices by '-1' again?
Daniel, CloudCompare admin
PablerasBCN
Posts: 296
Joined: Sat Jan 20, 2018 1:57 pm

Re: CSF PLUGIN Top to bottom projection

Post by PablerasBCN »

smart! XD. I'll try and report back, definitelly sounds like will work.
PablerasBCN
Posts: 296
Joined: Sat Jan 20, 2018 1:57 pm

Re: CSF PLUGIN Top to bottom projection

Post by PablerasBCN »

so I was looking into it right now, In CLI it seems the Multiply/scale is not available.

I guess the transformation matrix is the way to go? learning how to use it now.
PablerasBCN
Posts: 296
Joined: Sat Jan 20, 2018 1:57 pm

Re: CSF PLUGIN Top to bottom projection

Post by PablerasBCN »

ok so I was preparing the .bat

"for %%f in (E:\LIDAR_JAPAN\MMS8_Prototype_3\DEM\00_Dem\*.txt) DO "C:\Program Files\CloudCompare\cloudcompare.exe" -SILENT -O -GLOBAL_SHIFT AUTO %%f -AUTO_SAVE OFF -C_EXPORT_FMT LAS -NO_TIMESTAMP -APPLY_TRANS flip_Z_matrix.txt -CSF -SCENES RELIEF -PROC_SLOPE -CLOTH_RESOLUTION 0.2 -CLASS_THRESHOLD 0.7 -EXPORT_GROUND -EXPORT_OFFGROUND "

Not the end of the world, but I believe there is no way to flip back the ground- offground data in the same batch.
PablerasBCN
Posts: 296
Joined: Sat Jan 20, 2018 1:57 pm

Re: CSF PLUGIN Top to bottom projection

Post by PablerasBCN »

also, unrelated directly to OP, but in the documentation of CLI,

"-CSF {filename} "

States that the files are exportes as .bin,

When I used this command in the past, if "C_EXPORT_FMT LAS " was present, .as would be exported, which I preffer for this case. I guess .bin is a default value.

https://www.cloudcompare.org/doc/wiki/i ... _line_mode
PablerasBCN
Posts: 296
Joined: Sat Jan 20, 2018 1:57 pm

Re: CSF PLUGIN Top to bottom projection

Post by PablerasBCN »

so, I kept thinking on this topic...

I see 2 additional ways to get the top layer of the aerial lidar.

1) Compute PCV, filter brighter values, hence obtain the more exposed "to the sky" points. (tested to work superb)
2) hidden point removal, in theory should work similarly to PCV, but has the limitation of being top view only while PCV is 360x180 degress light source. So, despite the brighter areas in the edges it may be the way to go.

IU also believe PCV performs better CSF as PCV would be like CSF but if afterwards air pressure was removed so it wrapped around the object.

A super low res 128 ray x 128 res does the job. Also it looks like could be use to count tree density:

Image

Image
HeadLess
Posts: 56
Joined: Mon Mar 25, 2019 9:27 pm

Re: CSF PLUGIN Top to bottom projection

Post by HeadLess »

PablerasBCN wrote: Sat Dec 30, 2023 12:28 pm ok so I was preparing the .bat

"for %%f in (E:\LIDAR_JAPAN\MMS8_Prototype_3\DEM\00_Dem\*.txt) DO "C:\Program Files\CloudCompare\cloudcompare.exe" -SILENT -O -GLOBAL_SHIFT AUTO %%f -AUTO_SAVE OFF -C_EXPORT_FMT LAS -NO_TIMESTAMP -APPLY_TRANS flip_Z_matrix.txt -CSF -SCENES RELIEF -PROC_SLOPE -CLOTH_RESOLUTION 0.2 -CLASS_THRESHOLD 0.7 -EXPORT_GROUND -EXPORT_OFFGROUND "

Not the end of the world, but I believe there is no way to flip back the ground- offground data in the same batch.
Just apply the inverse transformation, after calculation, and save them with SAVE_CLOUDS

Just a sidenote since the command file argument got merged, i'd encourage to use that :) i'm loving that. I can see the commands, and save them for later processing. And you can even create a bat file where you drag and drop a command file to a bat it can be handy :)

What i'm thinking is to create comments lines because that would be a nice touch to the command files :)

SELECT_ENTITIES will also help you later on with your rather long commands, which is under review right now.
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: [SOLVED] CSF PLUGIN Top to bottom projection

Post by daniel »

This is now available in the latest 2.13.beta release!
Daniel, CloudCompare admin
PablerasBCN
Posts: 296
Joined: Sat Jan 20, 2018 1:57 pm

Re: [SOLVED] CSF PLUGIN Top to bottom projection

Post by PablerasBCN »

wow thanks. will report if it works!
Post Reply