public class PointTrackerKltPyramid<I extends ImageSingleBand,D extends ImageSingleBand> extends 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 List<PyramidKltFeature> |
active |
protected PyramidDiscrete<I> |
basePyramid |
protected KltConfig |
config |
protected Class<D> |
derivType |
protected D[] |
derivX |
protected D[] |
derivY |
protected List<PyramidKltFeature> |
dropped |
protected ImageGradient<I,D> |
gradient |
protected I |
input |
protected List<PyramidKltFeature> |
spawned |
protected int |
templateRadius |
protected PyramidKltTracker<I,D> |
tracker |
protected List<PyramidKltFeature> |
unused |
| Constructor and Description |
|---|
PointTrackerKltPyramid(KltConfig config,
int templateRadius,
PyramidDiscrete<I> pyramid,
GeneralFeatureDetector<I,D> detector,
ImageGradient<I,D> gradient,
InterpolateRectangle<I> interpInput,
InterpolateRectangle<D> interpDeriv,
Class<D> derivType)
Constructor which specified the KLT track manager and how the image pyramids are computed.
|
PointTrackerKltPyramid(KltConfig config,
int templateRadius,
PyramidDiscrete<I> pyramid,
ImageGradient<I,D> gradient,
InterpolateRectangle<I> interpInput,
InterpolateRectangle<D> interpDeriv,
Class<D> derivType) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addToList(List<PyramidKltFeature> in,
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.
|
List<PointTrack> |
getActiveTracks(List<PointTrack> list)
Returns a list of active tracks.
|
List<PointTrack> |
getAllTracks(List<PointTrack> list)
Returns a list of all features that are currently being tracked
|
List<PointTrack> |
getDroppedTracks(List<PointTrack> list)
Returns a list of tracks dropped by the tracker during the most recent update.
|
List<PointTrack> |
getInactiveTracks(List<PointTrack> list)
KLT does not have inactive tracks since all tracks are dropped if a problem occurs.
|
List<PointTrack> |
getNewTracks(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 ImageSingleBand input
protected ImageGradient<I extends ImageSingleBand,D extends ImageSingleBand> gradient
protected PyramidDiscrete<I extends ImageSingleBand> basePyramid
protected D extends ImageSingleBand[] derivX
protected D extends ImageSingleBand[] derivY
protected Class<D extends ImageSingleBand> derivType
protected KltConfig config
protected int templateRadius
protected List<PyramidKltFeature> active
protected List<PyramidKltFeature> spawned
protected List<PyramidKltFeature> dropped
protected List<PyramidKltFeature> unused
protected PyramidKltTracker<I extends ImageSingleBand,D extends ImageSingleBand> tracker
public PointTrackerKltPyramid(KltConfig config, int templateRadius, PyramidDiscrete<I> pyramid, GeneralFeatureDetector<I,D> detector, ImageGradient<I,D> gradient, InterpolateRectangle<I> interpInput, InterpolateRectangle<D> interpDeriv, Class<D> derivType)
config - KLT tracker configurationgradient - Computes gradient image pyramid.public PointTrackerKltPyramid(KltConfig config, int templateRadius, PyramidDiscrete<I> pyramid, ImageGradient<I,D> gradient, InterpolateRectangle<I> interpInput, InterpolateRectangle<D> interpDeriv, 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 ImageSingleBand>protected boolean checkValidSpawn(PointTrack p)
public void dropAllTracks()
PointTrackerdropAllTracks in interface PointTracker<I extends ImageSingleBand>public void process(I image)
PointTrackerprocess in interface PointTracker<I extends ImageSingleBand>image - Next image in the sequenceprotected void declareOutput()
public boolean dropTrack(PointTrack track)
PointTrackerdropTrack in interface PointTracker<I extends ImageSingleBand>track - The track which is to be droppedpublic List<PointTrack> getActiveTracks(List<PointTrack> list)
PointTrackergetActiveTracks in interface PointTracker<I extends ImageSingleBand>list - Optional storage for the list of tracks.
If null a new list will be declared internally.public List<PointTrack> getInactiveTracks(List<PointTrack> list)
getInactiveTracks in interface PointTracker<I extends ImageSingleBand>list - Optional storage for the list of tracks.
If null a new list will be declared internally.public List<PointTrack> getDroppedTracks(List<PointTrack> list)
PointTrackergetDroppedTracks in interface PointTracker<I extends ImageSingleBand>list - Optional storage for the list of tracks.
If null a new list will be declared internally.public List<PointTrack> getNewTracks(List<PointTrack> list)
PointTrackergetNewTracks in interface PointTracker<I extends ImageSingleBand>list - Optional storage for the list of tracks.
If null a new list will be declared internally.public List<PointTrack> getAllTracks(List<PointTrack> list)
PointTrackergetAllTracks in interface PointTracker<I extends ImageSingleBand>list - Optional storage for the list of tracks.
If null a new list will be declared internally.protected void addToList(List<PyramidKltFeature> in, List<PointTrack> out)
public void reset()
PointTrackerreset in interface PointTracker<I extends ImageSingleBand>Copyright © 2013. All Rights Reserved.