I was trying to reproduce in a self consistent code the same operations
made by the normal estimation class. I was interested in keeping all the eigenvalues from the covariance matrix decomposition, so to be able to compute more than just the first index of curvature, as the pcl algorithm does. This is my code http://pastebin.com/c3NC8eDx I cannot get consistent results with what comes out from the normal estimation class from pcl. Maybe is a really simple mistake made somewhere. Normal estimation seems to work fine but when I try to put togheter the eigenvalues in indices like: id0 = lambda0 / sum(lambdas) id1 = ... id2... the results are really different from the one estimated using the pcl class. Any advice please? Can anybody give a look at my code?  Luca Penasa PhD Student Geosciences Department University of Padova Via Gradenigo, 6 35131 Padova  Italy Email: [hidden email]  _______________________________________________ [hidden email] / http://pointclouds.org http://pointclouds.org/mailman/listinfo/pclusers 
Ok I've investigated the problem in details. And there is something
that is unclear to me. So please help me with this problem.
From rev 8524 some changes into the normal estimation class OMP were introduced so to obtain results consistent with the single threaded implementation (not OMP)  as far as i read from changelog  commit by radu (due to issue #945). I don't know if it is from that revision that also this "curvature" problem begun but it could be, given it introduces some consistent changes. Since before r8524 I was using the parallelized version to get the curvature and performing normal estimation, and this is an example of the results I was getting: This kind of measure seems to be interesting in my case given you see there are areas of high "curvature" in correspondence of vegetated patches and where the object have edges. before r8524 this curvature index was notconsistent with the curvature estimated by the singlethreaded normal estimation class (I think). From r8524 the modified algorithm produces a totally different estimation of the curvature, that is in fact consistent between the OMP and notOMP versions. This is the result: Considering I used the same radius  a pretty big radius  in both of the cases this results do not seem to be of the same "quality" in respect with the previously available OMP implementation. one can also get this results using the tool provided with pcl for normal estimation. What is the difference between the prer8524 OMP and notOMP versions? Is this curvature really useful as much as the "old" curvature? Is there any reason for which I should use this implementation instead of the previously available one? that was giving me really nice results... as you see there are also patches of the cloud that go down to zero or almost zero (blue parts), this is pretty strange for me. And also the strong "scattering" of values that changes in a notsmooth way across the surface is pretty strange. Eventually I could provide a reimplementation of the old algorithm if there is the interest, something like CurvatureEstimationOMP class... for example. Tomorrow I'll give a better look at the diffs between the two versions but maybe someone could give me some hints on the issue in the meantime. About the first post to ML:  my code works fine, and produces the same results of the classical PCL class for normal estimation.  the inconsistency I was observing derived by the fact that I was comparing the above result with the results that are obtained with the OMP version of the class, in its prer8524 implementation, this thing made me crazy for a couple of days, so please help me now that I've found the problem :D Best Luca On 02/05/2013 03:04 PM, Luca Penasa
wrote:
I was trying to reproduce in a self consistent code the same operations made by the normal estimation class. I was interested in keeping all the eigenvalues from the covariance matrix decomposition, so to be able to compute more than just the first index of curvature, as the pcl algorithm does. _______________________________________________ [hidden email] / http://pointclouds.org http://pointclouds.org/mailman/listinfo/pclusers 
Administrator

Hi Luca,
I had a look at the PCL code again, and did some tests on my machine. Things seem to be ok, and we are doing pretty thorough unit testing. Before r8524 the OMP test failed, I can confirm that, but the nonOMP produced the same results as now. What system are you using, and I guess PCL trunk? If the dataset you are using is not top secret, please send me the .pcd in a private mail and I can test it too. Thanks for the info! On Feb 5, 2013, at 10:37 AM, Luca Penasa <[hidden email]> wrote:
_______________________________________________ [hidden email] / http://pointclouds.org http://pointclouds.org/mailman/listinfo/pclusers 
Free forum by Nabble  Edit this page 