I'm having the same problem as Susan and Somy. I tried using uint8 images as suggested by Deepak, but I still got the same error. Did any of you successfully try this on your own images? If yes, please help with this error.
This algorithm looks like just what I need for a project I'm working on, but I'm having a problem in the step where interp2 executes. Specifically,
returns a vector where the interior elements are all NaN while the first few and last few are what could be reasonable values.
I'm feeding the function a solid binary block that has been converted to double (so all 1's are now 127 and all 0's are still 0), could this be a problem in that the gradient is very sudden?