public class MultiTracker extends Object
load(InputStream) to get a
MultiTracker.TrackerVars object which can be used to construct the Tracker.
MultiTracker t = new MultiTracker( MultiTracker.load( new File("face.tracker.file") ) );
| Modifier and Type | Class and Description |
|---|---|
static class |
MultiTracker.TrackedFace
Encapsulates the variables for a single tracked face.
|
static class |
MultiTracker.TrackerVars
This class is used to store the tracker variables when they are loaded
from a file.
|
| Modifier and Type | Field and Description |
|---|---|
List<MultiTracker.TrackedFace> |
trackedFaces |
| Modifier | Constructor and Description |
|---|---|
protected |
MultiTracker()
Constructor for making a tracker when loading data.
|
|
MultiTracker(CLM clm,
FDet fdet,
MFCheck fcheck,
Jama.Matrix rshape,
double[] simil)
Create a tracker using the given model, face detector, failure checker,
reference shape and similarity measures.
|
|
MultiTracker(MultiTracker.TrackerVars tv)
Create a tracker with the given variables.
|
| Modifier and Type | Method and Description |
|---|---|
void |
frameReset()
Reset frame number (will perform detection in next image)
|
MultiTracker.TrackerVars |
getInitialVars()
Returns the initial variables used for each face tracker.
|
void |
initShape(Rectangle r,
Jama.Matrix shape,
Jama.Matrix _rshape)
Initialise the shape within the given rectangle based on the given
reference shape.
|
static MultiTracker.TrackerVars |
load(InputStream in)
Load a tracker from an input stream.
|
static MultiTracker.TrackerVars |
load(String fname)
Load a tracker from a file.
|
int |
track(FImage im,
int[] wSize,
int fpd,
int nIter,
double clamp,
double fTol,
boolean fcheck,
float searchAreaSize)
Track faces from a previous frame to the given frame.
|
protected Rectangle |
updateTemplate(MultiTracker.TrackedFace f,
FImage im,
Jama.Matrix s,
boolean resize) |
public List<MultiTracker.TrackedFace> trackedFaces
public MultiTracker(CLM clm, FDet fdet, MFCheck fcheck, Jama.Matrix rshape, double[] simil)
clm - The local modelfdet - The face detectorfcheck - The failure checkerrshape - The reference shapesimil - The similarity measurespublic MultiTracker(MultiTracker.TrackerVars tv)
tv - The tracker variables to use for all face trackers.protected MultiTracker()
public void frameReset()
public int track(FImage im, int[] wSize, int fpd, int nIter, double clamp, double fTol, boolean fcheck, float searchAreaSize)
im - The video framewSize - The window sizefpd - The number of frames between forced redetecsnIter - The number of iterations for model fittingclamp - The number s.d.'s in which a model must fitfTol - The tolerance for model fittingfcheck - Whether to automatically check for failed trackingsearchAreaSize - The size of the template match search areapublic void initShape(Rectangle r, Jama.Matrix shape, Jama.Matrix _rshape)
r - The rectangleshape - The shape to initialise_rshape - The reference shapeprotected Rectangle updateTemplate(MultiTracker.TrackedFace f, FImage im, Jama.Matrix s, boolean resize)
public static MultiTracker.TrackerVars load(String fname) throws FileNotFoundException
fname - File name to read fromFileNotFoundExceptionpublic static MultiTracker.TrackerVars load(InputStream in)
in - The input streampublic MultiTracker.TrackerVars getInitialVars()