Page 1 of 1

access the point cloud

Posted: Wed Oct 03, 2018 2:03 pm
by Tolier
Bonjour,

Question, un fonction permettant d'obtenir les coordonnées de tout le nuage de points ou d'une partie du nuage existe déjà?
Pour exemple, si nous effectuons un clic sur un mur mais que nous voulions le point de plus bas de celui-ci. Pour le trouver, il nous faudrait avoir
accès au point de la zone pour pouvoir prendre un point pas trop éloigné mais le plus bas possible.

Hello,

Question, a function to obtain the coordinates of the entire point cloud or part of the cloud already exists?
For example, if we click on a wall but want the lowest point of it. To find it, we would need access to the point in the area to be able to take a point not too far away but as low as possible.

Re: access the point cloud

Posted: Wed Oct 03, 2018 6:28 pm
by daniel
Not sure to understand: do you mean programmatically? If yes, then you can of course scan the whole point cloud anytine (by using ccPointCloud::getPoint(i) for instance).

And if you want to do that after a point click, you'll have to "listen" to the point click (by registering to the picking hub (ccPickingHub). Look how this element is used by various dialogs and tools in CloudCompare's codebase.

Re: access the point cloud

Posted: Thu Oct 04, 2018 6:29 am
by Tolier
Yes, I expressed myself very badly.... My objective is to make a click, then to retrieve the click point with "onitempicked" and it is from here that I would like to retrieve a lowest point in Z therefore being located under the click point.
I used the getPoint(Size) function which loops over the whole cloud... for a cloud of 200 thousand points this but 50ms I think it is not possible to do this on 10 Million points.
Is there a way to delimit a smaller area in the cloud?
Maybe "getBoundingBox"

Re: access the point cloud

Posted: Thu Oct 04, 2018 7:11 pm
by daniel
You could/should use the octree. But you'll have to dig in the code to understand how it works.

There's especially a 'cylinder' search with the octree that should help you (see CCLib's "DgmOctree").