-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Getting Started
TheMrtN edited this page Jun 17, 2011
·
7 revisions
This page gets you started with OpenTLD and explains some features.
First install the software using the Installation page and solve any problems using the FAQ.
You can use your own camera for tracking.
- In MATLAB, run
imaqhwinfo
to see what adaptors are installed (for example: 'winvideo' or 'macvideo'). - Use
a=imaqhwinfo('intalled_adaptor_name'); a.DeviceInfo
to figure out the supported formats. - Open
initcamera.m
and change the linesource.vid = videoinput('winvideo', 1,'YUY2_320x240');
with your adaptor name and format. - Open
run_TLD.m
and setcamera
to1
like this:opt.source = struct('camera',0, ...
- Run
run_TLD.m
to start tracking. It will pop up a figure with an image from your camera in which you can draw the bounding box.
You've seen the motor bike example running, but how do you load your own movie?
- Install ffmpeg or another tool that can convert a video into a frame image sequence.
- Make a new folder for your own movie (we take /path/to/input/ as an example path).
- Convert the movie. For ffmpeg, use:
ffmpeg -i movie.avi -sameq /path/to/input/%5d.png
. Note: consider using .jpg which might save disk space and time (during tracking). - Tell TLD where your movie is found by opening
run_TLD.m
and changinginput
to the folder like this:opt.source = struct('camera',0,'input','/path/to/input/', ...
- Run
run_TLD.m
to start tracking.
Maybe you would like to make a movie of the tracking process to show it to others. You can use screen capture software like Camtasia (Windows), but here's an alternative:
- Open
other/run_TLD_demo.m
and set thesave
variable to1
like this:opt.plot = struct('pex',1,'nex',1,'save',1, ...
- Start the tracking process by running
other/run_TLD_demo.m
. - Now each frame is saved to the to the
_snapshots/
folder. Useffmpeg
(or another tool) to reconstruct it to a movie:ffmpeg -i _snapshots/%05d.png -sameq movie.mp4
Note that enabling saving will lower your frame rate (fps).