Subject: CGAL users discussion list
List archive
- From: Michael Jeulin-L <>
- To:
- Subject: Re: [cgal-discuss] pca_estimates_normals memory error with set of point > 1e6
- Date: Fri, 29 Jan 2010 11:51:32 +0200
Laurent Saboret wrote:
Hi Michael,Thank you very much.
My guess is that your vector of 1 million points and normals is too large for your RAM.
Applications are typically limited to 3 Gb on Linux 32 bits and 2 Gb on Windows 32 bits.
Which OS are you using?
Regards,
Laurent Saboret
Michael Jeulin-L wrote:
Hi everyone,
Continuing to modeling the my points clouds, I now have a problem with the
method pca_estimate_normal when I try to compute it for set of points which are
bigger than 1e6.
Here is my code :
void PBuilding::EstimateNormals()
{
PointList pointsVect;
unsigned int nb_neighbors=18;
cout << "Estimate normal with nb neight :" << nb_neighbors << endl;
for(ElementsPts::iterator building=_Buildings.begin();
building!=_Buildings.end(); ++building)
{
for(PointsList::iterator
point=building->begin();point!=building->end(); ++point)
pointsVect.push_back(PointVectorPair((*point), Vector(0, 0,
0)));
cout << "VECTOR SIZE: " << pointsVect.size() << endl;
CGAL::pca_estimate_normals(pointsVect.begin(), pointsVect.end(),
CGAL::First_of_pair_property_map<PointVectorPair>(),
CGAL::Second_of_pair_property_map<PointVectorPair>(),
nb_neighbors);
cout << "NORMAL ESTIMATED" << endl;
pointsVect.erase(CGAL::mst_orient_normals(pointsVect.begin(),
pointsVect.end(),
CGAL::First_of_pair_property_map<PointVectorPair>(),
CGAL::Second_of_pair_property_map<PointVectorPair>(),
nb_neighbors),
pointsVect.end());
cout << "NORMAL ORIENTED" << endl;
_pointsNormals.push_back(pointsVect);
pointsVect.clear();
}
}
Here is the trace of the error :
Estimate normal with nb neight: 18
"Small Set of Point"
VETOR SIZE : 277550
Calls pca_estimate_normals()
0 Mb allocated
Create KD-tree
0 Mb allocated
Computes normals
0 Mb allocated
End of pca_estimate_nomarls()
NORMAL ESTIMATED
NORMAL ORIENTED
--------
VECTOR SIZE : 1046334
0 Mb allocated
Create KD-tree
0 Mb allocated
Computes normals
Process returned -1073741819 (0xC0000005) [Memory access violation]
Here is the code which makes problem :
// iterate over input points, compute and output normal
// vectors (already normalized)
for(it = first; it != beyond; it++)
{
Vector normal = CGALi::pca_estimate_normal<Kernel,Tree>(get(point_pmap,it),
tree, k);
put(normal_pmap, it, normal); // normal_pmap[it] = normal
}
Drive source : 1.5Go free space disk (case virtual mem)
RAM : 4Go
Does someone know how I could avoid this problem of memory with too large set
of points please ?
Thank you very much.
Kind Regards.
Jeulin-L Michael.
------------------------------------------------------------------------
Ce courrier électronique et toutes les pièces éventuellement jointes qu’il
contient sont CONFIDENTIELS et destinés exclusivement à l’usage de leur
destinataire. Si une erreur de transmission ou une adresse erronée a mal
dirigée ce courrier, merci d’en informer l’expéditeur en lui faisant une
réponse par courrier électronique dès réception. Si vous n’êtes pas le
destinataire de ce courrier, vous ne devez pas l’utiliser, le conserver, en
faire état, le distribuer, le copier, l’imprimer ou en révéler le contenu à
une tierce partie.
Ce courrier électronique est à usage strictement informatif et ne saurait
engager de quelque manière que ce soit INFOTERRA France SAS, ni ses filiales.
This e-mail and any attachments hereto are CONFIDENTIAL and intended solely
for the use of the addressee. If you have received this e-mail in error
please send it back to the person that sent it to you.
If you have received it in error, please notify the sender by return email.
If you are not the addressee of this email, you must not use, keep,
disseminate, copy, print or otherwise deal with it.
This email is for information only and will not bind INFOTERRA France SAS in
any contract or obligation, nor its subsidiaries.
It is exactly what I was afraid to know.
The thing which made me doubt is I don`t receive any error from windows about memory overflow.
I`m on Win2K0 32b. :)
Thank you very much for your answer.
Cheers.
--
--------------------------------------------
Michael Jeulin-L, ComputaMaps
Private Bag X20, Constantia 7848, South Africa
tel: +27.21.700 8140, fax: +27.21.701 9520, cell: +27.72.8588181
e-mail:
Manufacturers of digital maps and imagery
http://www.computamaps.com
--------------------------------------------
- [cgal-discuss] pca_estimates_normals memory error with set of point > 1e6, Michael Jeulin-L, 01/29/2010
- Re: [cgal-discuss] pca_estimates_normals memory error with set of point > 1e6, Laurent Saboret, 01/29/2010
- Re: [cgal-discuss] pca_estimates_normals memory error with set of point > 1e6, Michael Jeulin-L, 01/29/2010
- Re: [cgal-discuss] pca_estimates_normals memory error with set of point > 1e6, Michael Jeulin-L, 01/29/2010
- Re: [cgal-discuss] pca_estimates_normals memory error with set of point > 1e6, Laurent Saboret, 01/29/2010
- Re: [cgal-discuss] pca_estimates_normals memory error with set of point > 1e6, Michael Jeulin-L, 01/29/2010
- Re: [cgal-discuss] pca_estimates_normals memory error with set of point > 1e6, Michael Jeulin-L, 01/29/2010
- Re: [cgal-discuss] pca_estimates_normals memory error with set of point > 1e6, Michael Jeulin-L, 01/29/2010
- Re: [cgal-discuss] pca_estimates_normals memory error with set of point > 1e6, Laurent Saboret, 01/29/2010
- Re: [cgal-discuss] pca_estimates_normals memory error with set of point > 1e6, Michael Jeulin-L, 01/29/2010
- Re: [cgal-discuss] pca_estimates_normals memory error with set of point > 1e6, Michael Jeulin-L, 01/29/2010
- Re: [cgal-discuss] pca_estimates_normals memory error with set of point > 1e6, Laurent Saboret, 01/29/2010
Archive powered by MHonArc 2.6.16.