Package boofcv.alg.tracker.sfot
Class SparseFlowObjectTracker<Image extends ImageGray<Image>,Derivative extends ImageGray<Derivative>>
java.lang.Object
boofcv.alg.tracker.sfot.SparseFlowObjectTracker<Image,Derivative>
public class SparseFlowObjectTracker<Image extends ImageGray<Image>,Derivative extends ImageGray<Derivative>>
extends Object
Uses a pyramidal KLT tracker to track features inside the user selected region. The motion of the region
is found robustly using
LeastMedianOfSquares
and a translation + rotation model. Drift is a problem
since motion is estimated relative to the previous frame and it will eventually drift away from the original target.
When it works well it is very smooth and can handle partially obscured objects. Can't recover after the target
has been lost. Runs very fast.-
Constructor Summary
ConstructorDescriptionSparseFlowObjectTracker
(ConfigSfot config, Class<Image> imageType, Class<Derivative> derivType, ImageGradient<Image, Derivative> gradient) -
Method Summary
Modifier and TypeMethodDescriptionvoid
init
(Image input, RectangleRotate_F64 region) boolean
boolean
update
(Image input, RectangleRotate_F64 output) Given the input image compute the new location of the target region and store the results in output.
-
Constructor Details
-
SparseFlowObjectTracker
public SparseFlowObjectTracker(ConfigSfot config, Class<Image> imageType, Class<Derivative> derivType, ImageGradient<Image, Derivative> gradient)
-
-
Method Details
-
init
-
update
Given the input image compute the new location of the target region and store the results in output.- Parameters:
input
- next image in the sequence.output
- Storage for the output.- Returns:
- true if tracking is successful
-
isTrackLost
public boolean isTrackLost() -
getConfig
-