Package boofcv.alg.structure.score3d
Class ScoreFundamentalHomographyCompatibility
java.lang.Object
boofcv.alg.structure.score3d.ScoreFundamentalHomographyCompatibility
 All Implemented Interfaces:
EpipolarScore3D
,VerbosePrint
Runs RANSAC to find the fundamental matrix. Score is computed by computing a homography then recomputing
the fundamental matrix from the homography and an epipole. If the homography is compatible with F then F
will be recomputed correctly, otherwise an the recomputed F will be incorrect. The homography will be
compatible if the scene is planar or the motion was purely rotational.
The score is found by computing the number of pairs that are "inliers" between the two versions of F. The ratio
of inliers is used to determine if there's 3D information and compute the score. The score also seeds
to encourage more image features in the RANSAC inlier set.
The inlier threshold used for RANSAC and
inlierErrorTol
do not need to be the same but they would
probably be similar.
WARNING: Has known issues with dominant planes where it will mark them as not having 3D as it mistakes it for
pure rotation.
Field Summary
Modifier and TypeFieldDescriptiondouble
A pair of observations are within tolerance to the model if the error is less than or equal to thisdouble
The error ratio can get massive and this number prevents large values for being weighted too much in the scorefinal ConfigLength
The minimum number of inliers for an edge to be accepted.double
If number of matches from fundamental divided by homography is more than this then it is considered a 3D scene 
Constructor Summary
ConstructorDescription 
Method Summary
Modifier and TypeMethodDescriptiondouble
getScore()
Returns a score for how much 3D information there is.boolean
is3D()
Decides if the two views have a 3D relationship.void
process
(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 isvoid
setVerbose
(@Nullable PrintStream out, @Nullable Set<String> param)

Field Details

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 
minimumInliers
The minimum number of inliers for an edge to be accepted. If relative, then relative to pairs. 
inlierErrorTol
public double inlierErrorTolA pair of observations are within tolerance to the model if the error is less than or equal to this


Constructor Details

ScoreFundamentalHomographyCompatibility


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:EpipolarScore3D
Determines if there's a 3D relationship between the views and scores how strong it is Specified by:
process
in 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:EpipolarScore3D
Returns 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:
getScore
in interfaceEpipolarScore3D
 Returns:
 score

is3D
public boolean is3D()Description copied from interface:EpipolarScore3D
Decides if the two views have a 3D relationship. Specified by:
is3D
in interfaceEpipolarScore3D
 Returns:
 true if 3D or false if not

setVerbose
 Specified by:
setVerbose
in interfaceVerbosePrint
