Package boofcv.alg.sfm.d2
Class ImageMotionPointTrackerKey<I extends ImageBase<I>,IT extends InvertibleTransform<IT>>
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 ImageBase<I>,IT extends InvertibleTransform<IT>>
extends Object
Computes 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
Modifier and TypeFieldDescriptionprotected boolean
protected IT
protected ModelMatcher<IT,
AssociatedPair> protected @Nullable ModelFitter<IT,
AssociatedPair> protected int
protected PointTracker<I>
protected IT
protected IT
-
Constructor Summary
ModifierConstructorDescriptionprotected
ImageMotionPointTrackerKey
(PointTracker<I> tracker, ModelMatcher<IT, AssociatedPair> modelMatcher, @Nullable ModelFitter<IT, AssociatedPair> modelRefiner, IT model, int thresholdOutlierPrune) Specify algorithms to use internally. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Change the current frame into the keyframe.long
boolean
boolean
Processes the next frame in the sequence.void
reset()
Makes the current frame the first frame and discards its past historyvoid
-
Field Details
-
tracker
-
modelMatcher
-
modelRefiner
@Nullable protected @Nullable ModelFitter<IT extends InvertibleTransform<IT>,AssociatedPair> modelRefiner -
worldToKey
-
keyToCurr
-
worldToCurr
-
thresholdOutlierPrune
protected int thresholdOutlierPrune -
keyFrame
protected boolean keyFrame
-
-
Constructor Details
-
ImageMotionPointTrackerKey
public ImageMotionPointTrackerKey(PointTracker<I> tracker, ModelMatcher<IT, AssociatedPair> modelMatcher, @Nullable @Nullable ModelFitter<IT, 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 Details
-
reset
public void reset()Makes the current frame the first frame and discards its past history -
process
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
-
getWorldToKey
-
getKeyToCurr
-
getTracker
-
getModelMatcher
-
isKeyFrame
public boolean isKeyFrame() -
getModelType
-
getFrameID
public long getFrameID()
-