Skip to content

Commit

Permalink
CalibrateMultiPlanar
Browse files Browse the repository at this point in the history
- Added unit test for computed error statistics
  • Loading branch information
lessthanoptimal committed Nov 30, 2023
1 parent b52cd39 commit 4c0db38
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,22 @@ void perfect( int numLayouts ) {
Se3_F64 f = alg.results.getCameraToSensor(i);
assertTrue(SpecialEuclideanOps_F64.isIdentical(e, f, 0.01, 0.02));
}

alg.getStatistics().forEach(stat->{
// Should be very accurate
assertEquals(0.0, stat.overallMax, 1e-3);
assertEquals(0.0, stat.overallMean, 1e-3);

// sanity check to make sure it's not just returning the default of 0.0
assertNotEquals(0.0, stat.overallMax);
assertNotEquals(0.0, stat.overallMean);

stat.residuals.forEach((r->{
assertEquals(0.0, r.maxError, 1e-3);
assertEquals(0.0, r.meanError, 1e-3);

}));
});
}

/**
Expand Down

0 comments on commit 4c0db38

Please sign in to comment.