use of boofcv.factory.geo.ConfigTrifocalError in project BoofCV by lessthanoptimal.
the class ExampleComputeTrifocalTensor method computeTrifocal.
/**
* Computes the Trifocal Tensor using RANSAC given associated features across 3-views. The found tensor
* is copied into model and the inliers are returned.
*/
public static List<AssociatedTriple> computeTrifocal(DogArray<AssociatedTriple> associated, TrifocalTensor model) {
var configRansac = new ConfigRansac();
configRansac.iterations = 500;
configRansac.inlierThreshold = 1;
var configTri = new ConfigTrifocal();
ConfigTrifocalError configError = new ConfigTrifocalError();
configError.model = ConfigTrifocalError.Model.REPROJECTION_REFINE;
Ransac<TrifocalTensor, AssociatedTriple> ransac = FactoryMultiViewRobust.trifocalRansac(configTri, configError, configRansac);
ransac.process(associated.toList());
model.setTo(ransac.getModelParameters());
return ransac.getMatchSet();
}
Aggregations