stochastic ICP result transform matrix

Any question about the database & algorithms library 'CCLib'
Post Reply
ZilongS
Posts: 21
Joined: Tue Oct 09, 2018 8:12 pm

stochastic ICP result transform matrix

Post by ZilongS »

Hello, Daniel,

I am using de compiled version of CC, and I find that when using ICP, for the same reference cloud and same aligned clolud, the result transform matrix can be different, even the Random sampling limit is greater than the point number of the cloud to be aligned, however, do you have a solution such that every time when using ICP for two same clouds, the output matrix can always be the same (reproducible)?

Best regards

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

Re: stochastic ICP result transform matrix

Post by daniel »

If the random sampling limit is above both cloud sizes, you shouldn't have any 'random' behavior anymore...
Daniel, CloudCompare admin
ZilongS
Posts: 21
Joined: Tue Oct 09, 2018 8:12 pm

Re: stochastic ICP result transform matrix

Post by ZilongS »

You are right, I thought the Random Sampling Limit is only valid for the cloud to be aligned.
Thanks for your answer.

Best regards

Zilong
ZilongS
Posts: 21
Joined: Tue Oct 09, 2018 8:12 pm

Re: stochastic ICP result transform matrix

Post by ZilongS »

daniel wrote: Tue May 07, 2019 8:35 pm If the random sampling limit is above both cloud sizes, you shouldn't have any 'random' behavior anymore...
However, it's better that the sampling process with the random sampling limit below the point number can be also reproducible, can we do that?
daniel
Site Admin
Posts: 7382
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: stochastic ICP result transform matrix

Post by daniel »

By definition it's a random process. But I guess it's possible with a little hack to always use the same 'seed' for random numbers generation.

You would need to add an optional argument to the CloudSamplingTools::subsampleCloudRandomly method (see https://github.com/CloudCompare/CloudCo ... ols.h#L129). This argument could be 0 for the default seeding mechanism or a specific seed number otherwise (see line 218).

Then you'll have to change the call to subsampleCloudRandomly with a constant seed in the ICPRegistrationTools::Register method (see https://github.com/CloudCompare/CloudCo ... s.cpp#L179).
Daniel, CloudCompare admin
ZilongS
Posts: 21
Joined: Tue Oct 09, 2018 8:12 pm

Re: stochastic ICP result transform matrix

Post by ZilongS »

You mean by setting the line 219 of std::mt19937 gen(rd()); to std::mt19937 gen(0); ?

From https://github.com/CloudCompare/CloudCo ... gTools.cpp
Post Reply