use of georegression.struct.shapes.Quadrilateral_F64 in project BoofCV by lessthanoptimal.
the class GenericTrackerObjectRectangleChecks method reinitialize.
/**
* See if it correctly reinitializes. Should produce identical results when given the same inputs after
* being reinitialized.
*/
@Test
void reinitialize() {
Quadrilateral_F64 where1 = new Quadrilateral_F64();
TrackerObjectQuad<T> tracker = create(imageType);
render(1, 0, 0);
assertTrue(tracker.initialize(input, initRegion));
render(1, 3, -3);
assertTrue(tracker.process(input, where));
render(1, 6, -6);
assertTrue(tracker.process(input, where));
render(1, 0, 0);
assertTrue(tracker.initialize(input, initRegion));
render(1, 3, -3);
assertTrue(tracker.process(input, where1));
render(1, 6, -6);
assertTrue(tracker.process(input, where1));
// Might not be a perfect match due to robust algorithm not being reset to their initial state
checkSolution(where1.a.x, where1.a.y, where1.c.x, where1.c.y, 0.02);
}
Aggregations