Class FactoryMultiViewRobust

java.lang.Object
boofcv.factory.geo.FactoryMultiViewRobust

public class FactoryMultiViewRobust extends Object
Factory for creating robust false-positive tolerant estimation algorithms in multi-view geometry. These algorithms tend to have a lot of boilerplate associated with them and the goal of this factory is to make their use much easier and less error prone.
  • Constructor Details

    • FactoryMultiViewRobust

      public FactoryMultiViewRobust()
  • Method Details

    • pnpLMedS

      public static ModelMatcherMultiview<Se3_F64,Point2D3D> pnpLMedS(@Nullable @Nullable ConfigPnP configPnP, ConfigLMedS configLMedS)
      Robust solution to PnP problem using LMedS. Input observations are in normalized image coordinates.
      • Input observations are in normalized image coordinates NOT pixels
      • Error units are pixels squared.

      See code for all the details.

      Parameters:
      configPnP - PnP parameters. Can't be null.
      configLMedS - Parameters for LMedS. Can't be null.
      Returns:
      Robust Se3_F64 estimator
    • pnpRansac

      public static RansacCalibrated<Se3_F64,Point2D3D> pnpRansac(@Nullable @Nullable ConfigPnP configPnP, ConfigRansac configRansac)
      Robust solution to PnP problem using Ransac. Input observations are in normalized image coordinates. Found transform is from world to camera.

      NOTE: Observations are in normalized image coordinates NOT pixels.

      See code for all the details.

      Parameters:
      configPnP - PnP parameters. Can't be null.
      configRansac - Parameters for RANSAC. Can't be null.
      Returns:
      Robust Se3_F64 estimator
      See Also:
    • baselineLMedS

      public static ModelMatcherMultiview<Se3_F64,AssociatedPair> baselineLMedS(@Nullable @Nullable ConfigEssential configEssential, ConfigLMedS configLMedS)
      Robust solution for estimating Se3_F64 using epipolar geometry from two views with LMedS. Input observations are in normalized image coordinates.
      • Error units is pixels squared times two

      See code for all the details.

      Parameters:
      configEssential - Essential matrix estimation parameters. Can't be null.
      configLMedS - Parameters for RANSAC. Can't be null.
      Returns:
      Robust Se3_F64 estimator
    • fundamentalLMedS

      public static ModelMatcher<DMatrixRMaj,AssociatedPair> fundamentalLMedS(@Nullable @Nullable ConfigFundamental configFundamental, ConfigLMedS configLMedS)
    • baselineRansac

      public static RansacCalibrated<Se3_F64,AssociatedPair> baselineRansac(@Nullable @Nullable ConfigEssential configEssential, ConfigRansac configRansac)
      Robust solution for estimating the stereo baseline Se3_F64 using epipolar geometry from two views with RansacCalibrated. Input observations are in normalized image coordinates.

      See code for all the details.

      Parameters:
      configEssential - Essential matrix estimation parameters.
      configRansac - Parameters for RANSAC. Can't be null.
      Returns:
      Robust Se3_F64 estimator
    • baselinePointingRansac

      public static RansacCalibrated2<Se3_F64,AssociatedPair3D> baselinePointingRansac(@Nullable @Nullable ConfigEssential configEssential, ConfigRansac configRansac)
      Robust solution for estimating the stereo baseline Se3_F64 using epipolar geometry from two views with RansacCalibrated2. Input observations are in pointing vector coordinates.

      See code for all the details.

      Parameters:
      configEssential - Essential matrix estimation parameters.
      configRansac - Parameters for RANSAC. Can't be null.
      Returns:
      Robust Se3_F64 estimator
    • essentialRansac

      public static ModelMatcherMultiview<DMatrixRMaj,AssociatedPair> essentialRansac(@Nullable @Nullable ConfigEssential configEssential, ConfigRansac configRansac)
      Estimates the essential matrix given associated image features in normalized image coordinates using RANSAC.
      Parameters:
      configEssential - (Optional) Configuration for computing essential matrix
      configRansac - Configuration for RANSAC
      Returns:
      Robust essential matrix estimator
    • fundamentalRansac

      public static ModelMatcher<DMatrixRMaj,AssociatedPair> fundamentalRansac(ConfigFundamental configFundamental, ConfigRansac configRansac)
    • homographyLMedS

      public static LeastMedianOfSquares<Homography2D_F64,AssociatedPair> homographyLMedS(@Nullable @Nullable ConfigHomography configHomography, ConfigLMedS configLMedS)
      Robust solution for estimating Homography2D_F64 with LMedS. Input observations are in pixel coordinates.
      • Four point linear is used internally

      • inlierThreshold is in pixels

      See code for all the details.

      Parameters:
      configHomography - Homography estimation parameters. If null default is used.
      configLMedS - Parameters for LMedS. Can't be null.
      Returns:
      Homography estimator
    • homographyRansac

      public static Ransac<Homography2D_F64,AssociatedPair> homographyRansac(@Nullable @Nullable ConfigHomography configHomography, ConfigRansac configRansac)
      Robust solution for estimating Homography2D_F64 with Ransac. Input observations are in pixel coordinates.
      • Four point linear is used internally

      • inlierThreshold is in pixels

      See code for all the details.

      Parameters:
      configHomography - Homography estimation parameters. If null default is used.
      configRansac - Parameters for RANSAC. Can't be null.
      Returns:
      Homography estimator
    • homographyCalibratedRansac

      public static RansacCalibrated<Homography2D_F64,AssociatedPair> homographyCalibratedRansac(ConfigRansac configRansac)
      Estimates a homography from normalized image coordinates but computes the error in pixel coordinates
      Parameters:
      configRansac - RANSAC configuration
      Returns:
      Ransac
      See Also:
    • trifocalRansac

      public static Ransac<TrifocalTensor,AssociatedTriple> trifocalRansac(@Nullable @Nullable ConfigTrifocal configTrifocal, @Nullable @Nullable ConfigTrifocalError configError, ConfigRansac configRansac)
      Robust RANSAC based estimator for
      Parameters:
      configTrifocal - Configuration for trifocal tensor calculation
      configError - Configuration for how trifocal error is computed
      configRansac - Configuration for RANSAC
      Returns:
      RANSAC
      See Also:
    • metricThreeViewRansac

      public static RansacProjective<MetricCameraTriple,AssociatedTriple> metricThreeViewRansac(@Nullable @Nullable ConfigPixelsToMetric configSelfcalib, ConfigRansac configRansac)
      Projective to metric self calibration from 3-views
      Parameters:
      configSelfcalib - (Input) configuration for self calibration
      configRansac - (Input) configuration for RANSAC
      Returns:
      RANSAC
    • metricThreeViewLmeds

      public static LeastMedianOfSquaresProjective<MetricCameraTriple,AssociatedTriple> metricThreeViewLmeds(@Nullable @Nullable ConfigPixelsToMetric configSelfcalib, ConfigLMedS configLMedS)
    • createLMEDS

      public static <Model, Point> LeastMedianOfSquares<Model,Point> createLMEDS(ConfigLMedS configLMedS, ModelManager<Model> manager, Class<Point> pointType)
    • createRansac

      public static <Model, Point> Ransac<Model,Point> createRansac(ConfigRansac configRansac, double ransacTol, ModelManager<Model> manager, Class<Point> pointType)
      Returns a new instance of RANSAC. If concurrency is turned on then a concurrent version will be returned.
      Parameters:
      ransacTol - inlier tolerance. The tolerance on config isn't used since that might have the wrong units. This lets the user easily adjust the units without modifying the config.