https://docs.google.com/document/d/18DwCtJNNTACFD2C5Xk2myp7AdQSU4xrSu1TXvqUa_7I/edit
-
Mark object/Give object position (UNMESH)
-
Input: 1st frame
-
Use mouse clicks and the ginput function
-
Outputs the coordinates of the centre and the radii of the ellipse
-
function [centre, radii] = getObjectPosition(frame)
-
-
Compute distribution of the object-window - (16 bins per channel - leave as a parameter) (UNMESH)
-
Takes the n_h pixels inside the window (ellipse inside the rectangle) and computes a histogram
-
Input: the rectangular window - the array of pixel values inside the object-window
-
Use Epanechnikov kernel to compute the distribution
-
Output: The distribution - a 16x16x16 array -- leave the 16 as a parameter
-
function distrib = computeDistribution(window)
-
-
Function to evaluate Bhattacharya coefficient (SIDDHANT)
-
Input: 2 distributions
-
Compute the Bhattacharya coefficient using formula (17) from paper
-
function coeff = computeBhattacharyaCoefficient(d1, d2)
-
-
Function to compute mean-shifted position - (1 iteration of while) (UNMESH)
-
Input: distributions q_u (from frame i) and p_u(y_0) (from frame i+1), frames i and i+1,y_0,radius in current frame,radius in next frame
-
Compute the mean-shifted position using formulae (26) and (25).
-
Output the mean-shifted position
-
function shiftedPos = computeMeanShiftPosition(frame1, q_u, frame2, p_u)
-
-
Function to mark the tracked object (SIDDHANT)
- Inputs: frame, centre, radii of ellipse
-
Main function (SIDDHANT)
-
Get input, object positions
-
For each frame i
-
computeDistribution q_u for frame i at y0i with size = original size_i
-
computeDistribution p_u for frame i+1 at y0i with size = 90%, 95%, 100%, 105%, 110% of original size
-
Create an array to store the final BhattacharyaCoefficients for each object size and another to store the final positions
-
Iterate over all p_u s
-
While (convergence criteria)
-
computeBhattacharyaCoefficient
-
computeMeanShiftPosition update
-
Step 4 of the algorithm from paper
-
Update p_u for this new position
-
-
Store the last computed Bhattacharya coefficient, and the final position in the respective arrays
-
-
Choose that object size which gives the highest coefficient, and get that final position vector
-
Display/Store frame i+1
-
Save y0(i+1) and original size_(i+1)
-
-
Close video display/Save video to file.
-