Problem Statement: I have a video of ANSYS Simulation of vortices formed due to flat plate plunging. The video contains vortices (in simpler terms blobs), which are distinguished according to their rotation (based on red or blue colour).
Objective: The vortices are needed to be identified and labelled according to their rotation. For example, vortices having clockwise rotation (red coloured) are labelled as R1, R2, R3, and so on and the anticlockwise rotation (blue coloured) as B1, B2, B3, etc.
Problem: I have been able to identify vortices as either clockwise and anticlockwise using contour detection, but the major issue is of numbering. The identified blob when it goes out of frame the label gets destroyed ie. if the vortex had a label A1 and now goes out of frame this label gets assigned to another vortex in the frame thus loosing the uniqueness.

