JingyunLiang / FKP

Official PyTorch code for Flow-based Kernel Prior with Application to Blind Super-Resolution (FKP, CVPR2021)

Home Page:https://arxiv.org/abs/2103.15977

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

about random kernel generator

zhihongp opened this issue · comments

In the following code, lamda_1&2 (referred as kernel width) are used to calculate the COV matrix. But shouldn't the square of lambda be used here for covariance?

def gen_kernel_fixed(k_size, scale_factor, lambda_1, lambda_2, theta, noise):

Here, lambda_1 and lambda_2 denote $\sigma_1^2$ and $\sigma_2^2$ in the covariance matrix, respectively. Therefore, it has already been squared. Note that isotropic Gaussian generation functions often take $\sigma$ (the standard deviation, not squared) as input.

We did this to be consistent with mvnpdf(anisotropic Gaussian) and fspecial(isotropic Gaussian) in Matlab.

ezoic increase your site revenue