removed small bug that prevented the alignment of already perfectly aligned meshes...

This commit is contained in:
Paolo Cignoni cignoni 2011-09-20 15:44:17 +00:00
parent 588bd581a6
commit ae9ae096d0
2 changed files with 7 additions and 6 deletions

View File

@ -151,10 +151,11 @@ void AlignPair::Stat::HTMLDump(FILE *fp)
/*
Chiamata dopo ogni iterazione dell ICP per scartare le coppie di punti
secondo i due valori di filtraggio in percentile PassHi e PassLo
E' l'unica funzione ad usare PointNum e MinPointNum;
This function is used to choose remove outliers after each ICP iteration.
All the points with a distance over the given Percentile are discarded.
It uses two parameters
MaxPointNum an (unused) hard limit on the number of points that are choosen
MinPointNum the minimum number of points that have to be chosen to be usable
*/
bool AlignPair::ChoosePoints( vector<Point3d> &Ps, // vertici corrispondenti su src (rossi)
@ -175,7 +176,7 @@ bool AlignPair::ChoosePoints( vector<Point3d> &Ps, // vertici corrispondenti s
{
int index = fnd+myrnd.generate(lastgood-fnd);
double dd=Distance(Ps[index],Pt[index]);
if(dd<newmaxd)
if(dd<=newmaxd)
{
swap(Ps[index],Ps[fnd]);
swap(Ns[index],Ns[fnd]);

View File

@ -218,7 +218,7 @@ public:
int coverage; // quanto e' ricoperta da altre mesh eccetto se stessa (eg: se ho due mesh di 1000 con overlap al 30% la covrg e' 300)
int area; // numero di voxel toccati da questa mesh
bool operator < (OGMeshInfo &o) const { return area<o.area;}
static const int MaxStat() { return 64;}
static int MaxStat() { return 64;}
bool used;
};
/* Classe con informazioni su un arco plausibile