public class FactoryMultiView
extends java.lang.Object
| Constructor and Description |
|---|
FactoryMultiView() |
| Modifier and Type | Method and Description |
|---|---|
static BundleAdjustment<SceneStructureMetric> |
bundleAdjustmentMetric(ConfigBundleAdjustment config) |
static BundleAdjustment<SceneStructureProjective> |
bundleAdjustmentProjective(ConfigBundleAdjustment config) |
static Estimate1ofPnP |
computePnPwithEPnP(int numIterations,
double magicNumber)
Returns a solution to the PnP problem for 4 or more points using EPnP.
|
static Estimate1ofEpipolar |
essential_1(EnumEssential which,
int numRemoveAmbiguity) |
static EstimateNofEpipolar |
essential_N(EnumEssential which) |
static Estimate1ofEpipolar |
fundamental_1(EnumFundamental which,
int numRemoveAmbiguity)
Similar to
fundamental_N(boofcv.factory.geo.EnumFundamental), but it returns only a single hypothesis. |
static EstimateNofEpipolar |
fundamental_N(EnumFundamental which)
Returns an algorithm for estimating a fundamental or essential matrix given a set of
AssociatedPair in pixel coordinates. |
static RefineEpipolar |
fundamentalRefine(double tol,
int maxIterations,
EpipolarError type)
Creates a non-linear optimizer for refining estimates of fundamental or essential matrices.
|
static Estimate1ofEpipolar |
homographyDLT(boolean normalizeInput)
Returns an algorithm for estimating a homography matrix given a set of
AssociatedPair. |
static RefineEpipolar |
homographyRefine(double tol,
int maxIterations,
EpipolarError type)
Creates a non-linear optimizer for refining estimates of homography matrices.
|
static Estimate1ofEpipolar |
homographyTLS()
Returns an algorithm for estimating a homography matrix given a set of
AssociatedPair. |
static Estimate1ofPnP |
pnp_1(EnumPNP which,
int numIterations,
int numTest)
Created an estimator for the P3P problem that selects a single solution by considering additional
observations.
|
static EstimateNofPnP |
pnp_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.
|
static RefinePnP |
pnpRefine(double tol,
int maxIterations)
Refines a pose solution to the PnP problem using non-linear least squares..
|
static TriangulateNViewsCalibrated |
triangulateCalibratedNViewDLT()
Triangulate N views using the Discrete Linear Transform (DLT) with a calibrated camera
|
static TriangulateTwoViewsCalibrated |
triangulateCalibratedTwoDLT()
Triangulate two view using the Discrete Linear Transform (DLT) with a calibrated camera.
|
static TriangulateNViews |
triangulateNViewDLT()
Triangulate N views using the Discrete Linear Transform (DLT) with an uncalibrated camera
|
static PoseFromPairLinear6 |
triangulatePoseFromPair()
Estimate the camera motion give two observations and the 3D world coordinate of each points.
|
static RefineTriangulationCalibrated |
triangulateRefine(double convergenceTol,
int maxIterations)
Refine the triangulation by computing the difference between predicted and actual pixel location.
|
static RefineTriangulationEpipolar |
triangulateRefineEpipolar(double convergenceTol,
int maxIterations)
Refine the triangulation using Sampson error.
|
static TriangulateTwoViews |
triangulateTwoDLT()
Triangulate two view using the Discrete Linear Transform (DLT) with an uncalibrated camera.
|
static TriangulateTwoViewsCalibrated |
triangulateTwoGeometric()
Triangulate two view by finding the intersection of two rays.
|
static TriangulateTwoViewsCalibrated |
triangulateTwoLinearDepth()
Triangulate two view by finding the depth of the pixel using a linear algorithm.
|
static Estimate1ofTrifocalTensor |
trifocal_1(EnumTrifocal type,
int iterations)
Creates a trifocal tensor estimation algorithm.
|
public static BundleAdjustment<SceneStructureMetric> bundleAdjustmentMetric(@Nullable ConfigBundleAdjustment config)
public static BundleAdjustment<SceneStructureProjective> bundleAdjustmentProjective(@Nullable ConfigBundleAdjustment config)
public static Estimate1ofEpipolar homographyDLT(boolean normalizeInput)
AssociatedPair.normalizeInput - If input is in pixel coordinates set to true. False if in normalized image coordinates.HomographyDirectLinearTransformpublic static Estimate1ofEpipolar homographyTLS()
AssociatedPair.HomographyTotalLeastSquarespublic static RefineEpipolar homographyRefine(double tol, int maxIterations, EpipolarError type)
tol - Tolerance for convergence. Try 1e-8maxIterations - Maximum number of iterations it will perform. Try 100 or more.HomographyResidualSampson,
HomographyResidualTransferpublic static EstimateNofEpipolar fundamental_N(EnumFundamental 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.
which - Specifies which algorithm is to be createdEssentialNister5,
FundamentalLinear7,
FundamentalLinear8public static EstimateNofEpipolar essential_N(EnumEssential which)
public static Estimate1ofEpipolar fundamental_1(EnumFundamental which, int numRemoveAmbiguity)
Similar to fundamental_N(boofcv.factory.geo.EnumFundamental), 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 fundamental_N(boofcv.factory.geo.EnumFundamental) 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,
which - Specifies which algorithm is to be creatednumRemoveAmbiguity - Number of sample points used to prune hypotheses. Ignored if only a single solution.GeoModelEstimatorNto1public static Estimate1ofEpipolar essential_1(EnumEssential which, int numRemoveAmbiguity)
public static RefineEpipolar fundamentalRefine(double tol, int maxIterations, EpipolarError type)
tol - Tolerance for convergence. Try 1e-8maxIterations - Maximum number of iterations it will perform. Try 100 or more.FundamentalResidualSampson,
FundamentalResidualSimplepublic static Estimate1ofTrifocalTensor trifocal_1(EnumTrifocal type, int iterations)
type - Which algorithm.iterations - If the algorithm is iterative, then this is the number of iterations. Try 200public static EstimateNofPnP pnp_N(EnumPNP which, int numIterations)
NOTE: Observations are in normalized image coordinates NOT pixels.
which - The algorithm which is to be returned.numIterations - Number of iterations. Only used by some algorithms and recommended number varies
significantly by algorithm.public static Estimate1ofPnP pnp_1(EnumPNP which, int numIterations, int numTest)
NOTE: Observations are in normalized image coordinates NOT pixels.
NOTE: EPnP has several tuning parameters and the defaults here might not be the best for your situation.
Use computePnPwithEPnP(int, double) if you wish to have access to all 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.public static Estimate1ofPnP computePnPwithEPnP(int numIterations, double magicNumber)
NOTE: Observations are in normalized image coordinates NOT pixels.
numIterations - If more then zero then non-linear optimization is done. More is not always better. Try 10magicNumber - Affects how the problem is linearized. See comments in PnPLepetitEPnP. Try 0.1PnPLepetitEPnPpublic static RefinePnP pnpRefine(double tol, int maxIterations)
tol - Convergence tolerance. Try 1e-8maxIterations - Maximum number of iterations. Try 200public static PoseFromPairLinear6 triangulatePoseFromPair()
public static TriangulateTwoViewsCalibrated triangulateTwoGeometric()
TriangulateGeometricpublic static TriangulateTwoViewsCalibrated triangulateCalibratedTwoDLT()
TriangulateCalibratedLinearDLTpublic static TriangulateTwoViews triangulateTwoDLT()
TriangulateUncalibratedLinearDLTpublic static TriangulateNViewsCalibrated triangulateCalibratedNViewDLT()
TriangulateCalibratedLinearDLTpublic static TriangulateNViews triangulateNViewDLT()
TriangulateUncalibratedLinearDLTpublic static TriangulateTwoViewsCalibrated triangulateTwoLinearDepth()
PixelDepthLinearpublic static RefineTriangulationEpipolar triangulateRefineEpipolar(double convergenceTol, int maxIterations)
convergenceTol - Tolerance for finishing optimizationmaxIterations - Maximum number of allowed iterationsResidualsTriangulateSampsonpublic static RefineTriangulationCalibrated triangulateRefine(double convergenceTol, int maxIterations)
convergenceTol - Tolerance for finishing optimizationmaxIterations - Maximum number of allowed iterationsResidualsTriangulateSimple