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 Object
Bundle adjustment specifically intended for use with visual odometry algorithms.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VisOdomBundleAdjustment.BCamera
static class
VisOdomBundleAdjustment.BFrame
A BFrame is a key frame.static class
VisOdomBundleAdjustment.BObservation
static class
VisOdomBundleAdjustment.BTrack
-
Field Summary
Fields Modifier and Type Field Description MetricBundleAdjustmentUtils
bundle
Configurations and implementation of bundle adjustmentDogArray<VisOdomBundleAdjustment.BCamera>
cameras
List of all the camerasDogArray<VisOdomBundleAdjustment.BFrame>
frames
List of all frames that can be feed into bundle adjustmentList<VisOdomBundleAdjustment.BTrack>
selectedTracks
DogArray<T>
tracks
List of all tracks that can be feed into bundle adjustment -
Constructor Summary
Constructors Constructor Description VisOdomBundleAdjustment(Factory<T> factoryTracks)
-
Method Summary
Modifier and Type Method Description VisOdomBundleAdjustment.BCamera
addCamera(CameraPinholeBrown camera)
Adds a new camera to the sceneVisOdomBundleAdjustment.BFrame
addFrame(int cameraIndex, long id)
VisOdomBundleAdjustment.BFrame
addFrame(long id)
void
addObservation(VisOdomBundleAdjustment.BFrame frame, T track, double pixelX, double pixelY)
T
addTrack(double x, double y, double z, double w)
T
findByTrackerTrack(PointTrack target)
Searches for a track that has the following tracker track.VisOdomBundleAdjustment.BCamera
getCamera(int index)
VisOdomBundleAdjustment.BFrame
getFirstFrame()
VisOdomBundleAdjustment.BFrame
getLastFrame()
boolean
isOptimizeActive()
Returns true if it is configured to be optimizedvoid
optimize(@Nullable PrintStream verbose)
Performs bundle adjustment on the scene and updates parametersvoid
removeFrame(VisOdomBundleAdjustment.BFrame frame, List<PointTrack> removedVisualTracks)
Removes the frame and all references to it.void
reset()
Returns to its original state with new views.void
sanityCheck()
Sees if the graph structure is internally consistent.
-
Field Details
-
tracks
List of all tracks that can be feed into bundle adjustment -
frames
List of all frames that can be feed into bundle adjustment -
cameras
List of all the cameras -
bundle
Configurations and implementation of bundle adjustment -
selectedTracks
-
-
Constructor Details
-
VisOdomBundleAdjustment
-
-
Method Details
-
optimize
Performs bundle adjustment on the scene and updates parameters -
isOptimizeActive
public boolean isOptimizeActive()Returns true if it is configured to be optimized -
addCamera
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
Searches for a track that has the following tracker track. null is none were found -
addTrack
-
addFrame
-
addFrame
-
removeFrame
public void removeFrame(VisOdomBundleAdjustment.BFrame frame, List<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
-
getFirstFrame
-
getCamera
-
sanityCheck
public void sanityCheck()Sees if the graph structure is internally consistent. Used for debugging
-