|
| [+QUICK
INFO+] |
|
| TEAM
MEMBERS : |
|
Kenny
Teng |
| ASSIGNMENT
: |
|
Write
a program that is able to read in a video stream of
any kind, provide a selection tool to the user to highlight
a region or an object to track and then track that template
throughout the frames. |
| SPECIFICATIONS
: |
|
The
system will be written using Matlab. It's not a real-time
application. |
| RESULT: |
|
Got
an A in the class |
| |
|
|
| [+OVERVIEW+] |
This
flowchart shows the steps used for the whole system.
The selection tool will display only the first frame
of the video sequence and and region can be selected
as the initial template, and it will be tracked over
the whole frame sequence. Alternatively, this could
be bypassed and replaced by a fixed, pre-determined
template that could be uploaded to the system for
tracking.
Once
the selection is validated, it is confirmed as the
reference template with which the initial computations
and predictions will be performed.
|
 |
 |
| The template is then filtered
using a Gaussian filter and then bi-linear interpolation
is performed on the template region. This following
format of the template is saved for further prediction
calculation. |
 |
| Once
we have a reference template to start searching on the
subsequent frames, I compute the Optical flow parameters
in a recursive way until convergence is obtained. First
the fundamental equation of motion is given by:
|
 |
where u(x, y) and v(x, y)
are the two flow components for a frame pair at time
t-1 and t respectively. Ix and Iy are the image gradients
at pixel (x, y). |
| Assuming constant flow over
the motion, the solution of the least-squares problem
is given by: |
 |
| Therefore, this will yield
the explicit solution in u and v: |

|
| Therefore, the values of u
and v are going to converge to the 'next best' approximation
of the flow component on every iteration. For every
iteration, the position of the template is updated with
the updated values of u and v and the accuracy of the
prediction is determined by using a simple Mean Squared
Error. Once the error passes a certain threshold the
convergence iteration is halted and the system is ready
to process next frame. |
| TRACKED
MOVIE SEQUENCE |
 |
|