Batch process

Feel free to ask any question here
Post Reply
Antoine
Posts: 18
Joined: Thu Mar 23, 2017 6:03 pm

Batch process

Post by Antoine »

Hello Daniel,
I appreciate your soft for many nice computation on lidar data.
One of them is cloud to mesh operation.
Recently I was delighted to see a "command line" mode.
The idea would be to run the same suite of operations as a script file on a buchn of laz files (around 1000 blocs...).
Is it possible with cc console to add syntaxe like
FOR *.laz DO ...<cc commands>
?
I don't know if it is purely c langage or python compatible...
Thanks,

Antoine
daniel
Site Admin
Posts: 7383
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Batch process

Post by daniel »

Normally you can easily write a 'batch' script to do this.

If it's on Windows, see http://stackoverflow.com/questions/1384 ... a-for-loop and https://en.wikibooks.org/wiki/Windows_Batch_Scripting for instance. On Linux you'd want to look at bash or sh for instance.

Of course Python and Perl are other options, but you don't need them for such a simple process.
Daniel, CloudCompare admin
Antoine
Posts: 18
Joined: Thu Mar 23, 2017 6:03 pm

Re: Batch process

Post by Antoine »

Hello Daniel,
Thanks for the quick reply, that's nice.
I thought it was possible to call Ransac or Poisson command but apparently it's not possible...
Let's go further to better understand how we could implement that (in a bat file?).
At this point I don't know if I need to call explicitly CC command such as load, unload, etc...
I also don't know if you mean copy-paste my script in the CC console (i don't think so...).
Let's say I want to iterate the following procedure on thousand of LAZ files : Statistical Outlier Removal
Then should I write:
for %%f in (.\*) do (
echo "chargement fichier : %%f"
CloudCompare -O %%f
CloudCompare -SOR 100 0.1
CloudCompare -SAVE_CLOUDS
CloudCompare -CLEAR
)

At this point I would like to ask another similar interaction with CC (I can edit a new post if you prefer...).
The idea would be to
a) import camera position from a basic CSV file where [Image-filename x y z omega phi kappa] are stored
b) represent image position in CC viewport as "ball" (a classic representation mode for such photogrametric display)
c) when moving the mouse on a ball, add a pop-ups that would call a free VR engine (http://www.fsoft.it/FSPViewer/) which opens the corresponding images and offers immersive view like streeView.

Here I don't know the requirement but we could think of developing an easy plugin to handle geotag images. My dataset is from MMS survey where 360° photo are accurately know along with pointcloud.

Please advise.

Thanks,

antoine
daniel
Site Admin
Posts: 7383
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Batch process

Post by daniel »

About the command line
Indeed, plugins are not yet accessible from the command line (well, it's now technically possible, but the code needs to be developed for each plugin).

And you have to call the whole command in one line:

Code: Select all

CloudCompare -O %%f -SOR 100 0.1 -SAVE_CLOUDS -CLEAR
(note that you don't need to call SAVE_CLOUDS and CLEAR, as the first one is done automatically after each algorithm is applied - e.g. after SOR - and the last one is done automatically at the end).

Regarding your plugin idea

Well, almost anything is possible... it all depends on how skillful you are ;). Reading a file and creating a (textured) sphere is rather easy with CC. The last part may be possible with Qt?
Daniel, CloudCompare admin
Post Reply