cszn / IRCNN

Learning Deep CNN Denoiser Prior for Image Restoration (CVPR, 2017) (Matlab)
http://openaccess.thecvf.com/content_cvpr_2017/papers/Zhang_Learning_Deep_CNN_CVPR_2017_paper.pdf
589 stars 173 forks source link

About the kernel size of Gaussian blur by downsampling for SISR #25

Open wenchen4321 opened 4 years ago

wenchen4321 commented 4 years ago

Could you please tell me why the kernel size is even when the scale factor is 2 or 4 in Blurring by Gaussian kernel followed by downsampling for SISR?

kernelsize = ceil(sigma*3)*2+2;
kernel     = fspecial('gaussian',kernelsize,sigma);
blur_HR    = imfilter(im, kernel,'replicate');
LR         = blur_HR(scale/2:scale:end-scale/2,scale/2:scale:end-scale/2,:);
cszn commented 4 years ago

Check the bicubic kernel as a reference, see https://github.com/cszn/USRNet