Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

serious artifacts with the results #10

Open
Ethean opened this issue Dec 7, 2019 · 3 comments
Open

serious artifacts with the results #10

Ethean opened this issue Dec 7, 2019 · 3 comments

Comments

@Ethean
Copy link

Ethean commented Dec 7, 2019

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.

@cszn
Copy link
Owner

cszn commented Dec 8, 2019

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

@Ethean
Copy link
Author

Ethean commented Dec 9, 2019

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
Copy link
Author

Ethean commented Dec 9, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants