Problems with M3C2

If you are allergic to bug trackers, you can post here any remarks, issues and potential bugs you encounter
Post Reply
Tarvo
Posts: 2
Joined: Tue Oct 21, 2014 1:29 pm

Problems with M3C2

Post by Tarvo »

I’ve uploaded two artificial point clouds with coordinates x, y and z. One cloud is with full coordinates, the other with thousandth values. The point clouds are both in .txt format so there are no differences in formats (if it’s relevant at all).Even the decimal places are both the same

An example of the first clouds first row:
60.000 8.000 -1.500

An example of the second clouds first row:
60.006 8.003 -1.497

The problem is that when trying to use M3C2 distance function the parameters (supposedly default) in the M3C2 box are all zeros, meaning it will not compute distances. Changing the zero values into something else won’t help. The console also displays that “Some normals are invalid! You may have to increase the scale”. i've tried to change them as well but vainly.

If I try the M3C2 function with another set of data which also contains thousandth values (not zeros) it seems to work. The M3C2 function parameters are then some numbers.

Somehow it seems that the function does not recognise full coordinates with zeros written out (not really sure about if this is true aswell).

Does anybody know how to “cure” this problem?
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Problems with M3C2

Post by daniel »

Hi

This is "interesting" ;)

Can you send me the files? (cloudcompare [at] danielgm.net)
Daniel, CloudCompare admin
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Problems with M3C2

Post by daniel »

I finally had the time to look at your issue.

In fact when qM3C2 tries to guess the parameters, it first considers the bounding-box of the clouds and deduce a base radius. But in your case one of the cloud was perfectly flat. This resulted in a null base radius and then all the other parameters were wrong.

Moreover, as both clouds are flat and almost at the same position (+/- epsilon), you also have to uncheck the "Only search points in the positive half-space (relatively to the normal" checkbox in the 'Advanced' tab) otherwise you'll get mostly NaN values.

I've updated the code so as to take this 'flat' bounding box degenerate case into account. The new plugin version will be available with the next release (very soon).
Daniel, CloudCompare admin
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Problems with M3C2

Post by daniel »

Just to let you know that the new release is now online.
Daniel, CloudCompare admin
Post Reply