M3C2 point cloud projection

Feel free to ask any question here
Post Reply
XiaochenZhang
Posts: 4
Joined: Thu Mar 17, 2022 8:55 am

M3C2 point cloud projection

Post by XiaochenZhang »

Hello!

I've read paper named 《Accurate 3D comparison of complex topography with terrestrial laser scanner: Application to the Rangitikei canyon (N-Z)》. Besides, I've researched the code of M3C2 algorithm in CloudCompare. It's so helpful that I've learned a lot from that.

However, I'm confused. In the paper, it is written that the intercept of each cloud with the cylinder defines two subsets of points of size n1 and n2, and projecting each of the subsets on the axis of cylinder gives two distributions of distances.

But, in the code, I found that the distance of two subsets is calculated by the average positions of two subsets. The subsets are not projected on the axis of cylinder in the process.​

It's so confusing to me. I just want to know whether the subsets are projected on the axis of cylinder in the calculation process of M3C2 algorithm in CloudCompare.

Thanks for your time. I will wait for your reply. Your help will be very useful to me.
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: M3C2 point cloud projection

Post by daniel »

Ah, good question!

The trick is that the distance output by the DgmOctree::getPointsInCylindricalNeighbourhoodProgressive is already the distance along the axis!
See https://github.com/CloudCompare/CCCoreL ... .cpp#L1911

There's a reminder in the doxygen documentation of the function, but that's clearly not obvious:
See https://github.com/CloudCompare/CCCoreL ... ree.h#L641
Daniel, CloudCompare admin
XiaochenZhang
Posts: 4
Joined: Thu Mar 17, 2022 8:55 am

Re: M3C2 point cloud projection

Post by XiaochenZhang »

Hi Daniel,

Thanks for the reply, Your answer is very helpful to me.

I have to ask a question, By qM3C2Tools::ComputeStatistics function, I will again neighborhood point projection in line (normal, neighborhood point to the current core point, the two vector), why will produce different results, of course, the corresponding uncertainty error change too.

I will wait for your reply. Your help will be very useful to me.
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: M3C2 point cloud projection

Post by daniel »

Sorry I didn't understand the question.
Daniel, CloudCompare admin
XiaochenZhang
Posts: 4
Joined: Thu Mar 17, 2022 8:55 am

Re: M3C2 point cloud projection

Post by XiaochenZhang »

Sorry, I didn't make myself clear.

I reproject the neighborhood points(which is already the distance along the axis) onto the normal by qM3C2Tools::ComputeStatistics, Why will produce different results,

I will wait for your reply. Your help will be very useful to me.
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: M3C2 point cloud projection

Post by daniel »

How are you doing the projection?
Daniel, CloudCompare admin
XiaochenZhang
Posts: 4
Joined: Thu Mar 17, 2022 8:55 am

Re: M3C2 point cloud projection

Post by XiaochenZhang »

I reproject the vector from the core point to the neighborhood point onto the normal by calculating the cosine Angle between the two vectors.

By the way, can you tell me how are you doing the projection?

Looking forward to your reply.
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: M3C2 point cloud projection

Post by daniel »

I guess you compute the cosine angle with the dot product? (you may just want to take care about the potential 'flipping' if you use the 'acos' method that always return an angle in [0;pi]).

I generally only use the dot product to do projections (without acos).
Daniel, CloudCompare admin
Post Reply