DPSR icon indicating copy to clipboard operation
DPSR copied to clipboard

serious artifacts with the results

Open Ethean opened this issue 4 years ago • 3 comments

I generate the blur kernel with matlab code

mu=[0,0]; [X,Y]=meshgrid(-10:1:10,-10:1:10); j = 9; out_path = 'kernels21/G/'; if isdir(out_path)==0 mkdir(out_path) end for i = 0:0 for k = 2.5:0.5:6 sigma = [k i ; i k]; kernal = mvnpdf([X(:) Y(:)],mu,sigma); k = reshape(kernal, size(X)); save([out_path, int2str(j), '.mat'], 'k') j = j+1; end end

and blur the image with opencv function filter2D and input the generated image and kernel lable to test. But I get results with serious artifacts, examples are as follows img_001_SRF_4_LR img_002_SRF_4_LR I don't know why it happens.

Ethean avatar Dec 07 '19 15:12 Ethean

from scipy import ndimage img_blurry = ndimage.filters.convolve(img_H, np.expand_dims(kernel, axis=2), mode='wrap')

cszn avatar Dec 08 '19 11:12 cszn

Thanks you for replying me. I am still confused that the kernel in code is the real kernel used to super resolve the blur image? If not, how can I get the kernel? Thanks in advance!

Ethean avatar Dec 09 '19 07:12 Ethean

Oh, I get you. You mean I should generate the lr image in this way, then test the model on the synthesised images.

Ethean avatar Dec 09 '19 07:12 Ethean