背景:
超分辨率挑战赛Super Resolution Challenges (e.g. NTIRE) 降采样(downscaling)- bicubic interpolation- 是利用Matlab的imresize()函数实现的。
Track info:
Track 1: bicubic uses the bicubic downscaling (Matlab imresize), one of the most common settings from the recent single-image super-resolution literature.
More info:
For obtaining the low res images we use the Matlab function “imresize” with default settings (bicubic interpolation) and the desired downscaling factors: 2, 3, and 4.
导致
由于目前主流的论文采用的都是Matlab的imresize函数,这也就导致了两个问题:
- 我们对训练集的构造需要利用Matlab的imresize去实现
- 参考的一些算法的预插值也是用的Matlab的imresize函数
Matlab中的实现方式:
一般来说,先对图像进行归一化至[0,1]之间,然后再进行resize,然后再进行计算PSNR。
im = imread(['./Set5/' num2str(imglist(i).name)]);
im = modcrop(im, up_scale);
if size(im,3)>1
im = rgb2ycbcr(im);
im = im(:, :, 1);
end
im_gnd = im;
im_gnd = single(im_gnd)/255;
im_l = imresize(im_gnd, 1/up_scale, 'bicubic');
im_b = imresize(im_l, up_scale, 'bicubic');
im_gnd = shave(uint8(i