Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] A mistake in linear_least_squares_fitting_3?

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] A mistake in linear_least_squares_fitting_3?


Chronological Thread 
  • From: Pierre Alliez <>
  • To:
  • Subject: Re: [cgal-discuss] A mistake in linear_least_squares_fitting_3?
  • Date: Mon, 16 Feb 2009 06:17:05 -0700
  • Organization: INRIA

dear 杨成林,

that's a good point, I am glad to get feedback from a user (normal
estimation for surface reconstruction?)

what would be a convenient API for you? if you propose a precise
interface we could refine it together for the next release. I think one
constraint is to avoid computing twice the eigenvectors, hence a
separate function to get all eigenvectors seems not appropriate.



杨成林 a écrit :
> Hello Alliez,
>
> Thanks for your immediate response.
> In the PCA component,users can only get the eigenvector corresponding
> to the largest eigenvalue in line-fitting or the eigenvector
> corresponding to the smallest eigenvalue in plane-fitting.The other
> eigenvectors seem to be inaccessible,though they are also very useful.
>
> 2009/2/13 Pierre Alliez
> <>:
>
>> Hello wildabc (I was unable to recover your first name from your email,
>> hence I take your gmail adress),
>>
>> Many thanks for sending feedback on this bug - I will double check this and
>> correct it as soon as possible. Should you have any other suggestions I
>> would be pleased to improve the PCA component as well.
>>
>> best regards,
>>
>> Pierre Alliez
>> INRIA Sophia Antipolis - Mediterranee Project-team GEOMETRICA
>> http://www-sop.inria.fr/members/Pierre.Alliez/
>> Tel: +33 4 92 38 76 77
>> Fax: +33 4 97 15 53 95
>>
>>
>>
>> 杨成林 a écrit :
>>
>>> Hello
>>>
>>> I am new to CGAL.I use linear_least_squares_fitting_3 to estimate
>>> normals from point-cloud.But it can't give correct results
>>> sometimes.After examining the source code,I think line 709-710 in
>>> PCA_util.h(CGAL 3.4) may be incorrect.
>>>
>>> eigen_values[2] is the smallest eigenvalue,so "eigen_values[2] ==
>>> eigen_values[1]" means Degeneracy."eigen_values[0] == eigen_values[1]"
>>> just means the points distribute isotropically in the plane,but the
>>> fitting plane exists uniquely.
>>>
>>> I change this two lines to "if(eigen_values[2] != eigen_values[1])".It
>>> works well.
>>>
>>>
>> --
>> You are currently subscribed to cgal-discuss.
>> To unsubscribe or access the archives, go to
>> https://lists-sop.inria.fr/wws/info/cgal-discuss
>>
>>



Archive powered by MHonArc 2.6.16.

Top of Page