Package boofcv.alg.sfm.d3
Class VisOdomDualTrackPnP<T extends boofcv.struct.image.ImageBase<T>,Desc extends boofcv.struct.feature.TupleDesc>
- java.lang.Object
-
- boofcv.alg.sfm.d3.VisOdomBundlePnPBase<VisOdomDualTrackPnP.TrackInfo>
-
- boofcv.alg.sfm.d3.VisOdomDualTrackPnP<T,Desc>
-
- All Implemented Interfaces:
org.ddogleg.struct.VerbosePrint
public class VisOdomDualTrackPnP<T extends boofcv.struct.image.ImageBase<T>,Desc extends boofcv.struct.feature.TupleDesc> extends VisOdomBundlePnPBase<VisOdomDualTrackPnP.TrackInfo>
Stereo visual odometry algorithm which relies on tracking features independently in the left and right images and then matching those tracks together. The idea behind this tracker is that the expensive task of association features between left and right cameras only needs to be done once when track is spawned. Triangulation is used to estimate each feature's 3D location. Motion is estimated robustly using a RANSAC type algorithm provided by the user which internally usesPnPtype algorithm. Estimated motion is relative to left camera. FUTURE WORK: Save visual tracks without stereo matches and do monocular tracking on them. This is useful for stereo systems with only a little bit of overlap.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVisOdomDualTrackPnP.TrackInfoA coupled track between the left and right cameras.-
Nested classes/interfaces inherited from class boofcv.alg.sfm.d3.VisOdomBundlePnPBase
VisOdomBundlePnPBase.CameraModel
-
-
Field Summary
Fields Modifier and Type Field Description static intCAMERA_LEFTstatic intCAMERA_RIGHT-
Fields inherited from class boofcv.alg.sfm.d3.VisOdomBundlePnPBase
cameraLoc, cameraModels, current_to_previous, current_to_world, first, found3D, frameManager, initialVisible, inlierTracks, listOf_world_to_frame, maxKeyFrames, minObservationsNotVisible, minObservationsTriangulate, observationsNorm, previous_to_current, profileOut, scene, thresholdRetireTracks, totalDroppedTracksBadBundle, triangulateN, verbose, visibleTracks, world_to_frame
-
-
Constructor Summary
Constructors Constructor Description VisOdomDualTrackPnP(double epilolarTol, boofcv.abst.tracker.PointTracker<T> trackerLeft, boofcv.abst.tracker.PointTracker<T> trackerRight, boofcv.abst.feature.describe.DescribeRegionPoint<T,Desc> describe, boofcv.abst.feature.associate.AssociateDescription2D<Desc> assocL2R, boofcv.abst.geo.Triangulate2ViewsMetric triangulate2, org.ddogleg.fitting.modelset.ModelMatcher<georegression.struct.se.Se3_F64,Stereo2D3D> matcher, org.ddogleg.fitting.modelset.ModelFitter<georegression.struct.se.Se3_F64,Stereo2D3D> modelRefiner, boofcv.abst.geo.bundle.BundleAdjustment<boofcv.abst.geo.bundle.SceneStructureMetric> bundleAdjustment)Specifies internal algorithms and parameters
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddropVisualTrack(boofcv.abst.tracker.PointTrack left)Given the BTrack drop all visual tracks which belong to it.longgetFrameID()booleanisFault()If there are no candidates then a fault happened.booleanprocess(T left, T right)Updates motion estimate using the stereo pair.voidreset()Resets the algorithm into its original statevoidsetCalibration(boofcv.struct.calib.StereoParameters param)Specifies the stereo parameters.-
Methods inherited from class boofcv.alg.sfm.d3.VisOdomBundlePnPBase
dropFramesFromScene, dropTracksNotVisibleAndTooFewObservations, getCurrentToWorld, performKeyFrameMaintenance, setVerbose, triangulateNotSelectedBundleTracks, updateListOfVisibleTracksForOutput
-
-
-
-
Field Detail
-
CAMERA_LEFT
public static final int CAMERA_LEFT
- See Also:
- Constant Field Values
-
CAMERA_RIGHT
public static final int CAMERA_RIGHT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
VisOdomDualTrackPnP
public VisOdomDualTrackPnP(double epilolarTol, boofcv.abst.tracker.PointTracker<T> trackerLeft, boofcv.abst.tracker.PointTracker<T> trackerRight, boofcv.abst.feature.describe.DescribeRegionPoint<T,Desc> describe, boofcv.abst.feature.associate.AssociateDescription2D<Desc> assocL2R, boofcv.abst.geo.Triangulate2ViewsMetric triangulate2, org.ddogleg.fitting.modelset.ModelMatcher<georegression.struct.se.Se3_F64,Stereo2D3D> matcher, org.ddogleg.fitting.modelset.ModelFitter<georegression.struct.se.Se3_F64,Stereo2D3D> modelRefiner, boofcv.abst.geo.bundle.BundleAdjustment<boofcv.abst.geo.bundle.SceneStructureMetric> bundleAdjustment)Specifies internal algorithms and parameters- Parameters:
epilolarTol- Tolerance in pixels for enforcing the epipolar constrainttrackerLeft- Tracker used for left cameratrackerRight- Tracker used for right cameradescribe- Describes features in tracksassocL2R- Assocation for left to righttriangulate2- Triangulation for estimating 3D location from stereo pairmatcher- Robust motion model estimation with outlier rejectionmodelRefiner- Non-linear refinement of motion model
-
-
Method Detail
-
setCalibration
public void setCalibration(boofcv.struct.calib.StereoParameters param)
Specifies the stereo parameters. Note that classes which are passed into constructor are maintained outside. Example, the RANSAC distance model might need to have stereo parameters passed to it externally since there's no generic way to handle that.
-
reset
public void reset()
Resets the algorithm into its original state- Overrides:
resetin classVisOdomBundlePnPBase<VisOdomDualTrackPnP.TrackInfo>
-
process
public boolean process(T left, T right)
Updates motion estimate using the stereo pair.- Parameters:
left- Image from left cameraright- Image from right camera- Returns:
- true if motion estimate was updated and false if not
-
getFrameID
public long getFrameID()
- Specified by:
getFrameIDin classVisOdomBundlePnPBase<VisOdomDualTrackPnP.TrackInfo>
-
isFault
public boolean isFault()
If there are no candidates then a fault happened.- Returns:
- true if fault. false is no fault
-
dropVisualTrack
protected void dropVisualTrack(boofcv.abst.tracker.PointTrack left)
Description copied from class:VisOdomBundlePnPBaseGiven the BTrack drop all visual tracks which belong to it.- Specified by:
dropVisualTrackin classVisOdomBundlePnPBase<VisOdomDualTrackPnP.TrackInfo>
-
-