Closed twadleigh closed 5 years ago
It wouldn't be that hard, but Grid is a bit of a mess when it comes to declaring the output type. I think you could implement your case easily (probably just by removing some type declarations), but one would want to think about what happens when the user supplies an integer array as input. All this is fixable---maybe even without very much effort---but for myself I'm not 100% certain it's worth it given that there's a more carefully-planned successor to Grid coming: https://github.com/tlycken/Interpolations.jl. Of course, if you decide to fix the problem in Grid I'd be happy to merge it.
Also, FYI there's a non-exported bilinear-interpolation resize
function in Images.
Thanks for the reminder about Interpolations.jl
. I forgot that I had seen traffic about it on the mailing lists or wherever. I'll keep resize
in mind, too, as a backup.
Similar issue for me, I need interpolations on Array
s of Complex
.
I'll try to dig up the internals or simply just try Interpolations.jl.
It appears that
InterpGrid
is currently limited to supporting interpolations onArray
s ofFloatingPoint
s. How difficult would it be to extend it to support, e.g.,RGB
s ofFloatingPoint
s?From a mathematical perspective, at least, I would think it should be natural to extend interpolation to any type that acts like a vector space over a "field" of
FloatingPoint
s.If it is anything more than trivial to implement, I'll just implement my own for now, since my current need would be satisfied by bilinear interpolation, but this would certainly represent a longer-term nice-to-have.