Package boofcv.alg.structure
Class GenerateStereoPairGraphFromScene
java.lang.Object
boofcv.alg.structure.GenerateStereoPairGraphFromScene
- All Implemented Interfaces:
VerbosePrint
Given the
sparse reconstruction
, create a StereoPairGraph
that
describes which views are compatible for computing dense stereo disparity from.-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
Points visible in the view -
Field Summary
Modifier and TypeFieldDescriptiondouble
Intended to stop small number of observations causing large swings in score.double
Minimum fraction for common features between the two framesdouble
If the predicted disparity is above this value the score will not improve. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
computePointingVector
(Se3_F64 world_to_view, SceneStructureCommon.Point p, boolean homogenous, Vector3D_F64 pointing) Computes the pointing vector between the view and point in world frame.protected void
connect
(int viewIdxA, int viewIdxB) Connects two views together and makes sure it isn't done twiceprotected void
createStereoGraph
(gnu.trove.map.TIntObjectMap<String> viewToId) Creates the output graph.protected void
findCommonFeatureAngles
(GenerateStereoPairGraphFromScene.View viewA, GenerateStereoPairGraphFromScene.View viewB) Finds common features between the two views and computes the acute angles between themprotected void
Creates a lookup table from view to points and find the vector going from view to pointvoid
process
(gnu.trove.map.TIntObjectMap<String> viewIdx_to_imageId, SceneStructureMetric scene) Computes aStereoPairGraph
from the sparse scene graphvoid
setVerbose
(@Nullable PrintStream out, @Nullable Set<String> set)
-
Field Details
-
countSmootherParam
public double countSmootherParamIntended to stop small number of observations causing large swings in score. Larger means more smoothing. -
minimumCommonFeaturesFrac
public double minimumCommonFeaturesFracMinimum fraction for common features between the two frames -
targetDisparity
public double targetDisparityIf the predicted disparity is above this value the score will not improve.
-
-
Constructor Details
-
GenerateStereoPairGraphFromScene
public GenerateStereoPairGraphFromScene()
-
-
Method Details
-
process
public void process(gnu.trove.map.TIntObjectMap<String> viewIdx_to_imageId, SceneStructureMetric scene) Computes aStereoPairGraph
from the sparse scene graph- Parameters:
viewIdx_to_imageId
- (Input) Look up table from view index in scene to the image ID/namescene
- (Input) Sparse 3D scene
-
matchPointsToViews
Creates a lookup table from view to points and find the vector going from view to point -
computePointingVector
protected void computePointingVector(Se3_F64 world_to_view, SceneStructureCommon.Point p, boolean homogenous, Vector3D_F64 pointing) Computes the pointing vector between the view and point in world frame.- Parameters:
pointing
- (Output) Cartesian vector pointing from the view to the point.
-
connect
protected void connect(int viewIdxA, int viewIdxB) Connects two views together and makes sure it isn't done twice -
createStereoGraph
Creates the output graph. A vertex is created for each view in the scene. The quality between connected views is found by looking at the angle between points and the number of common points -
findCommonFeatureAngles
protected void findCommonFeatureAngles(GenerateStereoPairGraphFromScene.View viewA, GenerateStereoPairGraphFromScene.View viewB) Finds common features between the two views and computes the acute angles between them -
setVerbose
- Specified by:
setVerbose
in interfaceVerbosePrint
-