fill "GenericIndexedCloudPersist"

Feel free to ask any question here
Sha11
Posts: 18
Joined: Mon Jun 10, 2019 2:34 pm

fill "GenericIndexedCloudPersist"

Post by Sha11 »

I need to fill point cloud in GenericIndexedCloudPersist type.

For this you have provided foreach function.

And this
using genericPointAction = std::function<void (const CCVector3 &, ScalarType &)>
how you are actually passing data to (genericPointAction action)

OR
void (const CCVector3 &, ScalarType &)


this type of prototype is not defined or declared in library..

So how to exactly use this function in order to fill point cloud in "GenericIndexedCloudPersist" type.
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: fill "GenericIndexedCloudPersist"

Post by daniel »

Nope the 'forEach' function is meant to process exiting points (points already inserted).

To fill the cloud you'll have to use the 'addPoint' or equivalent method (not sure what class you are using - as GenericIndexedCloudPersist is only an interface ;).
Daniel, CloudCompare admin
Sha11
Posts: 18
Joined: Mon Jun 10, 2019 2:34 pm

Re: fill "GenericIndexedCloudPersist"

Post by Sha11 »

Thank You this works !!!

There is another problem

When i am providing two clouds for registration ( register method of registrationtools.h ) . Result is incorrect , i mean Final RMS value is around 12 to 14.

How to resolve such kind of problems??
Or
i have to increase number of iterations???

Or

Is this is its limitation????
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: fill "GenericIndexedCloudPersist"

Post by daniel »

How far are the clouds at their starting position? ICP only refines the registration. The clouds must be already roughly registered.

Moroever, it's generally a better idea to use the 'maximum error' convergence criteria instead of a fixed number of iterations.
Daniel, CloudCompare admin
Sha11
Posts: 18
Joined: Mon Jun 10, 2019 2:34 pm

Re: fill "GenericIndexedCloudPersist"

Post by Sha11 »

Is there any way to match two cloud having arbitrary orientation with respect to each other.

I mean ICP is not so powerful to match two clouds .

So is there any other techniques to do this???
Sha11
Posts: 18
Joined: Mon Jun 10, 2019 2:34 pm

Re: fill "GenericIndexedCloudPersist"

Post by Sha11 »

Intersection operation ( boolean operation ) of two cloud ( primarry.off and secondary.off )

Primary :- https://justpaste.it/5bb46

Secondary :- https://justpaste.it/5u9up

these are my .off files when i am applying intersection on them primary first and then secondary .

Result is very abnormal , i mean it does not provides intersected part.

What actually i am missing ??
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: fill "GenericIndexedCloudPersist"

Post by daniel »

Those two questions would have deserved separate threads ;)

1) There are papers that propose 'absolute alignment methods' (for instance http://vecg.cs.ucl.ac.uk/Projects/Smart ... sig_08.pdf, that was present in CloudCompare a while ago, but the algorithm was not that well working, and the code hasn't been properly maintained by its author so it has been deprecated).

2) Yes, it seems the buttons are all mixed up. Union gives the difference. Difference gives the union. And it's very unclear what the what the Intersection gives... We'll have to check that I guess.
Daniel, CloudCompare admin
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: fill "GenericIndexedCloudPersist"

Post by daniel »

About the second issue: it appears it's not an issue with the plugin, but with your second mesh (the small one). The faces are described in the wrong order. As a result the 'outside' is inside and the 'inside' of the mesh is outside. And this give strange results.

If you compte the normals on the mesh (Edit > Normals > Compute ... and choose 'per triangle') you'll see that the box appears in cyan while it should be in green if they normals were oriented in the right direction. One solution is to 'invert' the mesh (Meshlab can do that, or you can do it directly in the OFF file by inverting two vertices index of each triangle (A B C --> A C B).
Daniel, CloudCompare admin
Sha11
Posts: 18
Joined: Mon Jun 10, 2019 2:34 pm

Re: fill "GenericIndexedCloudPersist"

Post by Sha11 »

Thanks for this.

Do you know about any open source project which performs 3d triangulation..

Actually I have an implementation of Delaunay triangulation but it's not working properly for some solids.

Poisson surface reconstruction is very much slower.

If you know about any open source triangulation project.
Please let me know.(for 3D ) would be fine if it's CPU implementation not on GPU.


(https://github.com/ashwin/gDel3D) is an GPU implementation.
Sha11
Posts: 18
Joined: Mon Jun 10, 2019 2:34 pm

Re: fill "GenericIndexedCloudPersist"

Post by Sha11 »

I am confused in flipping normal's of point cloud , did you have any way to uniform the normal's of each point cloud either inverted or non-inverted ??
Post Reply