MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / Score

Function Score

Tests/Tracker_Test.cpp:133–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131
132template <typename MODELTYPE>
133int
134Score(const typename MODELTYPE::Model & model,
135 const openMVG::Mat& x1,
136 const openMVG::Mat& x2,
137 double normalizedSigma,
138 InliersVec* isInlier)
139{
140 assert( (int)isInlier->size() == x1.cols() );
141
142 double inlierThreshold = InlierThreshold<MODELTYPE::CODIMENSION>(normalizedSigma);
143 int nbInliers = 0;
144 for (std::size_t j = 0; j < isInlier->size(); ++j) {
145 double error = MODELTYPE::Error( model, x1.col(j), x2.col(j) );
146 if (error < inlierThreshold) {
147 ++nbInliers;
148 (*isInlier)[j] = true;
149 } else {
150 (*isInlier)[j] = false;
151 }
152 }
153
154 return nbInliers;
155}
156
157TEST(ModelSearch, TranslationMinimal)
158{

Callers 2

computeInPlaceMethod · 0.85
unblocked_luMethod · 0.85

Calls 3

sizeMethod · 0.45
colsMethod · 0.45
colMethod · 0.45

Tested by

no test coverage detected