Package boofcv.alg.sfm.structure
Class PairwiseImageMatching<T extends boofcv.struct.image.ImageBase<T>>
- java.lang.Object
-
- boofcv.alg.sfm.structure.PairwiseImageMatching<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.StoppableDetermines connectivity between images by exhaustively considering all possible combination of views. Assocation is found by detecting features inside of each image.
-
-
Field Summary
Fields Modifier and Type Field Description protected boofcv.abst.feature.associate.AssociateDescription<boofcv.struct.feature.TupleDesc>associateprotected boofcv.factory.geo.ConfigEssentialconfigEssentialprotected boofcv.factory.geo.ConfigFundamentalconfigFundamentalprotected boofcv.factory.geo.ConfigRansacconfigRansacprotected boofcv.abst.feature.detdesc.DetectDescribePoint<T,boofcv.struct.feature.TupleDesc>detDescprotected PairwiseImageGraphgraphprotected doubleMIN_ASSOCIATE_FRACTIONprotected intMIN_FEATURE_ASSOCIATEDprotected org.ddogleg.struct.FastQueue<boofcv.struct.geo.AssociatedPair>pairsprotected boofcv.alg.geo.robust.ModelMatcherMultiview<org.ejml.data.DMatrixRMaj,boofcv.struct.geo.AssociatedPair>ransacEssentialprotected org.ddogleg.fitting.modelset.ModelMatcher<org.ejml.data.DMatrixRMaj,boofcv.struct.geo.AssociatedPair>ransacFundamentalprotected java.io.PrintStreamverboseprotected intverboseLevel
-
Constructor Summary
Constructors Modifier Constructor Description protectedPairwiseImageMatching()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 voidaddCamera(java.lang.String cameraName)voidaddCamera(java.lang.String cameraName, boofcv.struct.distort.Point2Transform2_F64 pixelToNorm, boofcv.struct.calib.CameraPinhole pinhole)voidaddImage(T image, java.lang.String cameraName)Adds a new observation from a camera.voidconfigure(int minFeatureAssociate, double minFeatureAssociateFraction)Specifies magic numbers for pruning connectionsprotected booleanconnectViews(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 voiddeclareModelFitting()boofcv.factory.geo.ConfigEssentialgetConfigEssential()boofcv.factory.geo.ConfigFundamentalgetConfigFundamental()boofcv.factory.geo.ConfigRansacgetConfigRansac()java.lang.Class<boofcv.struct.feature.TupleDesc>getDescriptionType()PairwiseImageGraphgetGraph()Returns the found graphbooleanisStopRequested()booleanprocess()Determines connectivity between images.voidrequestStop()voidreset()voidsetVerbose(java.io.PrintStream verbose, int level)
-
-
-
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
-
graph
protected PairwiseImageGraph graph
-
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 haveminFeatureAssociateFraction- 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 callinggetGraph().- Returns:
- true if successful or false if it failed
-
getGraph
public PairwiseImageGraph getGraph()
Returns the found graph
-
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:
requestStopin interfaceorg.ddogleg.struct.Stoppable
-
isStopRequested
public boolean isStopRequested()
- Specified by:
isStopRequestedin interfaceorg.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)
-
-