Degenerate IntegralImageNormalEstimation

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Degenerate IntegralImageNormalEstimation

Stephen McDowell
Hello,

I’ve spent the day going through the (quite savvy!) implementation of pcl::IntegralImageNormalEstimation, and it is quite likely that I just don’t understand what is actually going on.  I created a simple gist that creates a “degenerate" point cloud of just 640x480 points all in the same plane.  I did this because I was particularly confused about what is going on with the distance_map_ getting initialized here:


1. It’s not clear what this distance map actually represents, particularly why the magic number of 2 is the threshold for whether or not the normal is computed ( https://github.com/PointCloudLibrary/pcl/blob/abf77fffd5b05140ebeb4cb71c204ad7458ae7c5/features/include/pcl/features/impl/integral_image_normal.hpp#L920-L926 ).

2. The choice of width + height for the initial value also does not seem to represent anything specific ( https://github.com/PointCloudLibrary/pcl/blob/abf77fffd5b05140ebeb4cb71c204ad7458ae7c5/features/include/pcl/features/impl/integral_image_normal.hpp#L772 ).

For convenience, the simple demo can be found here: https://gist.github.com/svenevs/a592106a8bc31faba5c508d0524d6bca

This demo was engineered specifically to diagnose the distance map, so I suppose the results are reasonable given the implementation.  However, should it not be that all points would get the same computed normal (except for maybe the border)?

Again, I have a general lack of understanding what’s going on down in these trenches, so it could be the code is working exactly as expected.  I just thought I’d reach out with this example in case people who know how the code works think this is worth investigating or not.

-Stephen

P.S. The viewer itself is kind of strange, I’m not sure if that’s related to this or not, but isn’t really the point.  For me it speckles normals in and out of existence as you zoom / rotate.  I think it’s all those NaNs.


_______________________________________________
PCL-developers mailing list
[hidden email]
http://pointclouds.org/mailman/listinfo/pcl-developers
http://pointclouds.org
Reply | Threaded
Open this post in threaded view
|

Re: Degenerate IntegralImageNormalEstimation

Jochen Sprickerhof
Administrator
Hi Stephen,

this is the developers mailing list, your question is better suited on

http://www.pcl-users.org/

Cheers Jochen

* Stephen McDowell <[hidden email]> [2017-12-11 18:52]:

>Hello,
>
>I’ve spent the day going through the (quite savvy!) implementation of pcl::IntegralImageNormalEstimation, and it is quite likely that I just don’t understand what is actually going on.  I created a simple gist that creates a “degenerate" point cloud of just 640x480 points all in the same plane.  I did this because I was particularly confused about what is going on with the distance_map_ getting initialized here:
>
>https://github.com/PointCloudLibrary/pcl/blob/abf77fffd5b05140ebeb4cb71c204ad7458ae7c5/features/include/pcl/features/impl/integral_image_normal.hpp#L733-L817 <https://github.com/PointCloudLibrary/pcl/blob/abf77fffd5b05140ebeb4cb71c204ad7458ae7c5/features/include/pcl/features/impl/integral_image_normal.hpp#L733-L817>
>
>1. It’s not clear what this distance map actually represents, particularly why the magic number of 2 is the threshold for whether or not the normal is computed ( https://github.com/PointCloudLibrary/pcl/blob/abf77fffd5b05140ebeb4cb71c204ad7458ae7c5/features/include/pcl/features/impl/integral_image_normal.hpp#L920-L926 <https://github.com/PointCloudLibrary/pcl/blob/abf77fffd5b05140ebeb4cb71c204ad7458ae7c5/features/include/pcl/features/impl/integral_image_normal.hpp#L920-L926> ).
>
>2. The choice of width + height for the initial value also does not seem to represent anything specific ( https://github.com/PointCloudLibrary/pcl/blob/abf77fffd5b05140ebeb4cb71c204ad7458ae7c5/features/include/pcl/features/impl/integral_image_normal.hpp#L772 <https://github.com/PointCloudLibrary/pcl/blob/abf77fffd5b05140ebeb4cb71c204ad7458ae7c5/features/include/pcl/features/impl/integral_image_normal.hpp#L772> ).
>
>For convenience, the simple demo can be found here: https://gist.github.com/svenevs/a592106a8bc31faba5c508d0524d6bca <https://gist.github.com/svenevs/a592106a8bc31faba5c508d0524d6bca>
>
>This demo was engineered specifically to diagnose the distance map, so I suppose the results are reasonable given the implementation.  However, should it not be that all points would get the same computed normal (except for maybe the border)?
>
>Again, I have a general lack of understanding what’s going on down in these trenches, so it could be the code is working exactly as expected.  I just thought I’d reach out with this example in case people who know how the code works think this is worth investigating or not.
>
>-Stephen
>
>P.S. The viewer itself is kind of strange, I’m not sure if that’s related to this or not, but isn’t really the point.  For me it speckles normals in and out of existence as you zoom / rotate.  I think it’s all those NaNs.
>

>_______________________________________________
>PCL-developers mailing list
>[hidden email]
>http://pointclouds.org/mailman/listinfo/pcl-developers
>http://pointclouds.org


_______________________________________________
PCL-developers mailing list
[hidden email]
http://pointclouds.org/mailman/listinfo/pcl-developers
http://pointclouds.org

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Degenerate IntegralImageNormalEstimation

Stephen McDowell
Hi Jochen,

Sorry for misunderstanding.  I didn’t think it should go on pcl-users because I’m not confused about how to use a specific algorithm.  The preprocessing of the data appears to be invalid, preventing even say a naive tangent computation from producing normals from a point cloud that should be “processable”.

Happy to just let this one die.

-Stephen

> On Dec 11, 2017, at 11:06 PM, Jochen Sprickerhof <[hidden email]> wrote:
>
> Hi Stephen,
>
> this is the developers mailing list, your question is better suited on
> http://www.pcl-users.org/
>
> Cheers Jochen
>
> * Stephen McDowell <[hidden email]> [2017-12-11 18:52]:
>> Hello,
>>
>> I’ve spent the day going through the (quite savvy!) implementation of pcl::IntegralImageNormalEstimation, and it is quite likely that I just don’t understand what is actually going on.  I created a simple gist that creates a “degenerate" point cloud of just 640x480 points all in the same plane.  I did this because I was particularly confused about what is going on with the distance_map_ getting initialized here:
>>
>> https://github.com/PointCloudLibrary/pcl/blob/abf77fffd5b05140ebeb4cb71c204ad7458ae7c5/features/include/pcl/features/impl/integral_image_normal.hpp#L733-L817 <https://github.com/PointCloudLibrary/pcl/blob/abf77fffd5b05140ebeb4cb71c204ad7458ae7c5/features/include/pcl/features/impl/integral_image_normal.hpp#L733-L817>
>>
>> 1. It’s not clear what this distance map actually represents, particularly why the magic number of 2 is the threshold for whether or not the normal is computed ( https://github.com/PointCloudLibrary/pcl/blob/abf77fffd5b05140ebeb4cb71c204ad7458ae7c5/features/include/pcl/features/impl/integral_image_normal.hpp#L920-L926 <https://github.com/PointCloudLibrary/pcl/blob/abf77fffd5b05140ebeb4cb71c204ad7458ae7c5/features/include/pcl/features/impl/integral_image_normal.hpp#L920-L926> ).
>>
>> 2. The choice of width + height for the initial value also does not seem to represent anything specific ( https://github.com/PointCloudLibrary/pcl/blob/abf77fffd5b05140ebeb4cb71c204ad7458ae7c5/features/include/pcl/features/impl/integral_image_normal.hpp#L772 <https://github.com/PointCloudLibrary/pcl/blob/abf77fffd5b05140ebeb4cb71c204ad7458ae7c5/features/include/pcl/features/impl/integral_image_normal.hpp#L772> ).
>>
>> For convenience, the simple demo can be found here: https://gist.github.com/svenevs/a592106a8bc31faba5c508d0524d6bca <https://gist.github.com/svenevs/a592106a8bc31faba5c508d0524d6bca>
>>
>> This demo was engineered specifically to diagnose the distance map, so I suppose the results are reasonable given the implementation.  However, should it not be that all points would get the same computed normal (except for maybe the border)?
>>
>> Again, I have a general lack of understanding what’s going on down in these trenches, so it could be the code is working exactly as expected.  I just thought I’d reach out with this example in case people who know how the code works think this is worth investigating or not.
>>
>> -Stephen
>>
>> P.S. The viewer itself is kind of strange, I’m not sure if that’s related to this or not, but isn’t really the point.  For me it speckles normals in and out of existence as you zoom / rotate.  I think it’s all those NaNs.
>>
>
>> _______________________________________________
>> PCL-developers mailing list
>> [hidden email]
>> http://pointclouds.org/mailman/listinfo/pcl-developers
>> http://pointclouds.org
>
> _______________________________________________
> PCL-developers mailing list
> [hidden email]
> http://pointclouds.org/mailman/listinfo/pcl-developers
> http://pointclouds.org

_______________________________________________
PCL-developers mailing list
[hidden email]
http://pointclouds.org/mailman/listinfo/pcl-developers
http://pointclouds.org
Reply | Threaded
Open this post in threaded view
|

Re: Degenerate IntegralImageNormalEstimation

Sérgio Agostinho
In reply to this post by Stephen McDowell

Hey Stephen,

There's an open PR which seems to address exactly that same points you raised. It's not complete though, but still worth to have a look. I never looked into the IntegralImageNormalEstimation in order to have an informed discussion with you at this point, but if you end up filling a PR with changes I will at some point. In the meantime, have a look at the PR I mentioned and just comment below with any observations you feel which might be relevant.


Cheers


On 12-12-2017 02:52, Stephen McDowell wrote:
Hello,

I’ve spent the day going through the (quite savvy!) implementation of pcl::IntegralImageNormalEstimation, and it is quite likely that I just don’t understand what is actually going on.  I created a simple gist that creates a “degenerate" point cloud of just 640x480 points all in the same plane.  I did this because I was particularly confused about what is going on with the distance_map_ getting initialized here:


1. It’s not clear what this distance map actually represents, particularly why the magic number of 2 is the threshold for whether or not the normal is computed ( https://github.com/PointCloudLibrary/pcl/blob/abf77fffd5b05140ebeb4cb71c204ad7458ae7c5/features/include/pcl/features/impl/integral_image_normal.hpp#L920-L926 ).

2. The choice of width + height for the initial value also does not seem to represent anything specific ( https://github.com/PointCloudLibrary/pcl/blob/abf77fffd5b05140ebeb4cb71c204ad7458ae7c5/features/include/pcl/features/impl/integral_image_normal.hpp#L772 ).

For convenience, the simple demo can be found here: https://gist.github.com/svenevs/a592106a8bc31faba5c508d0524d6bca

This demo was engineered specifically to diagnose the distance map, so I suppose the results are reasonable given the implementation.  However, should it not be that all points would get the same computed normal (except for maybe the border)?

Again, I have a general lack of understanding what’s going on down in these trenches, so it could be the code is working exactly as expected.  I just thought I’d reach out with this example in case people who know how the code works think this is worth investigating or not.

-Stephen

P.S. The viewer itself is kind of strange, I’m not sure if that’s related to this or not, but isn’t really the point.  For me it speckles normals in and out of existence as you zoom / rotate.  I think it’s all those NaNs.



_______________________________________________
PCL-developers mailing list
[hidden email]
http://pointclouds.org/mailman/listinfo/pcl-developers
http://pointclouds.org


_______________________________________________
PCL-developers mailing list
[hidden email]
http://pointclouds.org/mailman/listinfo/pcl-developers
http://pointclouds.org