Visibility of points from TLS/GBL sensor

Feel free to ask any question here
Post Reply
Marc.P
Posts: 3
Joined: Tue Dec 13, 2022 9:19 pm

Visibility of points from TLS/GBL sensor

Post by Marc.P »

Hello,

I'm trying to to determine the visibility of points from a virtual sensor, but all points within the sensor vision range seem to be visible, even the ones theoretically hidden.

This behaviour can be replicated (cloudcompare v.2.12.14) by creating a sphere of radius 2 with center at 0, 0, 0. Then, I sampled points on the sphere (density=10 000), and created a TLS/GBL at (0, 0, 3), with default parameters. When I then compute points visibility, the are all labelled with 0. I would expect points with z<0 not to be visible, because they are hidden by points with z>0.

Am I doing something wrong?

Thank you for your help!

Regards,

Marc

PS : Another problem that I see is that the max range parameter seems to be chosen by default as the maximum distance between points from the point cloud, and the sensor. The value chosen at sensor creation, or edited afterwards, is not retained.
Marc.P
Posts: 3
Joined: Tue Dec 13, 2022 9:19 pm

Re: Visibility of points from TLS/GBL sensor

Post by Marc.P »

Hi,

To give some perspective, my objective was to "clean" a pont cloud by keeping points visible only from the outside. So I wanted to compute visibility from various synthetic sensor positions, and merge the different reconstructed clouds. But that can actually be achieved with the Hidden Points Removal plugin, so my problem is solved.

But I'm still curious to know if I did anything wrong when I tried to use sensors.

Thanks anyway for this great software!

Best,

Marc
jdv56a
Posts: 4
Joined: Mon Mar 26, 2012 5:58 pm

Re: Visibility of points from TLS/GBL sensor

Post by jdv56a »

A manual way of knowing the visibility of a point from the sensor is from the normals, calculating the vector product of the position vector of each point with respect to the sensor with the normal.

Edit-Scalar Fields-Export Coordinates
Edit-Scalar Fields-Export Normals

Arithmetic

Visibility=(Coord.X - TLS.X)*Nx + (Coord.Y - TLS.Y)*Ny + (Coord.Z - TLS.Z)*Nz

After filtering, if the result is positive, it is not visible, if the result is negative, the point is visible.
daniel
Site Admin
Posts: 7713
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Visibility of points from TLS/GBL sensor

Post by daniel »

Interesting work around.

Still, I'll try to investigate the issue reported by Marc.P ... as soon as possible ...
Daniel, CloudCompare admin
daniel
Site Admin
Posts: 7713
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Visibility of points from TLS/GBL sensor

Post by daniel »

Ok, so I looked at this 'issue' right away.

1) Mind that the sensor is looking towards its own 'X' direction (red), so you have to set the right orientation to the sensor so it looks towards the sphere:
cc_sensor_params.jpg
cc_sensor_params.jpg (39.17 KiB) Viewed 2489 times
2) A sensor created manually will automatically have their 'min' and 'max' angles set so that all the points of the associated cloud are visible (they can go up to 360 degrees, as some real scanners do).

3) By positioning the sensor outside of the sphere (0, 0, 3), I'm not sure why you were expecting to have points with negative z values (even with respect to the sensor)
cc_sensor_outside.jpg
cc_sensor_outside.jpg (41.23 KiB) Viewed 2489 times
All in all, I'm not sure you'll be able to achieve what you are trying to do this way? The 'HPR' plugin might be helpful though (see https://www.cloudcompare.org/doc/wiki/i ... l_(plugin)). You can create the sensor, apply its viewport (with its 'Apply' button in its properties), then select the cloud and run the HPR plugin).
Daniel, CloudCompare admin
Marc.P
Posts: 3
Joined: Tue Dec 13, 2022 9:19 pm

Re: Visibility of points from TLS/GBL sensor

Post by Marc.P »

Hi,

Thank you for your answers.

@jdv56a : Interesting indeed, but in my case my objective was actually to get a "clean" cloud to then compute "clean" normals".

@daniel : yes sorry about that, the orientation was indeed not good. So now my position and orientation matrix is the same as in your message.

But when I compute visibility, I get only the value 4 (out of fov). Shouldn't it be 0 (visible) for points on the sphere with positive z coordinates (they are in front of the camera), and 1 (hidden) for points on the shpere with negative coordinates, as they are hidden by points with positive z coordinates?
The 'HPR' plugin might be helpful though (see https://www.cloudcompare.org/doc/wiki/i ... l_(plugin)). You can create the sensor, apply its viewport (with its 'Apply' button in its properties), then select the cloud and run the HPR plugin).
Yes, that's what I finally did, thanks!
Post Reply