I am trying to get a clear understanding of how the optical flow tracking works, but I am struggling at the part where/how the warped ROIs are calculated in the CConnectedRegionGenerator class. The documentation is able to provide a high-level overview of how the OF tracker works, but lacks more in-depth details about this process.
I can sort of understand that Process() is looping over the flow values in the radius of the current tracked ROI, but for instance, I am struggling to understand what exactly is being done in the GrowRegion() method, which is called multiple times during the Process() method.
Perhaps this is caused by my lack of proficiency in C++, so I would really appreciate if somebody is able to share any resources about the algorithm used here to generate the “candidate” regions.
Many thanks in advance!