public class PointTrackerKltPyramid<I extends boofcv.struct.image.ImageSingleBand,D extends boofcv.struct.image.ImageSingleBand> extends java.lang.Object implements PointTracker<I>
PyramidKltTracker for PointTracker. Every track
will have the same size and shaped descriptor. If any fault is encountered the track will be dropped.| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<boofcv.alg.tracker.klt.PyramidKltFeature> |
active |
protected boofcv.struct.pyramid.PyramidDiscrete<I> |
basePyramid |
protected boofcv.alg.tracker.klt.KltConfig |
config |
protected java.lang.Class<D> |
derivType |
protected D[] |
derivX |
protected D[] |
derivY |
protected java.util.List<boofcv.alg.tracker.klt.PyramidKltFeature> |
dropped |
protected boofcv.abst.filter.derivative.ImageGradient<I,D> |
gradient |
protected I |
input |
protected java.util.List<boofcv.alg.tracker.klt.PyramidKltFeature> |
spawned |
protected int |
templateRadius |
protected boofcv.alg.tracker.klt.PyramidKltTracker<I,D> |
tracker |
protected java.util.List<boofcv.alg.tracker.klt.PyramidKltFeature> |
unused |
| Constructor and Description |
|---|
PointTrackerKltPyramid(boofcv.alg.tracker.klt.KltConfig config,
int templateRadius,
boofcv.struct.pyramid.PyramidDiscrete<I> pyramid,
boofcv.alg.feature.detect.interest.GeneralFeatureDetector<I,D> detector,
boofcv.abst.filter.derivative.ImageGradient<I,D> gradient,
boofcv.alg.interpolate.InterpolateRectangle<I> interpInput,
boofcv.alg.interpolate.InterpolateRectangle<D> interpDeriv,
java.lang.Class<D> derivType)
Constructor which specified the KLT track manager and how the image pyramids are computed.
|
PointTrackerKltPyramid(boofcv.alg.tracker.klt.KltConfig config,
int templateRadius,
boofcv.struct.pyramid.PyramidDiscrete<I> pyramid,
boofcv.abst.filter.derivative.ImageGradient<I,D> gradient,
boofcv.alg.interpolate.InterpolateRectangle<I> interpInput,
boofcv.alg.interpolate.InterpolateRectangle<D> interpDeriv,
java.lang.Class<D> derivType) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addToList(java.util.List<boofcv.alg.tracker.klt.PyramidKltFeature> in,
java.util.List<PointTrack> out) |
PointTrack |
addTrack(double x,
double y)
Creates a new feature track at the specified location.
|
protected boolean |
checkValidSpawn(PointTrack p)
Returns true if a new track can be spawned here.
|
protected void |
declareOutput() |
void |
dropAllTracks()
Drops all feature to be dropped and will no longer be tracked.
|
boolean |
dropTrack(PointTrack track)
Manually forces a track to be dropped.
|
java.util.List<PointTrack> |
getActiveTracks(java.util.List<PointTrack> list)
Returns a list of active tracks.
|
java.util.List<PointTrack> |
getAllTracks(java.util.List<PointTrack> list)
Returns a list of all features that are currently being tracked
|
java.util.List<PointTrack> |
getDroppedTracks(java.util.List<PointTrack> list)
Returns a list of tracks dropped by the tracker during the most recent update.
|
java.util.List<PointTrack> |
getInactiveTracks(java.util.List<PointTrack> list)
KLT does not have inactive tracks since all tracks are dropped if a problem occurs.
|
java.util.List<PointTrack> |
getNewTracks(java.util.List<PointTrack> list)
Returns a list of tracks that have been added since process was called.
|
void |
process(I image)
Process input image and perform tracking.
|
void |
reset()
Discard memory of all current and past tracks.
|
void |
spawnTracks()
Automatically selects new features in the image to track.
|
protected I extends boofcv.struct.image.ImageSingleBand input
protected boofcv.abst.filter.derivative.ImageGradient<I extends boofcv.struct.image.ImageSingleBand,D extends boofcv.struct.image.ImageSingleBand> gradient
protected boofcv.struct.pyramid.PyramidDiscrete<I extends boofcv.struct.image.ImageSingleBand> basePyramid
protected D extends boofcv.struct.image.ImageSingleBand[] derivX
protected D extends boofcv.struct.image.ImageSingleBand[] derivY
protected java.lang.Class<D extends boofcv.struct.image.ImageSingleBand> derivType
protected boofcv.alg.tracker.klt.KltConfig config
protected int templateRadius
protected java.util.List<boofcv.alg.tracker.klt.PyramidKltFeature> active
protected java.util.List<boofcv.alg.tracker.klt.PyramidKltFeature> spawned
protected java.util.List<boofcv.alg.tracker.klt.PyramidKltFeature> dropped
protected java.util.List<boofcv.alg.tracker.klt.PyramidKltFeature> unused
public PointTrackerKltPyramid(boofcv.alg.tracker.klt.KltConfig config,
int templateRadius,
boofcv.struct.pyramid.PyramidDiscrete<I> pyramid,
boofcv.alg.feature.detect.interest.GeneralFeatureDetector<I,D> detector,
boofcv.abst.filter.derivative.ImageGradient<I,D> gradient,
boofcv.alg.interpolate.InterpolateRectangle<I> interpInput,
boofcv.alg.interpolate.InterpolateRectangle<D> interpDeriv,
java.lang.Class<D> derivType)
config - KLT tracker configurationgradient - Computes gradient image pyramid.public PointTrackerKltPyramid(boofcv.alg.tracker.klt.KltConfig config,
int templateRadius,
boofcv.struct.pyramid.PyramidDiscrete<I> pyramid,
boofcv.abst.filter.derivative.ImageGradient<I,D> gradient,
boofcv.alg.interpolate.InterpolateRectangle<I> interpInput,
boofcv.alg.interpolate.InterpolateRectangle<D> interpDeriv,
java.lang.Class<D> derivType)
public PointTrack addTrack(double x, double y)
process(boofcv.struct.image.ImageSingleBand) has been called. It can fail if there
is insufficient texturex - x-coordinatey - y-coordinatepublic void spawnTracks()
PointTrackerspawnTracks in interface PointTracker<I extends boofcv.struct.image.ImageSingleBand>protected boolean checkValidSpawn(PointTrack p)
public void dropAllTracks()
PointTrackerdropAllTracks in interface PointTracker<I extends boofcv.struct.image.ImageSingleBand>public void process(I image)
PointTrackerprocess in interface PointTracker<I extends boofcv.struct.image.ImageSingleBand>image - Next image in the sequenceprotected void declareOutput()
public boolean dropTrack(PointTrack track)
PointTrackerdropTrack in interface PointTracker<I extends boofcv.struct.image.ImageSingleBand>track - The track which is to be droppedpublic java.util.List<PointTrack> getActiveTracks(java.util.List<PointTrack> list)
PointTrackergetActiveTracks in interface PointTracker<I extends boofcv.struct.image.ImageSingleBand>list - Optional storage for the list of tracks.
If null a new list will be declared internally.public java.util.List<PointTrack> getInactiveTracks(java.util.List<PointTrack> list)
getInactiveTracks in interface PointTracker<I extends boofcv.struct.image.ImageSingleBand>list - Optional storage for the list of tracks.
If null a new list will be declared internally.public java.util.List<PointTrack> getDroppedTracks(java.util.List<PointTrack> list)
PointTrackergetDroppedTracks in interface PointTracker<I extends boofcv.struct.image.ImageSingleBand>list - Optional storage for the list of tracks.
If null a new list will be declared internally.public java.util.List<PointTrack> getNewTracks(java.util.List<PointTrack> list)
PointTrackergetNewTracks in interface PointTracker<I extends boofcv.struct.image.ImageSingleBand>list - Optional storage for the list of tracks.
If null a new list will be declared internally.public java.util.List<PointTrack> getAllTracks(java.util.List<PointTrack> list)
PointTrackergetAllTracks in interface PointTracker<I extends boofcv.struct.image.ImageSingleBand>list - Optional storage for the list of tracks.
If null a new list will be declared internally.protected void addToList(java.util.List<boofcv.alg.tracker.klt.PyramidKltFeature> in,
java.util.List<PointTrack> out)
public void reset()
PointTrackerreset in interface PointTracker<I extends boofcv.struct.image.ImageSingleBand>