zmoratto/PatchMatch — pull request #1 by oleg-alexandrov (2014-08-20 20:07:33+00:00)
Title: SurfaceFitView: Watch for cases when there is no valid disparity

I put a fix for the case when the input disparity is invalid in the entire region to fit.

This code is still not robust enough in funny situations. I would argue that a better approach would be to simply blur the input disparity, but then one must be careful that one invalid pixel in the disparity not invalidate the entire convolution, so one would need to blur by doing a weighted average of the valid pixels only.