Registration: if parent registration fails, continue with the child if the prior guess is not null

This commit is contained in:
matlabbe
2016-05-19 16:11:26 -04:00
parent 1ecaae364c
commit a8be08a19a

View File

@@ -186,6 +186,11 @@ Transform Registration::computeTransformationMod(
info = *infoOut;
}
if(!guess.isNull() && force3DoF_)
{
guess = guess.to3DoF();
}
Transform t = computeTransformationImpl(from, to, guess, info);
if(varianceFromInliersCount_)
@@ -207,6 +212,11 @@ Transform Registration::computeTransformationMod(
{
t = child_->computeTransformationMod(from, to, force3DoF_?t.to3DoF():t, &info);
}
else if(!guess.isNull())
{
// This registration approach failed, continue with the guess for the next registration
t = child_->computeTransformationMod(from, to, guess, &info);
}
}
else if(!t.isNull() && force3DoF_)
{