Documentation of 'boofcv.factory.geo.FactoryMultiView' Java class
FactoryMultiView
boofcv.factory.geo

Class FactoryMultiView



  • public class FactoryMultiView
    extends java.lang.Object
    Factory for creating abstracted algorithms related to multi-view geometry
    • Constructor Detail

      • FactoryMultiView

        public FactoryMultiView()
    • Method Detail

      • bundleCalibrated

        public static BundleAdjustmentCalibrated bundleCalibrated(double tol,
                                                                  int maxIterations)
        Creates bundle adjustment for a camera with a know and fixed intrinsic calibration
        Parameters:
        tol - Convergence tolerance. Try 1e-8
        maxIterations - Maximum number of iterations. Try 200 or more
        Returns:
        Bundle Adjustment
      • computeHomography

        public static Estimate1ofEpipolar computeHomography(boolean normalize)
        Returns an algorithm for estimating a homography matrix given a set of AssociatedPair.
        Parameters:
        normalize - If input is in pixel coordinates set to true. False if in normalized image coordinates.
        Returns:
        Homography estimator.
        See Also:
        HomographyLinear4
      • refineHomography

        public static RefineEpipolar refineHomography(double tol,
                                                      int maxIterations,
                                                      EpipolarError type)
        Creates a non-linear optimizer for refining estimates of homography matrices.
        Parameters:
        tol - Tolerance for convergence. Try 1e-8
        maxIterations - Maximum number of iterations it will perform. Try 100 or more.
        Returns:
        Homography refinement
        See Also:
        HomographyResidualSampson, HomographyResidualTransfer
      • computeFundamental_N

        public static EstimateNofEpipolar computeFundamental_N(EnumEpipolar which)

        Returns an algorithm for estimating a fundamental or essential matrix given a set of AssociatedPair in pixel coordinates. The number of hypotheses returned and minimum number of samples is dependent on the implementation. The ambiguity from multiple hypotheses can be resolved using other sample points and testing additional constraints.

        All estimated epipolar matrices will have the following constraint:
        x'*F*x = 0, where F is the epipolar matrix, x' = currLoc, and x = keyLoc.

        There are more differences between these algorithms than the minimum number of sample points. Consult the literature for information on critical surfaces which will work or not work with each algorithm. In general, algorithm which require fewer samples have less issues with critical surfaces than the 8-point algorithm.

        IMPORTANT: When estimating a fundamental matrix use pixel coordinates. When estimating an essential matrix use normalized image coordinates from a calibrated camera.

        IMPORTANT. The number of allowed sample points varies depending on the algorithm. The 8 point algorithm can process 8 or more points. Both the 5 an 7 point algorithms require exactly 5 and 7 points exactly. In addition the 5-point algorithm is only for the calibrated (essential) case.

        Parameters:
        which - Specifies which algorithm is to be created
        Returns:
        Fundamental or essential estimation algorithm that returns multiple hypotheses.
        See Also:
        EssentialNister5, FundamentalLinear7, FundamentalLinear8
      • computeFundamental_1

        public static Estimate1ofEpipolar computeFundamental_1(EnumEpipolar which,
                                                               int numRemoveAmbiguity)

        Similar to computeFundamental_N(boofcv.factory.geo.EnumEpipolar), but it returns only a single hypothesis. If the underlying algorithm generates multiple hypotheses they are resolved by considering additional sample points. For example, if you are using the 7 point algorithm at least one additional sample point is required to resolve that ambiguity. So 8 or more sample points are now required.

        All estimated epipolar matrices will have the following constraint:
        x'*F*x = 0, where F is the epipolar matrix, x' = currLoc, and x = keyLoc.

        See computeFundamental_N(boofcv.factory.geo.EnumEpipolar) for a description of the algorithms and what 'minimumSamples' and 'isFundamental' do.

        The 8-point algorithm already returns a single hypothesis and ignores the 'numRemoveAmbiguity' parameter. All other algorithms require one or more points to remove ambiguity. Understanding a bit of theory is required to understand what a good number of points is. If a single point is used then to select the correct answer that point must be in the inlier set. If more than one point, say 10, then not all of those points must be in the inlier set,

        Parameters:
        which - Specifies which algorithm is to be created
        numRemoveAmbiguity - Number of sample points used to prune hypotheses. Ignored if only a single solution.
        Returns:
        Fundamental or essential estimation algorithm that returns a single hypothesis.
        See Also:
        GeoModelEstimatorNto1
      • refineFundamental

        public static RefineEpipolar refineFundamental(double tol,
                                                       int maxIterations,
                                                       EpipolarError type)
        Creates a non-linear optimizer for refining estimates of fundamental or essential matrices.
        Parameters:
        tol - Tolerance for convergence. Try 1e-8
        maxIterations - Maximum number of iterations it will perform. Try 100 or more.
        Returns:
        RefineEpipolar
        See Also:
        FundamentalResidualSampson, FundamentalResidualSimple
      • estimateTrifocal_1

        public static Estimate1ofTrifocalTensor estimateTrifocal_1(EnumTrifocal type,
                                                                   int iterations)
        Creates a trifocal tensor estimation algorithm.
        Parameters:
        type - Which algorithm.
        iterations - If the algorithm is iterative, then this is the number of iterations. Try 200
        Returns:
        Trifocal tensor estimator
      • computePnP_N

        public static EstimateNofPnP computePnP_N(EnumPNP which,
                                                  int numIterations)
        Creates an estimator for the PnP problem that uses only three observations, which is the minimal case and known as P3P.
        Parameters:
        which - The algorithm which is to be returned.
        numIterations - Number of iterations. Only used by some algorithms and recommended number varies significantly by algorithm.
        Returns:
        An estimator which can return multiple estimates.
      • computePnP_1

        public static Estimate1ofPnP computePnP_1(EnumPNP which,
                                                  int numIterations,
                                                  int numTest)
        Created an estimator for the P3P problem that selects a single solution by considering additional observations.

        NOTE: EPnP has several tuning parameters and the defaults here might not be the best for your situation.

        Parameters:
        which - The algorithm which is to be returned.
        numIterations - Number of iterations. Only used by some algorithms and recommended number varies significantly by algorithm.
        numTest - How many additional sample points are used to remove ambiguity in the solutions. Not used if only a single solution is found.
        Returns:
        An estimator which returns a single estimate.
      • computePnPwithEPnP

        public static Estimate1ofPnP computePnPwithEPnP(int numIterations,
                                                        double magicNumber)
        Returns a solution to the PnP problem for 4 or more points using EPnP. Fast and fairly accurate algorithm. Can handle general and planar scenario automatically.
        Parameters:
        numIterations - If more then zero then non-linear optimization is done. More is not always better. Try 10
        magicNumber - Affects how the problem is linearized. See comments in PnPLepetitEPnP. Try 0.1
        Returns:
        Estimate1ofPnP
        See Also:
        PnPLepetitEPnP
      • refinePnP

        public static RefinePnP refinePnP(double tol,
                                          int maxIterations)
        Refines a pose solution to the PnP problem using non-linear least squares..
        Parameters:
        tol - Convergence tolerance. Try 1e-8
        maxIterations - Maximum number of iterations. Try 200
      • triangulatePoseFromPair

        public static PoseFromPairLinear6 triangulatePoseFromPair()
        Estimate the camera motion give two observations and the 3D world coordinate of each points.
        Returns:
        PoseFromPairLinear6
      • triangulateTwoLinearDepth

        public static TriangulateTwoViewsCalibrated triangulateTwoLinearDepth()
        Triangulate two view by finding the depth of the pixel using a linear algorithm.
        Returns:
        Two view triangulation algorithm
        See Also:
        PixelDepthLinear
      • triangulateRefineEpipolar

        public static RefineTriangulationEpipolar triangulateRefineEpipolar(double convergenceTol,
                                                                            int maxIterations)
        Refine the triangulation using Sampson error. Approximately takes in account epipolar constraints.
        Parameters:
        convergenceTol - Tolerance for finishing optimization
        maxIterations - Maximum number of allowed iterations
        Returns:
        Triangulation refinement algorithm.
        See Also:
        ResidualsTriangulateSampson
      • triangulateRefine

        public static RefineTriangulationCalibrated triangulateRefine(double convergenceTol,
                                                                      int maxIterations)
        Refine the triangulation by computing the difference between predicted and actual pixel location. Does not take in account epipolar constraints.
        Parameters:
        convergenceTol - Tolerance for finishing optimization
        maxIterations - Maximum number of allowed iterations
        Returns:
        Triangulation refinement algorithm.
        See Also:
        ResidualsTriangulateSimple

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.