I'm trying to use opticFlowHS with angular data (phase data, -pi to pi). The trouble with using MATLAB's built-in opticFlow function is that gradients are calculated using normal differences whereas for angular data, you need to calculate circular differences when computing gradients. Otherwise, the algorithm will fail anytime there are phase slips. I learned this the hard way (realized it just before I was about to submit a journal article for publication).
Is there any workaround available? Is this something that the folks at MATLAB can help me with?