Hi,
I would like to get the interpolated value at a non-integer point of an
image.
Using Images.jl and Grid.jl I've tried doing
using Images, TestImages, Grid
img = convert(Image{Gray},testimage("mandrill")) # for example
img_bi = CoordInterpGrid((1:size(img,1), 1:size(img,2)), img.data, BCnearest
, InterpLinear)
img_bi[12.34, 56.78]
which doesn't work due to img.data being
an Array{Gray{UfixedBase{Uint8,8}},2} .
On the other hand, this
img_bi = CoordInterpGrid((1:size(img,1), 1:size(img,2)), convert(Matrix{
Float64}, img.data), BCnearest, InterpLinear)
works.
However I'd like to avoid the conversion.
Is there a nice way to do it, or must I implement the bilinear
interpolation myself?
Thanks,
Cristóvão