Package boofcv.alg.sfm.d2
Class ImageMotionPointTrackerKey<I extends boofcv.struct.image.ImageBase<I>,IT extends georegression.struct.InvertibleTransform>
- java.lang.Object
-
- boofcv.alg.sfm.d2.ImageMotionPointTrackerKey<I,IT>
-
- Type Parameters:
I- Input image typeIT- Motion model data type
public class ImageMotionPointTrackerKey<I extends boofcv.struct.image.ImageBase<I>,IT extends georegression.struct.InvertibleTransform> extends java.lang.ObjectComputes the transform from the first image in a sequence to the current frame. Keyframe based algorithm. Whenever a new keyframe is selected by the user all tracks are dropped and new ones spawned. No logic is contained for selecting key frames and relies on the user for selecting them.
-
-
Field Summary
Fields Modifier and Type Field Description protected booleankeyFrameprotected ITkeyToCurrprotected org.ddogleg.fitting.modelset.ModelMatcher<IT,boofcv.struct.geo.AssociatedPair>modelMatcherprotected org.ddogleg.fitting.modelset.ModelFitter<IT,boofcv.struct.geo.AssociatedPair>modelRefinerprotected intthresholdOutlierPruneprotected boofcv.abst.tracker.PointTracker<I>trackerprotected ITworldToCurrprotected ITworldToKey
-
Constructor Summary
Constructors Modifier Constructor Description protectedImageMotionPointTrackerKey()ImageMotionPointTrackerKey(boofcv.abst.tracker.PointTracker<I> tracker, org.ddogleg.fitting.modelset.ModelMatcher<IT,boofcv.struct.geo.AssociatedPair> modelMatcher, org.ddogleg.fitting.modelset.ModelFitter<IT,boofcv.struct.geo.AssociatedPair> modelRefiner, IT model, int thresholdOutlierPrune)Specify algorithms to use internally.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidchangeKeyFrame()Change the current frame into the keyframe.longgetFrameID()ITgetKeyToCurr()org.ddogleg.fitting.modelset.ModelMatcher<IT,boofcv.struct.geo.AssociatedPair>getModelMatcher()java.lang.Class<IT>getModelType()boofcv.abst.tracker.PointTracker<I>getTracker()ITgetWorldToCurr()ITgetWorldToKey()booleanisKeyFrame()booleanprocess(I frame)Processes the next frame in the sequence.voidreset()Makes the current frame the first frame and discards its past historyvoidresetTransforms()
-
-
-
Field Detail
-
tracker
protected boofcv.abst.tracker.PointTracker<I extends boofcv.struct.image.ImageBase<I>> tracker
-
modelMatcher
protected org.ddogleg.fitting.modelset.ModelMatcher<IT extends georegression.struct.InvertibleTransform,boofcv.struct.geo.AssociatedPair> modelMatcher
-
modelRefiner
protected org.ddogleg.fitting.modelset.ModelFitter<IT extends georegression.struct.InvertibleTransform,boofcv.struct.geo.AssociatedPair> modelRefiner
-
worldToKey
protected IT extends georegression.struct.InvertibleTransform worldToKey
-
keyToCurr
protected IT extends georegression.struct.InvertibleTransform keyToCurr
-
worldToCurr
protected IT extends georegression.struct.InvertibleTransform worldToCurr
-
thresholdOutlierPrune
protected int thresholdOutlierPrune
-
keyFrame
protected boolean keyFrame
-
-
Constructor Detail
-
ImageMotionPointTrackerKey
public ImageMotionPointTrackerKey(boofcv.abst.tracker.PointTracker<I> tracker, org.ddogleg.fitting.modelset.ModelMatcher<IT,boofcv.struct.geo.AssociatedPair> modelMatcher, org.ddogleg.fitting.modelset.ModelFitter<IT,boofcv.struct.geo.AssociatedPair> modelRefiner, IT model, int thresholdOutlierPrune)
Specify algorithms to use internally. Each of these classes must work with compatible data structures.- Parameters:
tracker- feature trackermodelMatcher- Fits model to track datamodelRefiner- (Optional) Refines the found model using the entire inlier set. Can be null.model- Motion model data structurethresholdOutlierPrune- If a track is an outlier for this many frames in a row they are pruned
-
ImageMotionPointTrackerKey
protected ImageMotionPointTrackerKey()
-
-
Method Detail
-
reset
public void reset()
Makes the current frame the first frame and discards its past history
-
process
public boolean process(I frame)
Processes the next frame in the sequence.- Parameters:
frame- Next frame in the video sequence- Returns:
- true if motion was estimated and false if no motion was estimated
-
changeKeyFrame
public void changeKeyFrame()
Change the current frame into the keyframe. p1 location of existing tracks is set to their current location and new tracks are spawned. Reference frame transformations are also updated
-
resetTransforms
public void resetTransforms()
-
getWorldToCurr
public IT getWorldToCurr()
-
getWorldToKey
public IT getWorldToKey()
-
getKeyToCurr
public IT getKeyToCurr()
-
getTracker
public boofcv.abst.tracker.PointTracker<I> getTracker()
-
getModelMatcher
public org.ddogleg.fitting.modelset.ModelMatcher<IT,boofcv.struct.geo.AssociatedPair> getModelMatcher()
-
isKeyFrame
public boolean isKeyFrame()
-
getModelType
public java.lang.Class<IT> getModelType()
-
getFrameID
public long getFrameID()
-
-