Page 1 of 3

Command line mode and classification

Posted: Fri Feb 13, 2015 1:19 pm
by Haowyr
Hello all,

Currently working on a project of point cloud classification and vectorisation to end my engineer studies, I've been working on the combination of CC and Canupo
Thanks to the work (and precious help) from Dimitri few weeks ago, I've been able to perform a classification on a small urban tile of MMS scan from a pretty large project.

Image

As a first step of this project, I'm pretty happy with this first result of the classification, using canupo to detect some shapes (piles, vegetation, vertical and horizontal planes for now). But as describe previously, this is only a little piece of a way larger area I would like to classify automatically.

And this is where my issues start appearing; I have for now, no idea how to find the command line version of CC to try to create a batch on many tiles. Where can I find it?
I have found the Canupo command line version but for now haven't been able to run it properly, for example when I wanna subsample my point cloud, using "resample.exe" with a spatial parameter and a 0.02 radius, and the "subsample" function with the same parameters on the point cloud, I have much fewer points using the .exe of canupo; how is it possible?
For no, the classification via the command line version of canupo either crashed (still don't know why) or a result with only few lines remaining in the point cloud (probably coming from the fact that I'm working with large coordinates and I can't use a global shift).

If you have any hint for me to work on to create my batch processus, that'd be perfect!

Thanks in advance,


Corentin Blanc,
Elève ingénieur INSA Strasbourg 5ème année,
Stagiaire FIT Conseil Nantes.

Re: Command line mode and classification

Posted: Fri Feb 13, 2015 1:47 pm
by daniel
Hi,

In fact the original canupo suite (from N. Brodu and D. Lague) has few in common with the CloudCompare plugin "qCanupo". Especially the subsampling method (I guess they don't use the same algorithm, this may explain why it doesn't give the same result). However I thought this suite was pretty stable so I'm a bit intrigued by the crashes (maybe it's a matter of parameters? You should ask Dimitri about this).

And sadly for you, there's currently no mean to call a plugin via the command line in CloudCompare (you can only call CloudCompare's core algorithms). It's not theoretically impossible but it will require some major modifications of the way things currently works (so it will take some time).

P.S.: You could at least subsample the clouds with CloudCompare (http://www.cloudcompare.org/doc/wiki/in ... ommandLine).

Re: Command line mode and classification

Posted: Fri Feb 13, 2015 1:52 pm
by Haowyr
Thanks for the quick answer,
I could actually try to subsample with the command line version of CC but I have no idea where to find it, and I've been looking for it for a while. Can you help me with this?

Re: Command line mode and classification

Posted: Fri Feb 13, 2015 3:06 pm
by daniel
Have you looked at the link?!

Re: Command line mode and classification

Posted: Fri Feb 13, 2015 3:19 pm
by Haowyr
I had many times before this but I just understood how I was supposed to launch it! Finally! Thanks.

Re: Command line mode and classification

Posted: Wed Feb 25, 2015 9:16 am
by Haowyr
Hello, it's me again.

Thanks to your information and dimitri's, I have managed to use Canupo in command line pretty correctly and start using CC in command line too.
I have only few problems for now working with some fonctions of CloudCompare. For example I haven't been able to make "-COMPUTE_NORMALS" and "-APPLY_TRANS" work for now. I have tried to put -COMPUTE_NORMALS in any position in the command line but still haven't found the right position. For -APPLY_TRANS, I have the same error popping, wrong position or unknown command even if it seems pretty simple to me, using this type of command line:
cloudcompare -o Clautom_data/Pierrelaye_trans_resamp.xyz -apply_trans Clautom_data/Matrix_trans.txt
With the matrix looking like this:
1 0 0 -1638600
0 1 0 -8202500
0 0 1 0
0 0 0 1
I also can't find the function "Label Connected Components" int the commande line mod, is it already implemented?

Thanks in advance for the answer!

Re: Command line mode and classification

Posted: Wed Feb 25, 2015 10:02 am
by daniel
First, are you working with the latest version (2.6.1)? Because the 'APPLY_TRANS' option was not available before that. If it still doesn't work, try using quotes around the transformation file path (e.g. "Clautom_data/Pierrelaye_trans_resamp.xyz").

The 'COMPUTE_NORMALS' is only taken into account when loading PTX or DP files (it tells CC to compute normals at loading time, as those files have a gridded structure that can be used to robustly compute them).

The normals computation functions of CC are not available in command line mode right now. And this is the same for 'connected components labeling'.

Re: Command line mode and classification

Posted: Wed Feb 25, 2015 10:29 am
by Haowyr
Hey

Thanks for the answer, I was running the 2.6.0 version so it might solve at least one of my problem. And I might actually find a solution for the normals with canupo command line version.

Anyway thanks for the answer again!

Re: Command line mode and classification

Posted: Wed Feb 25, 2015 2:04 pm
by Haowyr
Is it possible the function 'APPLY_TRANS' can't handle as big clouds as the one implemented directly in cloudcompare graphic version? Because when I do it on my point clouds, it is almost all good except that it rounds the second coordinate to the closest half of unity instead of just shifting like it should.
For example my first point is
1639616.938; 8202249.938; 56.582
The shift should give me (and give me in the graphic version of CC)
1016.938; -250.062; 56.582
Yet I get with the command line:
1016.938; -250; 56.582

Any hint about this "bug"?

Re: Command line mode and classification

Posted: Wed Feb 25, 2015 3:01 pm
by daniel
Warning, in command line mode you have to explicitely set the global shift handling strategy (either by setting it to AUTO or by setting it explicitely)

See the '-GLOBAL_SHIFT' option.