computePointNormal error

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

computePointNormal error

kwaegel
Administrator
I'm trying to compute normals at specific points using IntegralImageNormalEstimation::computePointNormal. When I try this however, I'm finding that the class members rect_width_ and rect_height_ are always zero, which causes the call to return bad_point.

This is on line 258/259, where count_x and count_y are calculated.

As far as I can tell, these valuse are only set in IntegralImageNormalEstimation::setRectSize(..), which is never called. Am I supposed to set this myself, and if so, what are good default values?
Reply | Threaded
Open this post in threaded view
|

Re: computePointNormal error

nizar sallem
Hi,

You will better not do it that way.
I suggest you use the Normal estimation class of choice, set the input
cloud cloud and then put the index of your point in a
pcl::PointIndicesConstPtr and provide it to setPointsIndices so that it
computes the normal only at  that point.
Else I am afraid you will run into a lot of trouble.

--
Nizar
On 24/03/2014 17:23, kwaegel wrote:

> I'm trying to compute normals at specific points using
> IntegralImageNormalEstimation::computePointNormal. When I try this however,
> I'm finding that the class members rect_width_ and rect_height_ are always
> zero, which causes the call to return bad_point.
>
> This is on line 258/259, where count_x and count_y are calculated.
>
> As far as I can tell, these valuse are only set in
> IntegralImageNormalEstimation::setRectSize(..), which is never called. Am I
> supposed to set this myself, and if so, what are good default values?
>
>
>
> --
> View this message in context: http://www.pcl-users.org/computePointNormal-error-tp4033016.html
> Sent from the Point Cloud Library (PCL) Users mailing list mailing list archive at Nabble.com.
> _______________________________________________
> [hidden email] / http://pointclouds.org
> http://pointclouds.org/mailman/listinfo/pcl-users

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

Re: computePointNormal error

kwaegel
Administrator
That's what I had thought to do, but as pointed out here, IntegralImageNormalEstimation appears to ignore indices.
Reply | Threaded
Open this post in threaded view
|

Re: computePointNormal error

kwaegel
Administrator
nizar: I just tried that to see what would happen, and using ne.setIndices(..) causes an out-of-bounds error. The pcl::Feature base class correctly resizes the output array for specified number of points, but IntegralImageNormalEstimation still tries to compute normals for all points and immediately runs off the end of the array.
Reply | Threaded
Open this post in threaded view
|

Re: computePointNormal error

nizar sallem
Ok let me work on it tonight and I am sure I will find out what is the
problem in there.
I will post a PR and keep you posted.

--
Nizar
On 24/03/2014 19:25, kwaegel wrote:

> nizar: I just tried that to see what would happen, and using
> ne.setIndices(..) causes an out-of-bounds error. The pcl::Feature base class
> correctly resizes the output array for specified number of points, but
> IntegralImageNormalEstimation still tries to compute normals for all points
> and immediately runs off the end of the array.
>
>
>
> --
> View this message in context: http://www.pcl-users.org/computePointNormal-error-tp4033016p4033021.html
> Sent from the Point Cloud Library (PCL) Users mailing list mailing list archive at Nabble.com.
> _______________________________________________
> [hidden email] / http://pointclouds.org
> http://pointclouds.org/mailman/listinfo/pcl-users

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

Re: computePointNormal error

nizar sallem
In reply to this post by kwaegel
Dear kwaegel,

I made a quick hack to the InetgralImageNormalEstimation class so that
it can compute normals for a given subset of indices.
Not sure when it will make it to the trunk but you can get a patch here
https://github.com/PointCloudLibrary/pcl/pull/594

Best regards,
--
Nizar
On 24/03/2014 19:25, kwaegel wrote:

> nizar: I just tried that to see what would happen, and using
> ne.setIndices(..) causes an out-of-bounds error. The pcl::Feature base class
> correctly resizes the output array for specified number of points, but
> IntegralImageNormalEstimation still tries to compute normals for all points
> and immediately runs off the end of the array.
>
>
>
> --
> View this message in context: http://www.pcl-users.org/computePointNormal-error-tp4033016p4033021.html
> Sent from the Point Cloud Library (PCL) Users mailing list mailing list archive at Nabble.com.
> _______________________________________________
> [hidden email] / http://pointclouds.org
> http://pointclouds.org/mailman/listinfo/pcl-users

_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users