Package boofcv.alg.sfm.d3.structure
Class VisOdomBundleAdjustment<T extends VisOdomBundleAdjustment.BTrack>
- java.lang.Object
-
- boofcv.alg.sfm.d3.structure.VisOdomBundleAdjustment<T>
-
public class VisOdomBundleAdjustment<T extends VisOdomBundleAdjustment.BTrack> extends java.lang.ObjectBundle adjustment specifically intended for use with visual odometry algorithms.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVisOdomBundleAdjustment.BCamerastatic classVisOdomBundleAdjustment.BFrameA BFrame is a key frame.static classVisOdomBundleAdjustment.BObservationstatic classVisOdomBundleAdjustment.BTrack
-
Field Summary
Fields Modifier and Type Field Description boofcv.abst.geo.bundle.BundleAdjustment<boofcv.abst.geo.bundle.SceneStructureMetric>bundleAdjustmentorg.ddogleg.struct.FastQueue<VisOdomBundleAdjustment.BCamera>camerasList of all the camerasorg.ddogleg.struct.FastQueue<VisOdomBundleAdjustment.BFrame>framesList of all frames that can be feed into bundle adjustmentboofcv.abst.geo.bundle.SceneObservationsobservationsjava.util.List<VisOdomBundleAdjustment.BTrack>selectedTracksboofcv.abst.geo.bundle.SceneStructureMetricstructureorg.ddogleg.struct.FastQueue<T>tracksList of all tracks that can be feed into bundle adjustment
-
Constructor Summary
Constructors Constructor Description VisOdomBundleAdjustment(boofcv.abst.geo.bundle.BundleAdjustment<boofcv.abst.geo.bundle.SceneStructureMetric> bundleAdjustment, org.ddogleg.struct.Factory<T> factoryTracks)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VisOdomBundleAdjustment.BCameraaddCamera(boofcv.struct.calib.CameraPinholeBrown camera)Adds a new camera to the sceneVisOdomBundleAdjustment.BFrameaddFrame(int cameraIndex, long id)VisOdomBundleAdjustment.BFrameaddFrame(long id)voidaddObservation(VisOdomBundleAdjustment.BFrame frame, T track, double pixelX, double pixelY)TaddTrack(double x, double y, double z, double w)TfindByTrackerTrack(boofcv.abst.tracker.PointTrack target)Searches for a track that has the following tracker track.VisOdomBundleAdjustment.BCameragetCamera(int index)VisOdomBundleAdjustment.BFramegetFirstFrame()VisOdomBundleAdjustment.BFramegetLastFrame()booleanisOptimizeActive()Returns true if it is configured to be optimizedvoidoptimize()Performs bundle adjustment on the scene and updates parametersvoidremoveFrame(VisOdomBundleAdjustment.BFrame frame, java.util.List<boofcv.abst.tracker.PointTrack> removedVisualTracks)Removes the frame and all references to it.voidreset()Returns to its original state with new views.voidsanityCheck()Sees if the graph structure is internally consistent.
-
-
-
Field Detail
-
tracks
public final org.ddogleg.struct.FastQueue<T extends VisOdomBundleAdjustment.BTrack> tracks
List of all tracks that can be feed into bundle adjustment
-
frames
public final org.ddogleg.struct.FastQueue<VisOdomBundleAdjustment.BFrame> frames
List of all frames that can be feed into bundle adjustment
-
cameras
public final org.ddogleg.struct.FastQueue<VisOdomBundleAdjustment.BCamera> cameras
List of all the cameras
-
structure
public boofcv.abst.geo.bundle.SceneStructureMetric structure
-
observations
public boofcv.abst.geo.bundle.SceneObservations observations
-
bundleAdjustment
public boofcv.abst.geo.bundle.BundleAdjustment<boofcv.abst.geo.bundle.SceneStructureMetric> bundleAdjustment
-
selectedTracks
public java.util.List<VisOdomBundleAdjustment.BTrack> selectedTracks
-
-
Constructor Detail
-
VisOdomBundleAdjustment
public VisOdomBundleAdjustment(boofcv.abst.geo.bundle.BundleAdjustment<boofcv.abst.geo.bundle.SceneStructureMetric> bundleAdjustment, org.ddogleg.struct.Factory<T> factoryTracks)
-
-
Method Detail
-
optimize
public void optimize()
Performs bundle adjustment on the scene and updates parameters
-
isOptimizeActive
public boolean isOptimizeActive()
Returns true if it is configured to be optimized
-
addCamera
public VisOdomBundleAdjustment.BCamera addCamera(boofcv.struct.calib.CameraPinholeBrown camera)
Adds a new camera to the scene
-
reset
public void reset()
Returns to its original state with new views. The camera model is saved
-
addObservation
public void addObservation(VisOdomBundleAdjustment.BFrame frame, T track, double pixelX, double pixelY)
-
findByTrackerTrack
public T findByTrackerTrack(boofcv.abst.tracker.PointTrack target)
Searches for a track that has the following tracker track. null is none were found
-
addTrack
public T addTrack(double x, double y, double z, double w)
-
addFrame
public VisOdomBundleAdjustment.BFrame addFrame(long id)
-
addFrame
public VisOdomBundleAdjustment.BFrame addFrame(int cameraIndex, long id)
-
removeFrame
public void removeFrame(VisOdomBundleAdjustment.BFrame frame, java.util.List<boofcv.abst.tracker.PointTrack> removedVisualTracks)
Removes the frame and all references to it. If a track has no observations after this it is also removed from the master list.- Parameters:
removedVisualTracks- List of tracks which were removed and were being visually tracked because they had no more observations. Cleared each call.
-
getLastFrame
public VisOdomBundleAdjustment.BFrame getLastFrame()
-
getFirstFrame
public VisOdomBundleAdjustment.BFrame getFirstFrame()
-
getCamera
public VisOdomBundleAdjustment.BCamera getCamera(int index)
-
sanityCheck
public void sanityCheck()
Sees if the graph structure is internally consistent. Used for debugging
-
-