DIS Optical Flow Forward Backward Consistency Feature Missing

System information (version)
  • OpenCV => 4.5.0
Detailed description

Unfortunately the forward backwards consistency check is not available in the opencv implementation of the DIS Optical Flow.
The problem lies in the inaccuracy of the flow result, and the FW/BW consistency check could improve results e.g. by setting the flow vector entries to NAN for pixels where the FW/BW consistency check fails.
It is better to know that the result can not be trusted than trusting it completely although it may be a wrong result.

1 possible answer(s) on “DIS Optical Flow Forward Backward Consistency Feature Missing

  1. The endpoint of the forward flow will be subpixel and so it will have 4 integer pixels it is between.
    You can compare the forward endpoint to the negative of the backward flow at the nearest pixel or choose to do some comparison or interpolation with the other 3 (or more) neighboring pixels.

    You might want to look into “Computing Inverse Optical Flow” and soft range mapping.