Created
November 27, 2020 15:49
-
-
Save kinchungwong/73b0c90a9b83a3fb6b237abb7d29d0d9 to your computer and use it in GitHub Desktop.
notes_2020_11_27_7am.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ContinuousMovements(tables, imageData, | |
% | |
% This algorithm tries to construct a long-range trajectory by inspecting | |
% the (relatively short) movement vectors obtained from multiple runs of T3 | |
% (three-image trajectory). | |
% ====== | |
% (REMARK) Keep a blank line between the HELP section and DETAIL section. | |
% | |
% The algorithm used here are simple. Here is a brief description. | |
% | |
% (1) Firstly, stationary content is ignored. | |
% (1.1) Within any T3, if content hasn't moved at all, | |
% such content is ignored. | |
% | |
% (2) Secondly, content receiving too few votes are ignored. | |
% (2.1) The threshold can be configured. | |
% (2.2) Two kinds of thresholds are used. | |
% (2.2.1) As a percentage of total samples | |
% (2.2.2) As a percentage of occupied grid cells | |
% | |
% (3) For two adjacent T3 runs, namely FirstRun and SecondRun, | |
% ... let FirstRun.ImageKeys = (Img1, Img2, Img3) | |
% ... let SecondRun.ImageKeys = (Img2, Img3, Img4) | |
% ... let FirstRun.Movements = mv123a, mv123b | |
% ... let SecondRun.Movements = mv234c, mv234d | |
% ... | |
% (3.1) If it is the case that the TAIL of mv123b matches ... | |
% ... the HEAD of mv234c, they are said to be connected. | |
% ... | |
% (3.2) Example with real numbers | |
% ... mv123a ... -1 0 -114 0 18382 | |
% ... mv123b ... 0 0 0 0 1826 | |
% ... | |
% ... mv234c ... -114 0 -217 0 10697 | |
% ... mv234d ... 0 0 0 0 1698 | |
% ... | |
% ... mv345e ... -217 0 -68 0 11416 | |
% ... mv345f ... 0 0 0 0 1601 | |
% ... | |
% ... In this example, "mv123a", "mv234c", "mv345e" are connected, because | |
% ... [-114, 0], [-217, 0] are common prefix/suffix between adjacent pairs | |
% ... of trajectories. | |
% | |
% (4) However, the following situation can lead to a dead-end. | |
% ... | |
% (4.1) A trajectory begins with a non-zero movement but ends with a zero | |
% ... movement (vanishes). | |
% ... | |
% (4.2) Example with real numbers | |
% ... mv456g ... -68 0 0 0 16737 | |
% ... mv456h ... 0 0 0 0 1651 | |
% ... | |
% (4.3) When a dead-end is encountered, the T3 (three-image trajectory) | |
% ... approach has failed. This function will work around the situation by | |
% ... invoking ClassifyMovements using additional images (not necessarily | |
% ... limited to three) until a continuously non-zero movement vector | |
% ... is found. | |
% | |
% ====== | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment