| 1: | Extract the set ξ of motion vectors from the MPEG stream |
| 2: | Create an empty array ζ to store the motion on X and Y axes |
| 3: 4: |
FOR each motion vector V in ξ
DO |
| 5: | Get the source and the destination points of the motion vector V |
| 6: | Compute motion magnitude of V |
| 7: | IF magnitude of V > minMontionTh THEN |
| 8: | Compute the x motion corresponding to the X axis and add nCorrection |
| 9: | Store x into ζ on corresponding plane |
| 10: | Compute the y motion corresponding to the Y axis and add nCorrection |
| 11: 12: |
Store y into ζ on corresponding plane END |