Package boofcv.alg.structure
Class MetricSanityChecks
java.lang.Object
boofcv.alg.structure.MetricSanityChecks
- All Implemented Interfaces:
VerbosePrint
Performs various checks to see if a scene is physically possible. These constraints include: 1) objects
appear in front of the camera, 2) objects appear inside the image. 3) Reprojection error isn't massive. 4)
focal length isn't negative. A negative focal length is considered a fatal error and processing
is aborted early on.
Multiple functions are provided to enable these checks when the scene is represented using different data structures.
-
Field Summary
FieldsModifier and TypeFieldDescriptionBit field which indicates if a specific 3D feature was found to have passed (true) or failed (false) the consistency checks.doubleIf this value is exceeded then the point is considered to have a bad reprojection.Used to triangulate a feature's 3D coordinate -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckPhysicalConstraints(MetricBundleAdjustmentUtils bundle, List<CameraPinholeBrown> listDimensions) Checks that every points passes the physical constraints in every view it is seen from.booleancheckPhysicalConstraints(SceneStructureMetric structure, SceneObservations observations, List<CameraPinholeBrown> listPriors) booleancheckPhysicalConstraints(LookUpSimilarImages dbSimilar, SceneWorkingGraph scene, SceneWorkingGraph.View wview, int setIdx) Checks physical constraints for one inlier set in aSceneWorkingGraph.voidsetVerbose(@Nullable PrintStream out, @Nullable Set<String> configuration)
-
Field Details
-
triangulator
Used to triangulate a feature's 3D coordinate -
maxReprojectionErrorSq
public double maxReprojectionErrorSqIf this value is exceeded then the point is considered to have a bad reprojection. Pixels squared. -
badFeatures
Bit field which indicates if a specific 3D feature was found to have passed (true) or failed (false) the consistency checks.
-
-
Constructor Details
-
MetricSanityChecks
public MetricSanityChecks()
-
-
Method Details
-
checkPhysicalConstraints
public boolean checkPhysicalConstraints(LookUpSimilarImages dbSimilar, SceneWorkingGraph scene, SceneWorkingGraph.View wview, int setIdx) Checks physical constraints for one inlier set in aSceneWorkingGraph. Features are triangulated directly from observations. Raw counts for each type of error can be found for this function.- Parameters:
dbSimilar- Use to get feature locations in the imagescene- The scenewview- The view to checksetIdx- Which inlier set in the view- Returns:
- true if nothing went wrong or false if a very nasty error was detected
-
checkPhysicalConstraints
public boolean checkPhysicalConstraints(MetricBundleAdjustmentUtils bundle, List<CameraPinholeBrown> listDimensions) Checks that every points passes the physical constraints in every view it is seen from. If a point fails then it is marked as false in abadFeatures.- Parameters:
bundle- Scene in bundle adjustment formatlistDimensions- Shape of every image- Returns:
- true if a fatal catastrophic error is detected. E.g. negative focal length.
-
checkPhysicalConstraints
public boolean checkPhysicalConstraints(SceneStructureMetric structure, SceneObservations observations, List<CameraPinholeBrown> listPriors) -
setVerbose
public void setVerbose(@Nullable @Nullable PrintStream out, @Nullable @Nullable Set<String> configuration) - Specified by:
setVerbosein interfaceVerbosePrint
-