本文整理汇总了C++中TransformationParameters::inverse方法的典型用法代码示例。如果您正苦于以下问题:C++ TransformationParameters::inverse方法的具体用法?C++ TransformationParameters::inverse怎么用?C++ TransformationParameters::inverse使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TransformationParameters
的用法示例。
在下文中一共展示了TransformationParameters::inverse方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: reading
typename PointMatcher<T>::TransformationParameters PointMatcher<T>::ICP::computeWithTransformedReference(
const DataPoints& readingIn,
const DataPoints& reference,
const TransformationParameters& T_refIn_refMean,
const TransformationParameters& T_refIn_dataIn)
{
timer t; // Print how long take the algo
// Apply readings filters
// reading is express in frame <dataIn>
DataPoints reading(readingIn);
//const int nbPtsReading = reading.features.cols();
this->readingDataPointsFilters.init();
this->readingDataPointsFilters.apply(reading);
readingFiltered = reading;
// Reajust reading position:
// from here reading is express in frame <refMean>
TransformationParameters
T_refMean_dataIn = T_refIn_refMean.inverse() * T_refIn_dataIn;
this->transformations.apply(reading, T_refMean_dataIn);
// Prepare reading filters used in the loop
this->readingStepDataPointsFilters.init();
// Since reading and reference are express in <refMean>
// the frame <refMean> is equivalent to the frame <iter(0)>
const int dim(reference.features.rows());
TransformationParameters T_iter = Matrix::Identity(dim, dim);
bool iterate(true);
this->transformationCheckers.init(T_iter, iterate);
size_t iterationCount(0);
// statistics on last step
this->inspector->addStat("ReadingPreprocessingDuration", t.elapsed());
this->inspector->addStat("ReadingInPointCount", readingIn.features.cols());
this->inspector->addStat("ReadingPointCount", reading.features.cols());
LOG_INFO_STREAM("PointMatcher::icp - reading pre-processing took " << t.elapsed() << " [s]");
this->prefilteredReadingPtsCount = reading.features.cols();
t.restart();
// iterations
while (iterate)
{
DataPoints stepReading(reading);
//-----------------------------
// Apply step filter
this->readingStepDataPointsFilters.apply(stepReading);
//-----------------------------
// Transform Readings
this->transformations.apply(stepReading, T_iter);
//-----------------------------
// Match to closest point in Reference
const Matches matches(
this->matcher->findClosests(stepReading)
);
//-----------------------------
// Detect outliers
const OutlierWeights outlierWeights(
this->outlierFilters.compute(stepReading, reference, matches)
);
assert(outlierWeights.rows() == matches.ids.rows());
assert(outlierWeights.cols() == matches.ids.cols());
//cout << "outlierWeights: " << outlierWeights << "\n";
//-----------------------------
// Dump
this->inspector->dumpIteration(
iterationCount, T_iter, reference, stepReading, matches, outlierWeights, this->transformationCheckers
);
//-----------------------------
// Error minimization
// equivalent to:
// T_iter(i+1)_iter(0) = T_iter(i+1)_iter(i) * T_iter(i)_iter(0)
T_iter = this->errorMinimizer->compute(
stepReading, reference, outlierWeights, matches) * T_iter;
// Old version
//T_iter = T_iter * this->errorMinimizer->compute(
// stepReading, reference, outlierWeights, matches);
// in test
this->transformationCheckers.check(T_iter, iterate);
++iterationCount;
}
this->inspector->addStat("IterationsCount", iterationCount);
this->inspector->addStat("PointCountTouched", this->matcher->getVisitCount());
//.........这里部分代码省略.........