Search in sources :

Example 6 with Estimate1ofEpipolar

use of boofcv.abst.geo.Estimate1ofEpipolar in project BoofCV by lessthanoptimal.

the class FactoryMultiViewRobust method essentialLMedS.

/**
 * Robust solution for estimating {@link Se3_F64} using epipolar geometry from two views with
 * {@link LeastMedianOfSquares LMedS}.  Input observations are in normalized image coordinates.
 *
 * <ul>
 *     <li>Error units is pixels squared times two</li>
 * </ul>
 *
 * <p>See code for all the details.</p>
 *
 * @param essential Essential matrix estimation parameters.  Can't be null.
 * @param lmeds Parameters for RANSAC.  Can't be null.
 * @return Robust Se3_F64 estimator
 */
public static LeastMedianOfSquares<Se3_F64, AssociatedPair> essentialLMedS(ConfigEssential essential, ConfigLMedS lmeds) {
    essential.checkValidity();
    Estimate1ofEpipolar essentialAlg = FactoryMultiView.computeEssential_1(essential.which, essential.numResolve);
    return epipolarLMedS(essentialAlg, essential.intrinsic, lmeds);
}
Also used : Estimate1ofEpipolar(boofcv.abst.geo.Estimate1ofEpipolar)

Example 7 with Estimate1ofEpipolar

use of boofcv.abst.geo.Estimate1ofEpipolar in project BoofCV by lessthanoptimal.

the class FactoryMultiViewRobust method essentialRansac.

/**
 * Robust solution for estimating {@link Se3_F64} using epipolar geometry from two views with
 * {@link Ransac}.  Input observations are in normalized image coordinates.
 *
 * <p>See code for all the details.</p>
 *
 * @param essential Essential matrix estimation parameters.  Can't be null.
 * @param ransac Parameters for RANSAC.  Can't be null.
 * @return Robust Se3_F64 estimator
 */
public static Ransac<Se3_F64, AssociatedPair> essentialRansac(ConfigEssential essential, ConfigRansac ransac) {
    essential.checkValidity();
    ransac.checkValidity();
    Estimate1ofEpipolar essentialAlg = FactoryMultiView.computeEssential_1(essential.which, essential.numResolve);
    return epipolarRansac(essentialAlg, essential.intrinsic, ransac);
}
Also used : Estimate1ofEpipolar(boofcv.abst.geo.Estimate1ofEpipolar)

Example 8 with Estimate1ofEpipolar

use of boofcv.abst.geo.Estimate1ofEpipolar in project BoofCV by lessthanoptimal.

the class FactoryMultiViewRobust method fundamentalLMedS.

public static LeastMedianOfSquares<Se3_F64, AssociatedPair> fundamentalLMedS(ConfigEssential fundamental, ConfigLMedS lmeds) {
    fundamental.checkValidity();
    Estimate1ofEpipolar essentialAlg = FactoryMultiView.computeEssential_1(fundamental.which, fundamental.numResolve);
    return epipolarLMedS(essentialAlg, fundamental.intrinsic, lmeds);
}
Also used : Estimate1ofEpipolar(boofcv.abst.geo.Estimate1ofEpipolar)

Example 9 with Estimate1ofEpipolar

use of boofcv.abst.geo.Estimate1ofEpipolar in project BoofCV by lessthanoptimal.

the class FactoryMultiViewRobust method fundamentalRansac.

public static Ransac<Se3_F64, AssociatedPair> fundamentalRansac(ConfigFundamental essential, ConfigRansac ransac) {
    essential.checkValidity();
    ransac.checkValidity();
    Estimate1ofEpipolar essentialAlg = FactoryMultiView.computeFundamental_1(essential.which, essential.numResolve);
    return epipolarRansac(essentialAlg, essential.intrinsic, ransac);
}
Also used : Estimate1ofEpipolar(boofcv.abst.geo.Estimate1ofEpipolar)

Example 10 with Estimate1ofEpipolar

use of boofcv.abst.geo.Estimate1ofEpipolar in project BoofCV by lessthanoptimal.

the class ExampleFundamentalMatrix method simpleFundamental.

/**
 * If the set of associated features are known to be correct, then the fundamental matrix can
 * be computed directly with a lot less code.  The down side is that this technique is very
 * sensitive to noise.
 */
public static DMatrixRMaj simpleFundamental(List<AssociatedPair> matches) {
    // Use the 8-point algorithm since it will work with an arbitrary number of points
    Estimate1ofEpipolar estimateF = FactoryMultiView.computeFundamental_1(EnumFundamental.LINEAR_8, 0);
    DMatrixRMaj F = new DMatrixRMaj(3, 3);
    if (!estimateF.process(matches, F))
        throw new IllegalArgumentException("Failed");
    // as was done above.
    return F;
}
Also used : Estimate1ofEpipolar(boofcv.abst.geo.Estimate1ofEpipolar) DMatrixRMaj(org.ejml.data.DMatrixRMaj)

Aggregations

Estimate1ofEpipolar (boofcv.abst.geo.Estimate1ofEpipolar)11 AssociatedPair (boofcv.struct.geo.AssociatedPair)5 DMatrixRMaj (org.ejml.data.DMatrixRMaj)5 ArrayList (java.util.ArrayList)4 Point2D_F64 (georegression.struct.point.Point2D_F64)2 FMatrixRMaj (org.ejml.data.FMatrixRMaj)2 FDistort (boofcv.abst.distort.FDistort)1 TriangulateTwoViewsCalibrated (boofcv.abst.geo.TriangulateTwoViewsCalibrated)1 EstimateNto1ofEpipolar (boofcv.abst.geo.f.EstimateNto1ofEpipolar)1 DistanceFromModelResidual (boofcv.abst.geo.fitting.DistanceFromModelResidual)1 GenerateEpipolarMatrix (boofcv.abst.geo.fitting.GenerateEpipolarMatrix)1 ModelManagerEpipolarMatrix (boofcv.abst.geo.fitting.ModelManagerEpipolarMatrix)1 DistanceEpipolarConstraint (boofcv.alg.geo.f.DistanceEpipolarConstraint)1 FundamentalResidualSampson (boofcv.alg.geo.f.FundamentalResidualSampson)1 PixelTransform2_F32 (boofcv.struct.distort.PixelTransform2_F32)1 Point3D_F64 (georegression.struct.point.Point3D_F64)1 Se3_F64 (georegression.struct.se.Se3_F64)1 Random (java.util.Random)1 Ransac (org.ddogleg.fitting.modelset.ransac.Ransac)1 Test (org.junit.Test)1