PCL Normal consistency

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

PCL Normal consistency

race
Hi

I have a question regarding consistency of normal direction. The way normal estimation works right now is to force all the computed normals to a particular direction based on the viewpoint. But if I have a 3D scene of a complete object I would like the normals to be consistently pointing outwards(or inwards). Does pcl have any features in its library to achieve this? I am if this question was already raised... I tried googling but couldn't get anything useful.
Reply | Threaded
Open this post in threaded view
|

Re: PCL Normal consistency

thomasp
I will have the same issue when I've to work with PCL.
What I plan to do is the following:
1. Split the 'closed' object in two parts (2 distinct pointclouds) based on an given axis, maybe the longest axis of the AABB
2. Estimate normals for each part separately. The viewpoint will be computed based on split-axis and 'closed' object center
3. Eventually I'll gather back all the points.

What do you think of this approach ?
Do you have any better idea ?

-----Message d'origine-----
De : [hidden email] [mailto:[hidden email]] De la part de race
Envoyé : lundi 6 février 2012 22:54
À : [hidden email]
Objet : [PCL-users] PCL Normal consistency

Hi

I have a question regarding consistency of normal direction. The way normal
estimation works right now is to force all the computed normals to a
particular direction based on the viewpoint. But if I have a 3D scene of a
complete object I would like the normals to be consistently pointing
outwards(or inwards). Does pcl have any features in its library to achieve
this? I am if this question was already raised... I tried googling but
couldn't get anything useful.

--
View this message in context: http://www.pcl-users.org/PCL-Normal-consistency-tp3720948p3720948.html
Sent from the Point Cloud Library (PCL) Users 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: PCL Normal consistency

race
Hi Thomas,

I am not sure what you mean by 'AABB'. Currently I have the following algorithm that I plan to implement:
1) Start with an aribitary viewpoint(say 0,0,0) and direction, and set the initial processed point cloud(PPC) set to NULL.
2) Consider the closest point(p) that does not belong to PPC.  Calculate the normal direction from the covariance matrix (similar to normal estimation).
3) To estimate the sign of 'p' do the following:
         a) If the point 'p' has 'k' closest neighbours in PPC then assign the sign based on the direction that gives the least error(inner product) between the neighbours normals and the estimated point normal.
         b) else assign the sign that would give the least error between the normal and the viewing direction.
4) Increment PPC with the current point and repeat till PPC contains all points.

I guess this might work but not sure. What do you think?
Reply | Threaded
Open this post in threaded view
|

Re: PCL Normal consistency

race
This post was updated on .
I just realized that the above algo would not be efficiently parallelized. I would need another serial pass over all the points to assign the sign. Can anyone suggest a better method that could be parallelized?
Reply | Threaded
Open this post in threaded view
|

Re: PCL Normal consistency

thomasp
Hi,

I think I get your point, it may be a better way so I'll keep that in mind.

AABB means Axis-Aligned Bounding Box. Here is a picture of what I meant in my initial answer :
As I tested normal estimation in PCL, it seemed to work well for points "facing" the viewpoint. This seems logic since it's expected to be used with a Kinect, so you're only interested in what you actually see, not what's culled by objects.
So what I want to try is to make a 2-pass normal estimation, one for each side of the scene. You cut the scene in 2 part, based on longest axis of the bounding box, and then pick a viewpoint based on bounding dimensions and center :


Once the 2 pointclouds has been processed separately, you gather all information back. Though, I'm not sure this would work in all case, I have to try first.
Reply | Threaded
Open this post in threaded view
|

Re: PCL Normal consistency

race
Hi Thomas

Thanks for the explanation. I am implementing my idea right now and will let you know what happens. Even I am not sure if my method would work. We could compare our approaches once its done if you are interested?
Reply | Threaded
Open this post in threaded view
|

Re: PCL Normal consistency

thomasp
Sure!
However, I won't give a try right now. I don't even know when I'll have to do this because I'm working on another project for the moment. But I keep that in mind for sure :)

-----Message d'origine-----
De : [hidden email] [mailto:[hidden email]] De la part de race
Envoyé : jeudi 9 février 2012 15:26
À : [hidden email]
Objet : Re: [PCL-users] PCL Normal consistency

Hi Thomas

Thanks for the explanation. I am implementing my idea right now and will let
you know what happens. Even I am not sure if my method would work. We could
compare our approaches once its done if you are interested?

--
View this message in context: http://www.pcl-users.org/PCL-Normal-consistency-tp3720948p3729606.html
Sent from the Point Cloud Library (PCL) Users 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: PCL Normal consistency

sebastianR
In reply to this post by race
Hi there, any news on this issue? I'm facing the exact same problem -> consistent normal estimation on a "closed shape" point cloud. To me this seems like a common problem. Somebody has to have solved it already?

Regards,
Sebastian
Reply | Threaded
Open this post in threaded view
|

Re: PCL Normal consistency

Waltz
This problem has been faced in this way:

1) calculate an adjacent matrix of all the points of your cloud (for example within k-neighbour). Should be a sparse matrix. It contains the  scalar product of the normal directions of every couple considered.
2) build the minimum spanning tree of this matrix (which can be considered a graph)
3) choose one point and impose the direction (outward or inward). It is the point from which the normals consistency will spread.
4) visit the MST in  DFS mode.  For each node and its parent node  modify the orientation according to the "most similar" criterium.

There is a paper,  maybe from Levoy  which explain this method.
If you know other methods  please tell me.
Bye

   Waltz
Reply | Threaded
Open this post in threaded view
|

Re: PCL Normal consistency

race
Hi Waltz

Thanks for the pointer. The implementation seems pretty straight forward. If its possible could you please put up the exact reference?
Reply | Threaded
Open this post in threaded view
|

Re: PCL Normal consistency

daviddoria
On Mon, Nov 26, 2012 at 9:09 AM, race <[hidden email]> wrote:
>
> Hi Waltz
>
> Thanks for the pointer. The implementation seems pretty straight forward. If
> its possible could you please put up the exact reference?

This is described in section 3.3 of "Surface reconstruction from
unorganized points" by Hoppe ('92).

research.microsoft.com/~hoppe/recon.pdf

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