I'm trying to upgrade a flow from sparse to dense and have been recommended this for my use-case https://uk.mathworks.com/matlabcentral/fileexchange/25634-smoothn .
When I run the interpolation, areas of the image that clearly have no movement are assigned large vectors toward the areas of the image that do have motion. For example, if there is no motion in 1/3rd of the image, that part of the image will be assigned vectors flowing toward the areas of the image with motion.
In some cases, I can assign values to these areas myself (for example, if it's a black background) but with more complex images this doesn't really work.
If anyone has had this problem, or has any advice, it would be appreciated.