public class MedianFlowTracker extends Object
KLTTracker
which has some special
checks to make sure tracked points are actually good, and once it knows an overall
median of motion is calculated and reflected in the update of a bounding box.
The ForwardBackward procedure checks whether a given point is tracked well.
Points in a uniform grid are tracked within a bounding box from frame A -> B
The points that are tracked correctly are then tracked from B -> A.
The Normalised Cross correlation is measured between points in A and B which survive this A -> B -> A transfer
The euclidian distance is measured between those points which started at A and the same points as tracked to A via B.
The median cross correlation and euclidian distance is used as a threshold to select points which were tracked well
between A and B.
The relative motion of these points from A to B is used to calcualte a movement and scale shift of the bounding box in A.Modifier and Type | Field and Description |
---|---|
FeatureList |
featuresTrackedToAviaB
Features tracked back to A form B
|
FeatureList |
featuresTrackedToBfromA
Features tracked to B from A
|
Rectangle |
trackerBB
The current tracker bounding box.
|
Constructor and Description |
---|
MedianFlowTracker()
null bounding box and init the
KLTTracker |
Modifier and Type | Method and Description |
---|---|
void |
cleanPreviousData()
null the bounding box
|
void |
track(FImage prevMat,
FImage currMat,
Rectangle prevBB)
track points from the previous image within the bounding box to the current image (from A to B)
|
public FeatureList featuresTrackedToBfromA
public FeatureList featuresTrackedToAviaB
public MedianFlowTracker()
KLTTracker
public void cleanPreviousData()