Class MultiViewStereoFromKnownSceneStructure<T extends ImageGray<T>>

All Implemented Interfaces:

public class MultiViewStereoFromKnownSceneStructure<T extends ImageGray<T>> extends Object implements VerbosePrint
Creates a dense point cloud from multiple stereo pairs. When possible, a single disparity image is computed using multiple stereo pairs with a single "center" image that is common to all pairs. This allows noise to be reduced using the redundant information. A combined 3D point cloud is then found using multiple disparity images while removing redundant points.
  1. Compute the score for every view if it was a "center" view among multiple stereo pairs
  2. Sort views based on scores with the best first
  3. Greedily select views to act as a center view and compute a combined disparity image from its neighbors
  4. Add a disparity image to the combined 3D point cloud while pruning pixels which are too similar
If you just want the point cloud then calling getCloud() is what you need. If information on each view's contribution to the point cloud is needed then you need to call #getDisparityCloud() and access the view specific results. NOTE: Before this can be used you must call setStereoDisparity(boofcv.abst.disparity.StereoDisparity<T, boofcv.struct.image.GrayF32>).
See Also:
  • Field Details

    • minimumQuality3D

      public double minimumQuality3D
      Specifies the minimum quality of the 3D information between two views for it to be used as a stereo pair.
      See Also:
    • maximumCenterOverlap

      public double maximumCenterOverlap
      Maximum amount of screen space two connected views can have and both of them be a center. Inclusive. 0 to 1.0
    • maxCombinePairs

      public int maxCombinePairs
      Maximum number of stereo pairs that will be combined. If more than this number then the best are selected
    • listener

      @Nullable protected @Nullable MultiViewStereoFromKnownSceneStructure.Listener<T extends ImageGray<T>> listener
      Used to access temporary results before they are discarded
    • listCenters

      Which views acted as "centers" and contributed to the point cloud
    • imageLookUp

      protected LookUpImages imageLookUp
  • Constructor Details

    • MultiViewStereoFromKnownSceneStructure

      public MultiViewStereoFromKnownSceneStructure(LookUpImages imageLookUp, ImageType<T> imageType)
    • MultiViewStereoFromKnownSceneStructure

      public MultiViewStereoFromKnownSceneStructure(ImageType<T> imageType)
  • Method Details

    • process

      public void process(SceneStructureMetric scene, @Nullable @Nullable SceneObservations observations, StereoPairGraph pairs)
      Computes a point cloud given the known scene and a set of stereo pairs.
      scene - (Input) Specifies the scene parameters for each view. Extrinsic and intrinsic.
      observations - (Input) Specifies the observed state of the camera.
      pairs - (Input) Which views are to be used and their relationship to each other
    • pruneViewsThatAreSimilarByNeighbors

      protected void pruneViewsThatAreSimilarByNeighbors(SceneStructureMetric scene, @Nullable @Nullable SceneObservations observations)
      Marks a view as used so that it can't be used as a center if most of the view is "covered" by another view which has a higher score and most of the view area is covered by other views. The exception to this rule is if there are a significant number of pixels not covered by any neighbors.
    • computeIntersection

      protected double computeIntersection(SceneStructureMetric scene, @Nullable @Nullable SceneObservations observations, MultiViewStereoFromKnownSceneStructure.ViewInfo connected)
      Computes how much the two rectified images intersect each other
      fraction of intersection, 0.0 to 1.0
    • getCloud

      public List<Point3D_F64> getCloud()
      Returns the computed 3D point cloud.
    • setStereoDisparity

      public void setStereoDisparity(StereoDisparity<T,GrayF32> stereoDisparity)
      Specifies which stereo disparity algorithm to use
    • setImageLookUp

      public void setImageLookUp(LookUpImages imageLookUp)
    • setVerbose

      public void setVerbose(@Nullable @Nullable PrintStream out, @Nullable @Nullable Set<String> configuration)
      Specified by:
      setVerbose in interface VerbosePrint