Page 1 of 2

[SOLVED] CSF PLUGIN Top to bottom projection

Posted: Sat Dec 30, 2023 12:31 am
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.

Re: CSF PLUGIN Top to bottom projection

Posted: Sat Dec 30, 2023 7:00 am
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?

Re: CSF PLUGIN Top to bottom projection

Posted: Sat Dec 30, 2023 10:32 am
by PablerasBCN
smart! XD. I'll try and report back, definitelly sounds like will work.

Re: CSF PLUGIN Top to bottom projection

Posted: Sat Dec 30, 2023 12:19 pm
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.

Re: CSF PLUGIN Top to bottom projection

Posted: Sat Dec 30, 2023 12:28 pm
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.

Re: CSF PLUGIN Top to bottom projection

Posted: Sat Dec 30, 2023 12:30 pm
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

Re: CSF PLUGIN Top to bottom projection

Posted: Sat Dec 30, 2023 3:23 pm
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

Re: CSF PLUGIN Top to bottom projection

Posted: Sat Dec 30, 2023 7:29 pm
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.

Re: [SOLVED] CSF PLUGIN Top to bottom projection

Posted: Mon Jan 01, 2024 5:59 pm
by daniel
This is now available in the latest 2.13.beta release!

Re: [SOLVED] CSF PLUGIN Top to bottom projection

Posted: Mon Jan 01, 2024 11:15 pm
by PablerasBCN
wow thanks. will report if it works!