Package boofcv.alg.structure
Class ThreeViewEstimateMetricScene
java.lang.Object
boofcv.alg.structure.ThreeViewEstimateMetricScene
- All Implemented Interfaces:
VerbosePrint
Estimates the metric scene's structure given a set of sparse features associations from three views. This is intended to give the best possible solution from the sparse set of matching features. Its internal methods are updated as better strategies are found.
Assumptions:- Principle point is zero
- Zero skew
- fx = fy approximately
The zero principle point is enforced prior to calling process(java.util.List<boofcv.struct.geo.AssociatedTriple>)
by subtracting the image center from
each pixel observations.
- Fit Trifocal tensor using RANSAC
- Get and refine camera matrices
- Compute dual absolute quadratic
- Estimate intrinsic parameters from DAC
- Estimate metric scene structure
- Sparse bundle adjustment
- Tweak parameters and sparse bundle adjustment again
-
Field Summary
Modifier and TypeFieldDescriptionprotected int
boolean
Optimize points in homogenous coordinatesfinal DogArray<CameraPinholeBrown>
Found intrinsics for each cameraFound extrinsics for each view.double
If a positive number the focal length will be assumed to be thatdouble
How many features it will keep when pruning.int[]
Use to specify if multiple views share a camera.protected int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Use configurations to create new instances of algorithms.void
initialize
(int width, int height) Initializes data structures and fixates configurationsboolean
process
(List<AssociatedTriple> associated) Determines the metric scene.void
setVerbose
(@Nullable PrintStream out, @Nullable Set<String> configuration)
-
Field Details
-
configSelfCalib
-
configRansac
-
configSBA
-
convergeSBA
-
homogenous
public boolean homogenousOptimize points in homogenous coordinates -
viewToCamera
public int[] viewToCameraUse to specify if multiple views share a camera. Values from 0 to 2, inclusive. -
manualFocalLength
public double manualFocalLengthIf a positive number the focal length will be assumed to be that -
pruneFraction
public double pruneFractionHow many features it will keep when pruning. If it prunes features then you will long longer know which feature in structure corresponds to an inlier. -
ransac
-
inliers
-
listPinhole
Found intrinsics for each camera -
listWorldToView
Found extrinsics for each view. view 0 is always identity -
bundleAdjustment
-
width
protected int width -
height
protected int height
-
-
Constructor Details
-
ThreeViewEstimateMetricScene
public ThreeViewEstimateMetricScene()Sets configurations to their default value
-
-
Method Details
-
declareAlgorithms
public void declareAlgorithms()Use configurations to create new instances of algorithms. -
initialize
public void initialize(int width, int height) Initializes data structures and fixates configurations- Parameters:
width
- width of all imagesheight
- height of all images
-
process
Determines the metric scene. Pixel coordinates are assumed to already have been adjusted for the principle point being zero, e.g. minus (cx, cy).- Parameters:
associated
- List of associated features from 3 views. pixels- Returns:
- true if successful or false if it failed
-
setVerbose
public void setVerbose(@Nullable @Nullable PrintStream out, @Nullable @Nullable Set<String> configuration) - Specified by:
setVerbose
in interfaceVerbosePrint
-