JuliaImages / ImageFiltering.jl

Julia implementations of multidimensional array convolution and nonlinear stencil operations
Other
99 stars 49 forks source link

Linear extrapolation for boundary values? #134

Open stillyslalom opened 4 years ago

stillyslalom commented 4 years ago

The image padding machinery doesn't allow for extrapolation. This causes significant errors in the calculation of the derivative at the border, as noted in the documentation:

Ignore the values at the border since we expect them to be erroneous.

I took a look at the source to see whether I could bang out a fix in an hour, but was stymied by how heavily the current padding framework relies on indexing. Any suggestions on how one would implement this boundary condition?