Search in sources :

Example 1 with Se3FromEssentialGenerator

use of boofcv.alg.geo.robust.Se3FromEssentialGenerator in project BoofCV by lessthanoptimal.

the class FactoryMultiViewRobust method epipolarRansac.

private static Ransac<Se3_F64, AssociatedPair> epipolarRansac(Estimate1ofEpipolar epipolar, CameraPinholeRadial intrinsic, ConfigRansac ransac) {
    TriangulateTwoViewsCalibrated triangulate = FactoryMultiView.triangulateTwoGeometric();
    ModelManager<Se3_F64> manager = new ModelManagerSe3_F64();
    ModelGenerator<Se3_F64, AssociatedPair> generateEpipolarMotion = new Se3FromEssentialGenerator(epipolar, triangulate);
    DistanceFromModel<Se3_F64, AssociatedPair> distanceSe3 = new DistanceSe3SymmetricSq(triangulate, intrinsic.fx, intrinsic.fy, intrinsic.skew, intrinsic.fx, intrinsic.fy, intrinsic.skew);
    double ransacTOL = ransac.inlierThreshold * ransac.inlierThreshold * 2.0;
    return new Ransac<>(ransac.randSeed, manager, generateEpipolarMotion, distanceSe3, ransac.maxIterations, ransacTOL);
}
Also used : AssociatedPair(boofcv.struct.geo.AssociatedPair) DistanceSe3SymmetricSq(boofcv.alg.geo.robust.DistanceSe3SymmetricSq) ModelManagerSe3_F64(georegression.fitting.se.ModelManagerSe3_F64) Se3FromEssentialGenerator(boofcv.alg.geo.robust.Se3FromEssentialGenerator) Ransac(org.ddogleg.fitting.modelset.ransac.Ransac) TriangulateTwoViewsCalibrated(boofcv.abst.geo.TriangulateTwoViewsCalibrated) Se3_F64(georegression.struct.se.Se3_F64) ModelManagerSe3_F64(georegression.fitting.se.ModelManagerSe3_F64)

Example 2 with Se3FromEssentialGenerator

use of boofcv.alg.geo.robust.Se3FromEssentialGenerator in project BoofCV by lessthanoptimal.

the class FactoryMultiViewRobust method epipolarLMedS.

private static LeastMedianOfSquares<Se3_F64, AssociatedPair> epipolarLMedS(Estimate1ofEpipolar epipolar, CameraPinholeRadial intrinsic, ConfigLMedS configLMedS) {
    TriangulateTwoViewsCalibrated triangulate = FactoryMultiView.triangulateTwoGeometric();
    ModelManager<Se3_F64> manager = new ModelManagerSe3_F64();
    ModelGenerator<Se3_F64, AssociatedPair> generateEpipolarMotion = new Se3FromEssentialGenerator(epipolar, triangulate);
    DistanceFromModel<Se3_F64, AssociatedPair> distanceSe3 = new DistanceSe3SymmetricSq(triangulate, intrinsic.fx, intrinsic.fy, intrinsic.skew, intrinsic.fx, intrinsic.fy, intrinsic.skew);
    LeastMedianOfSquares<Se3_F64, AssociatedPair> config = new LeastMedianOfSquares<>(configLMedS.randSeed, configLMedS.totalCycles, manager, generateEpipolarMotion, distanceSe3);
    config.setErrorFraction(configLMedS.errorFraction);
    return config;
}
Also used : AssociatedPair(boofcv.struct.geo.AssociatedPair) LeastMedianOfSquares(org.ddogleg.fitting.modelset.lmeds.LeastMedianOfSquares) DistanceSe3SymmetricSq(boofcv.alg.geo.robust.DistanceSe3SymmetricSq) ModelManagerSe3_F64(georegression.fitting.se.ModelManagerSe3_F64) Se3FromEssentialGenerator(boofcv.alg.geo.robust.Se3FromEssentialGenerator) TriangulateTwoViewsCalibrated(boofcv.abst.geo.TriangulateTwoViewsCalibrated) Se3_F64(georegression.struct.se.Se3_F64) ModelManagerSe3_F64(georegression.fitting.se.ModelManagerSe3_F64)

Aggregations

TriangulateTwoViewsCalibrated (boofcv.abst.geo.TriangulateTwoViewsCalibrated)2 DistanceSe3SymmetricSq (boofcv.alg.geo.robust.DistanceSe3SymmetricSq)2 Se3FromEssentialGenerator (boofcv.alg.geo.robust.Se3FromEssentialGenerator)2 AssociatedPair (boofcv.struct.geo.AssociatedPair)2 ModelManagerSe3_F64 (georegression.fitting.se.ModelManagerSe3_F64)2 Se3_F64 (georegression.struct.se.Se3_F64)2 LeastMedianOfSquares (org.ddogleg.fitting.modelset.lmeds.LeastMedianOfSquares)1 Ransac (org.ddogleg.fitting.modelset.ransac.Ransac)1