Package boofcv.alg.structure.score3d
Class ScoreRatioFundamentalHomography
java.lang.Object
boofcv.alg.structure.score3d.ScoreRatioFundamentalHomography
- All Implemented Interfaces:
EpipolarScore3D,VerbosePrint
If there is a geometric relationship or not is determined by the number of inliers. The minimum number is specified
by
minimumInliers. A threshold is used for classifying an edge as 3D or not ratio3D len(F)/len(H)
a value of 1 just requires equality, greater than one means there must be more features from F (fundamental) than
H (homography). See [1] for more details on this test.
[1] Pollefeys, Marc, et al. "Visual modeling with a hand-held camera." International Journal of Computer Vision 59.3 (2004): 207-232.
-
Field Summary
FieldsModifier and TypeFieldDescriptiondoubleThe error ratio can get massive and this number prevents large values for being weighted too much in the scorefinal ConfigLengthThe minimum number of inliers for an edge to be accepted.doubleIf number of matches from fundamental divided by homography is more than this then it is considered a 3D scene -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedScoreRatioFundamentalHomography(ModelMatcher<DMatrixRMaj, AssociatedPair> ransac3D, ModelMatcher<Homography2D_F64, AssociatedPair> ransacH) -
Method Summary
Modifier and TypeMethodDescriptiondoublegetScore()Returns a score for how much 3D information there is.booleanis3D()Decides if the two views have a 3D relationship.voidprocess(CameraPinholeBrown cameraA, @Nullable CameraPinholeBrown cameraB, int featuresA, int featuresB, List<AssociatedPair> pairs, DMatrixRMaj fundamental, DogArray_I32 inliersIdx) Determines if there's a 3D relationship between the views and scores how strong it isvoidsetVerbose(@Nullable PrintStream out, @Nullable Set<String> options)
-
Field Details
-
minimumInliers
The minimum number of inliers for an edge to be accepted. If relative, then relative to pairs. -
ratio3D
public double ratio3DIf number of matches from fundamental divided by homography is more than this then it is considered a 3D scene -
maxRatioScore
public double maxRatioScoreThe error ratio can get massive and this number prevents large values for being weighted too much in the score
-
-
Constructor Details
-
ScoreRatioFundamentalHomography
public ScoreRatioFundamentalHomography(ModelMatcher<DMatrixRMaj, AssociatedPair> ransac3D, ModelMatcher<Homography2D_F64, AssociatedPair> ransacH) -
ScoreRatioFundamentalHomography
protected ScoreRatioFundamentalHomography()
-
-
Method Details
-
process
public void process(CameraPinholeBrown cameraA, @Nullable @Nullable CameraPinholeBrown cameraB, int featuresA, int featuresB, List<AssociatedPair> pairs, DMatrixRMaj fundamental, DogArray_I32 inliersIdx) Description copied from interface:EpipolarScore3DDetermines if there's a 3D relationship between the views and scores how strong it is- Specified by:
processin interfaceEpipolarScore3D- Parameters:
cameraA- (Input) Prior information on the camera intrinsics. View A.cameraB- (Input) Prior information on the camera intrinsics. View B. If null then it's assumed the two cameras are the same.featuresA- (Input) Number of features in imageAfeaturesB- (Input) Number of features in imageBpairs- (Input) Set of point feature pairs between the two imagesfundamental- (Output) Fundamental matrix describing the geometric relationship between the two viewsinliersIdx- (Output) Which features inside of pairs are in the inlier sets
-
getScore
public double getScore()Description copied from interface:EpipolarScore3DReturns a score for how much 3D information there is. 0 = no 3D information. 1 = very strong 3D information. score is 0 to 1.- Specified by:
getScorein interfaceEpipolarScore3D- Returns:
- score
-
is3D
public boolean is3D()Description copied from interface:EpipolarScore3DDecides if the two views have a 3D relationship.- Specified by:
is3Din interfaceEpipolarScore3D- Returns:
- true if 3D or false if not
-
setVerbose
public void setVerbose(@Nullable @Nullable PrintStream out, @Nullable @Nullable Set<String> options) - Specified by:
setVerbosein interfaceVerbosePrint
-