我阅读了论文Deep Feature Flow for Video Recognition https://arxiv.org/abs/1611.07715。
在 Sec.3 中,作者实现了这样的双线性插值:
在哪里是来自源图像的点,并且是目标图像上的点。是该点移动每个点的距离(不是)。定义为
双线性插值在wiki中定义为:
我认为操作和是等价的。我怎样才能得到过滤器从?
我阅读了论文Deep Feature Flow for Video Recognition https://arxiv.org/abs/1611.07715。
在 Sec.3 中,作者实现了这样的双线性插值:
在哪里是来自源图像的点,并且是目标图像上的点。是该点移动每个点的距离(不是)。定义为
双线性插值在wiki中定义为:
我认为操作和是等价的。我怎样才能得到过滤器从?
老实说,我还没有阅读您链接到的那篇文章,但是只要您想要一个用于 2D 双线性插值的卷积核,那么以下内容应该会有所帮助。
双线性插值给出了一个粗略的结果,如果应用程序不需要完美的输出,这可能就足够了。然后下面的简单三角二维卷积核实现了比值的双线性插值(压缩后通过) 由.
L = 9; % upsampling ratio
M = 5; % downsampling ratio (M < L assumed)
h = (1/L)*conv(ones(1,L),ones(1,L)); % 1D linear interpolator.
hBL = h'*h; % 2D bi-linear interpolator.
I = im2double(imread('Cameraman.tif')); % Read some image into double
S = size(I); % size of image
Ie = zeros( L*S(1), L*S(2) ) ; % expand the image by stuffing zeros
Ie( 1:L:end , 1:L:end ) = I; % assign the original pixels
Iup = conv2(Ie,hBL); % linear upsample (interpolate) by L
Iint = Iup(1:M:end,1:M:end); % downsample by M
figure,imshow(I);title('original image');
figure,imshow(Iint);title('upsampled by L/M times');