public class BasicTracker extends Object implements Tracker
Modifier and Type | Field and Description |
---|---|
private byte[] |
conf
|
private Logger |
logger
|
Constructor and Description |
---|
BasicTracker(byte[] conf)
|
BasicTracker(byte[] conf,
Logger logger)
Construct a tracker with a configuration.
|
Modifier and Type | Method and Description |
---|---|
private int |
feedFrame(long p,
byte[] frame)
Feed a frame into the tracker.
|
private void |
free(long p)
Free the native tracker.
|
private Tracklet[]
|
getTargets(long p)
Get tracked targets in currently input frames.
|
private long |
initialize(int width,
int height,
int channels,
byte[] conf)
Initialize a native tracker.
|
Tracklet[]
|
track(InputStream videoStream)
Read a video from a URL, and perform pedestrian tracking on it.
|
private byte[] conf
private Logger logger
public BasicTracker(@Nonnull byte[] conf)
@Nonnull public Tracklet[] track(@Nonnull InputStream videoStream) throws org.bytedeco.javacv.FrameGrabber.Exception
private long initialize(int width, int height, int channels, @Nonnull byte[] conf)
width
- The width of frames of the video to process.height
- The height of frames of the video to process.channels
- The channels of frames of the video to process.conf
- Bytes of a configuration the tracker uses.private int feedFrame(long p, @Nonnull byte[] frame)
p
- The pointer of an initialized tracker.frame
- BGR bytes of a decoded frame.private Tracklet[] getTargets(long p)
p
- the pointer of an initialized tracker the user has fed frames
to.
private void free(long p)
p
- the pointer to the native tracker.