Class PairwiseImageMatching<T extends boofcv.struct.image.ImageBase<T>>

  • All Implemented Interfaces:
    org.ddogleg.struct.Stoppable

    public class PairwiseImageMatching<T extends boofcv.struct.image.ImageBase<T>>
    extends java.lang.Object
    implements org.ddogleg.struct.Stoppable
    Determines connectivity between images by exhaustively considering all possible combination of views. Assocation is found by detecting features inside of each image.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.ddogleg.struct.Stoppable

        org.ddogleg.struct.Stoppable.Stopped
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected boofcv.abst.feature.associate.AssociateDescription<boofcv.struct.feature.TupleDesc> associate  
      protected boofcv.factory.geo.ConfigEssential configEssential  
      protected boofcv.factory.geo.ConfigFundamental configFundamental  
      protected boofcv.factory.geo.ConfigRansac configRansac  
      protected boofcv.abst.feature.detdesc.DetectDescribePoint<T,​boofcv.struct.feature.TupleDesc> detDesc  
      protected PairwiseImageGraph graph  
      protected double MIN_ASSOCIATE_FRACTION  
      protected int MIN_FEATURE_ASSOCIATED  
      protected org.ddogleg.struct.FastQueue<boofcv.struct.geo.AssociatedPair> pairs  
      protected boofcv.alg.geo.robust.ModelMatcherMultiview<org.ejml.data.DMatrixRMaj,​boofcv.struct.geo.AssociatedPair> ransacEssential  
      protected org.ddogleg.fitting.modelset.ModelMatcher<org.ejml.data.DMatrixRMaj,​boofcv.struct.geo.AssociatedPair> ransacFundamental  
      protected java.io.PrintStream verbose  
      protected int verboseLevel  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected PairwiseImageMatching()  
        PairwiseImageMatching​(boofcv.abst.feature.detdesc.DetectDescribePoint<T,​boofcv.struct.feature.TupleDesc> detDesc, boofcv.abst.feature.associate.AssociateDescription<boofcv.struct.feature.TupleDesc> associate)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addCamera​(java.lang.String cameraName)  
      void addCamera​(java.lang.String cameraName, boofcv.struct.distort.Point2Transform2_F64 pixelToNorm, boofcv.struct.calib.CameraPinhole pinhole)  
      void addImage​(T image, java.lang.String cameraName)
      Adds a new observation from a camera.
      void configure​(int minFeatureAssociate, double minFeatureAssociateFraction)
      Specifies magic numbers for pruning connections
      protected boolean connectViews​(boofcv.alg.sfm.structure.PairwiseImageGraph.View viewA, boofcv.alg.sfm.structure.PairwiseImageGraph.View viewB, org.ddogleg.struct.FastAccess<boofcv.struct.feature.AssociatedIndex> matches)
      Associate features between the two views.
      protected void declareModelFitting()  
      boofcv.factory.geo.ConfigEssential getConfigEssential()  
      boofcv.factory.geo.ConfigFundamental getConfigFundamental()  
      boofcv.factory.geo.ConfigRansac getConfigRansac()  
      java.lang.Class<boofcv.struct.feature.TupleDesc> getDescriptionType()  
      PairwiseImageGraph getGraph()
      Returns the found graph
      boolean isStopRequested()  
      boolean process()
      Determines connectivity between images.
      void requestStop()  
      void reset()  
      void setVerbose​(java.io.PrintStream verbose, int level)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • MIN_ASSOCIATE_FRACTION

        protected double MIN_ASSOCIATE_FRACTION
      • MIN_FEATURE_ASSOCIATED

        protected int MIN_FEATURE_ASSOCIATED
      • detDesc

        protected boofcv.abst.feature.detdesc.DetectDescribePoint<T extends boofcv.struct.image.ImageBase<T>,​boofcv.struct.feature.TupleDesc> detDesc
      • associate

        protected boofcv.abst.feature.associate.AssociateDescription<boofcv.struct.feature.TupleDesc> associate
      • configRansac

        protected boofcv.factory.geo.ConfigRansac configRansac
      • configEssential

        protected boofcv.factory.geo.ConfigEssential configEssential
      • configFundamental

        protected boofcv.factory.geo.ConfigFundamental configFundamental
      • pairs

        protected org.ddogleg.struct.FastQueue<boofcv.struct.geo.AssociatedPair> pairs
      • ransacEssential

        protected boofcv.alg.geo.robust.ModelMatcherMultiview<org.ejml.data.DMatrixRMaj,​boofcv.struct.geo.AssociatedPair> ransacEssential
      • ransacFundamental

        protected org.ddogleg.fitting.modelset.ModelMatcher<org.ejml.data.DMatrixRMaj,​boofcv.struct.geo.AssociatedPair> ransacFundamental
      • verbose

        protected java.io.PrintStream verbose
      • verboseLevel

        protected int verboseLevel
    • Constructor Detail

      • PairwiseImageMatching

        public PairwiseImageMatching​(boofcv.abst.feature.detdesc.DetectDescribePoint<T,​boofcv.struct.feature.TupleDesc> detDesc,
                                     boofcv.abst.feature.associate.AssociateDescription<boofcv.struct.feature.TupleDesc> associate)
      • PairwiseImageMatching

        protected PairwiseImageMatching()
    • Method Detail

      • declareModelFitting

        protected void declareModelFitting()
      • configure

        public void configure​(int minFeatureAssociate,
                              double minFeatureAssociateFraction)
        Specifies magic numbers for pruning connections
        Parameters:
        minFeatureAssociate - Minimum number of features a connection needs to have
        minFeatureAssociateFraction - Fraction of total features for edge and both images.
      • addCamera

        public void addCamera​(java.lang.String cameraName)
      • addCamera

        public void addCamera​(java.lang.String cameraName,
                              boofcv.struct.distort.Point2Transform2_F64 pixelToNorm,
                              boofcv.struct.calib.CameraPinhole pinhole)
      • addImage

        public void addImage​(T image,
                             java.lang.String cameraName)
        Adds a new observation from a camera. Detects features inside the and saves those.
        Parameters:
        image - The image
      • process

        public boolean process()
        Determines connectivity between images. Results can be found by calling getGraph().
        Returns:
        true if successful or false if it failed
      • connectViews

        protected boolean connectViews​(boofcv.alg.sfm.structure.PairwiseImageGraph.View viewA,
                                       boofcv.alg.sfm.structure.PairwiseImageGraph.View viewB,
                                       org.ddogleg.struct.FastAccess<boofcv.struct.feature.AssociatedIndex> matches)
        Associate features between the two views. Then compute a homography and essential matrix using LSMed. Add features to the edge if they an inlier in essential. Save fit score of homography vs essential.
      • requestStop

        public void requestStop()
        Specified by:
        requestStop in interface org.ddogleg.struct.Stoppable
      • isStopRequested

        public boolean isStopRequested()
        Specified by:
        isStopRequested in interface org.ddogleg.struct.Stoppable
      • getDescriptionType

        public java.lang.Class<boofcv.struct.feature.TupleDesc> getDescriptionType()
      • getConfigEssential

        public boofcv.factory.geo.ConfigEssential getConfigEssential()
      • getConfigFundamental

        public boofcv.factory.geo.ConfigFundamental getConfigFundamental()
      • getConfigRansac

        public boofcv.factory.geo.ConfigRansac getConfigRansac()
      • reset

        public void reset()
      • setVerbose

        public void setVerbose​(java.io.PrintStream verbose,
                               int level)