Command line - Random subsample to a percentage of the original cloud

Feel free to ask any question here
Post Reply
max72
Posts: 14
Joined: Fri Jul 31, 2015 9:47 pm

Command line - Random subsample to a percentage of the original cloud

Post by max72 »

I often subsample the clouds from the command line, using spatial subsample, but sometimes for a quick check I would like to be able to subsample using the mush faster random algorithm, maybe to 10% of the original cloud, or something similar.
Is there a way to do that from command line?
Thanks in advance,
Massimo
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Command line - Random subsample to a percentage of the original cloud

Post by daniel »

Yes, you just need to call -SS RANDOM N... but you'll need to set a number of points (N), not a percentage.
Daniel, CloudCompare admin
max72
Posts: 14
Joined: Fri Jul 31, 2015 9:47 pm

Re: Command line - Random subsample to a percentage of the original cloud

Post by max72 »

Thanks,
I didn't explain well, sorry.
I'm aware of the current random option, but if I have a bunch of clouds and want to simply reduce the size for fast checks using the command line I wouldn't be able to specify the target points for the cloud. A target percentage would be easier.
As an alternative is there a way to extract the number of points in the cloud from the command line?

Thanks again,
Massimo
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Command line - Random subsample to a percentage of the original cloud

Post by daniel »

Ah, that's why I specified that it was not a percentage but an absolute number. Sadly it's not possible to use a percentage or retrieve the number of points (apart with the Python interface I guess).
Daniel, CloudCompare admin
max72
Posts: 14
Joined: Fri Jul 31, 2015 9:47 pm

Re: Command line - Random subsample to a percentage of the original cloud

Post by max72 »

ok, got it.

Thanks,
Massimo
Post Reply